View Full Version : [Solved] Reply With Quote
Stratis
02-03-2017, 12:59 PM
I can not use span or div to this phrase "Reply With Quote"
It shows the change but I see double "Reply With Quote" and at the end of the second the code, see attach image.
Here
155778
All others are ok, Edit, Quick Reply.
This problem is in all skins, even in default skin (which is not modified)
Span code i use: <span style="font-style: italic;">Reply With Quote</span>
Div code i use: <div class="better_look">Reply With Quote</div>
The above codes works well to others.
Any idea? :erm:
cellarius
02-03-2017, 01:21 PM
The code you actually use has a nesting error. Double check in the template.
Stratis
02-03-2017, 01:30 PM
Check what and where?
I only try to use div or span in the phrase
155779
Thanks Sven
cellarius
02-03-2017, 01:53 PM
In this case you can't add html to the phrase, because the phrase is also used in the title-tag of the <a>-Link-Element. It breaks the <a>-Tag.
You'll have to add the span not in the phrase, but in the postbit template.
Stratis
02-04-2017, 03:16 PM
I found them with your help. Actually for my use it is in postbit_legacy
Question, Here are both codes for the two options (button)
Reply
<vb:if condition="$show['quickreply'] AND !$show['threadedmode']">
<a id="qr_{vb:raw post.postid}" class='quickreply' href="{vb:raw post.replylink}" rel="nofollow"><img id="replyimg_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase quick_reply_to_this_message}" /> {vb:rawphrase reply}</a>
<span class="seperator"> </span>
</vb:if>
To the Reply, there is no problem using span or div
Reply With Quote
<vb:if condition="$post['replylink']">
<a id="qrwq_{vb:raw post.postid}" class="newreply" href="{vb:raw post.replylink}" rel="nofollow"><img id="quoteimg_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase reply_with_quote}" /> {vb:rawphrase reply_with_quote}</a>
<span class="seperator"> </span>
</vb:if>
Here i can not, what is the different here and does not let me.
Even i can not put an attribute (ALT) Do you have in the Reply With Quote
an attribute ?
Sory for my bad English :)
MarkFL
02-04-2017, 03:27 PM
Add a plugin, hooked at "parse_templates" with the code:
if (THIS_SCRIPT === 'showthread')
{
$template_hook['headinclude_css'] .= '<style>.newreply {font-style: italic !important;}</style>';
}
Stratis
02-04-2017, 04:31 PM
Thanks Mark, plugin is ok, how to put and alt="xxxxxx" can this be done in the same plugin? :D
MarkFL
02-04-2017, 04:44 PM
Thanks Mark, plugin is ok, how to put and alt="xxxxxx" can this be done in the same plugin? :D
Find the phrase "reply_with_quote" and you can change that anchor element's title attribute. :)
edit: Oops...that phrase also controls the text on the button...give me a few minutes, and I will figure out a workaround for this. :)
Stratis
02-04-2017, 04:50 PM
Find the phrase "reply_with_quote" and you can change that anchor element's title attribute. :)
Whatever change I make it shows as I say at start of my post (see image)
I do not know why, the other buttons do not have this behavior.
Font italic was one of what I want to do, so it is ok with hook.
I will try to see with the attribute.
MarkFL
02-04-2017, 04:54 PM
Okay...javascript to the rescue...change the plugin to read:
if (THIS_SCRIPT === 'showthread')
{
$template_hook['headinclude_css'] .= '<style>.newreply {font-style: italic !important;}</style>';
$template_hook['footer_javascript'] .= '<script>
var rwq = document.getElementsByClassName("newreply");
for (var n = 0; n < rwq.length; n++)
{
rwq[n].title = "Stratis puts his custom tooltip here...";
}
</script>';
}
Just replace "Stratis puts his custom tooltip here..." with what you want. :)
Stratis
02-04-2017, 05:02 PM
Yes, yes, thank you so much Mark.
155781
And Thanks to Sven for his help to. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.