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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2013, 03:39 AM
Pocket Aces Pocket Aces is offline
 
Join Date: Mar 2007
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Changing Closed Thread Button

We recently switched from vb3 to vb4 and learned that buttons are no longer images. We understand that buttons are now controlled by control_content_background stylevar. But that applies to all content buttons such Reply to Thread, Post New Thread, Closed Thread, etc.

We'd like to change the background and hover background of Closed Thread button only, how do we do that?
Reply With Quote
  #2  
Old 11-06-2013, 05:05 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which close thread button are you referring to, there are a couple of them?
Reply With Quote
  #3  
Old 11-06-2013, 05:59 AM
Pocket Aces Pocket Aces is offline
 
Join Date: Mar 2007
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Closed Thread button in showthread
where are the other locations?
Reply With Quote
  #4  
Old 11-06-2013, 06:24 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, my fault. I see what you are asking. I read "close" thread. BRB.

--------------- Added 06 Nov 2013 at 02:52 ---------------

Edit the "SHOWTHREAD" template
Templates might vary from version to version, so double check.

(Top Buttons)

Search

HTML Code:
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1"class="newcontent_textcontrol"    id="newreplylink_top"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>

Replace

HTML Code:
  <vb:comment>
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" class="newcontent_textcontrol"    id="newreplylink_top"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
  </vb:comment>
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" class="" id="newreplylink_top">
        <vb:if condition="$show['closethread']">
            <span class="reply_thread_button">+ {vb:rawphrase reply_to_thread}</span>
        <vb:else />
            <span class="closed_thread_button">{vb:rawphrase closed_thread}</span>
        </vb:if>
    </a>
(Bottom Buttons)

Search
HTML Code:
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1"class="newcontent_textcontrol"    id="newreplylink_top"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>

Replace

HTML Code:
  <vb:comment>
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" class="newcontent_textcontrol"    id="newreplylink_bottom"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
  </vb:comment>
    <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" class="" id="newreplylink_bottom">
        <vb:if condition="$show['closethread']">
            <span class="reply_thread_button">+ {vb:rawphrase reply_to_thread}</span>
        <vb:else />
            <span class="closed_thread_button">{vb:rawphrase closed_thread}</span>
        </vb:if>
    </a>

Modify the CSS accordingly and add this to your "additionalcss" template.

Code:
.closed_thread_button {
    background: url("images/buttons/newbtn_middle.png") repeat-x scroll left top #417394;
    position: relative;     
    border: 0 none;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 3px 8px #DDDDDD;
    clear: right;
    color: #FFFFFF;
    display: block;
    float: left;
    font: 14px Arial,sans-serif;
    padding: 4px 15px;
    
    background: red;    
}

.reply_thread_button {
    background: url("images/buttons/newbtn_middle.png") repeat-x scroll left top #417394;
    position: relative;     
    sborder: 0 none;
    sborder-radius: 10px 10px 10px 10px;
    sbox-shadow: 0 3px 8px #DDDDDD;
    sclear: right;
    scolor: #FFFFFF;
    sdisplay: block;
    sfloat: left;
    sfont: 14px Arial,sans-serif;
    spadding: 4px 15px;
  
    background: blue;    
}
Hope this helps
Reply With Quote
2 благодарности(ей) от:
Pocket Aces, ThatGreenAlien
  #5  
Old 11-07-2013, 05:33 AM
Pocket Aces Pocket Aces is offline
 
Join Date: Mar 2007
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks tbworld, we'll give it a try
Reply With Quote
  #6  
Old 11-07-2013, 05:41 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With this method you could change the CSS background property and load a seperate image instead of a CSS generated button. I put it together quickly and verbosely so you can see the modifications. The are other (more elegant) ways to handle this, but I wanted to keep it simple.
Reply With Quote
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:48 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.08956 seconds
  • Memory Usage 2,231KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (4)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (2)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete