vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Changing Closed Thread Button (https://vborg.vbsupport.ru/showthread.php?t=304213)

Pocket Aces 11-06-2013 03:39 AM

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?

tbworld 11-06-2013 05:05 AM

Which close thread button are you referring to, there are a couple of them?

Pocket Aces 11-06-2013 05:59 AM

Closed Thread button in showthread
where are the other locations?

tbworld 11-06-2013 06:24 AM

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

Pocket Aces 11-07-2013 05:33 AM

thanks tbworld, we'll give it a try :)

tbworld 11-07-2013 05:41 AM

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.


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

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.01049 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete