Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2017, 12:59 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [Solved] Reply With Quote

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:
Reply With Quote
  #2  
Old 02-03-2017, 01:21 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code you actually use has a nesting error. Double check in the template.
Reply With Quote
  #3  
Old 02-03-2017, 01:30 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check what and where?

I only try to use div or span in the phrase
Attachment 155779

Thanks Sven
Reply With Quote
  #4  
Old 02-03-2017, 01:53 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
2 благодарности(ей) от:
MarkFL, Stratis
  #5  
Old 02-04-2017, 03:16 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 02-04-2017, 03:27 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>';

Reply With Quote
  #7  
Old 02-04-2017, 04:31 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Mark, plugin is ok, how to put and alt="xxxxxx" can this be done in the same plugin?
Reply With Quote
  #8  
Old 02-04-2017, 04:44 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stratis View Post
Thanks Mark, plugin is ok, how to put and alt="xxxxxx" can this be done in the same plugin?
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.
Reply With Quote
  #9  
Old 02-04-2017, 04:50 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
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.
Reply With Quote
  #10  
Old 02-04-2017, 04:54 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Stratis
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10483 seconds
  • Memory Usage 2,293KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete