The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
Which close thread button are you referring to, there are a couple of them?
|
#3
|
|||
|
|||
Closed Thread button in showthread
where are the other locations? |
#4
|
|||
|
|||
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}&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}&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}&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> 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}&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}&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}&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; } |
2 благодарности(ей) от: | ||
Pocket Aces, ThatGreenAlien |
#5
|
|||
|
|||
thanks tbworld, we'll give it a try
|
#6
|
|||
|
|||
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.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|