vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   [Solved] Reply With Quote (https://vborg.vbsupport.ru/showthread.php?t=324361)

Stratis 02-03-2017 12:59 PM

[Solved] Reply With Quote
 
1 Attachment(s)
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
Attachment 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

1 Attachment(s)
Check what and where?

I only try to use div or span in the phrase
Attachment 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
Code:

<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">&nbsp;</span>
  </vb:if>

To the Reply, there is no problem using span or div


Reply With Quote
Code:

<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">&nbsp;</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:

PHP 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

Quote:

Originally Posted by Stratis (Post 2581827)
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

Quote:

Originally Posted by MarkFL (Post 2581828)
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:

PHP Code:

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. :)


All times are GMT. The time now is 09:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01056 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete