Log in

View Full Version : Different Cell Color for Stickies


Andrew111888
07-29-2005, 10:00 PM
What this modification does is change the td cell background color for a sticky thread when viewing a thread listing.

Versions:
3.6.0 (https://vborg.vbsupport.ru/showthread.php?t=123939)
3.5.0 (https://vborg.vbsupport.ru/showthread.php?t=94328)
3.0.0 (https://vborg.vbsupport.ru/showthread.php?t=93195)

This is tested in 3.0.5 but I don't know why it wouldn't work in any 3.0.x version.

Tony G
07-30-2005, 06:46 AM
Very, very useful mod. Thanks for sharing, will definitely use myself. ^^

Andrew111888
07-30-2005, 06:53 AM
I actually thought it would be more complex than it was but then I discovered $thread['sticky'] is what determines if the thread is a sticky or not and then I just shoved it in the template.

Azhrialilu
07-30-2005, 11:33 AM
Great idea! *installs*

bigcurt
07-30-2005, 12:05 PM
Good job bud A+ mod

~Curt

Warlord
07-30-2005, 10:04 PM
Handy little feature.

*clicks install*

Tony G
07-31-2005, 12:42 AM
I actually thought it would be more complex than it was but then I discovered $thread['sticky'] is what determines if the thread is a sticky or not and then I just shoved it in the template.

I also thought it would be pretty complex, suprised it wasn't. ^^

Barakat
08-01-2005, 01:19 AM
thanks and install ....... good job

GrendelKhan{TSU
08-01-2005, 05:42 AM
any chance for this with 3.5 RC1?

(btw, related: anyone know how to change it so I can to something else (different word) beside the word "sticky"?)

:D

Andrew111888
08-01-2005, 07:00 AM
Admin CP -> Languages & Phrases -> Phrase Manager -> GLOBAL Phrases -> sticky_thread_prefix is how you change that.

And as I have no working 3.5 board because of some stupid cookie issue, I don't know when I'll write this for 3.5.

SlipNslide281
08-05-2005, 08:32 PM
awesome hack. I realy like this one. Easy and very good on the eyes. Thanks for this hack.

HaYLaZ
08-18-2005, 03:56 PM
in text file the codes are mixed ı cant read

Andrew111888
08-18-2005, 09:47 PM
No one else seemed to have a problem ;).

HaYLaZ
08-19-2005, 08:43 AM
can you write here the codes regularly please

Andrew111888
08-19-2005, 06:35 PM
Why can't you just download the file?

HaYLaZ
08-20-2005, 09:49 AM
in my threadbit template there are no codes which you write in the txt file:(
my codes are following;

<tr>
<td class="alt1" id="td_status_$thread[realthreadid]">
$thread[openclose_editable]
<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_status_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
</td>
<if condition="$show['threadicons']">
<td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
</if>

<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

$thread[title_editable]
<div>
<span style="float:$stylevar[right]">
<if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if>
<if condition="$show['paperclip']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /> </if>
<if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if>
<if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
</span>
<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
$thread[movedprefix]
$thread[typeprefix]
$thread[moderatedprefix]
<if condition="$show['gotonewpost']">
<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
</if>
<if condition="$thread['pagenav']"><span class="smallfont" style="white-space:nowrap">( <img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav] <if condition="$show[pagenavmore]">... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if> )</span></if>
</div>

<div class="smallfont">
<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
<if condition="$show['guestuser']">
$thread[postusername]
<else />
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
</if>
</div>

<if condition="$show['unsubscribe']">
<div class="smallfont">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]">$vbphrase[reply]</a> |
<a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]">$vbphrase[unsubscribe]</a>
</div>
</if>

</td>

<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>
<else />
<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
$thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</td>
</if>

<if condition="$show['notificationtype']">
<td class="alt1"><div class="smallfont">
<label for="sub$subscribethread[$threadid]">$thread[notification]</label>
</div></td>
<td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
<else />
<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
<td class="alt2" align="center">$thread[views]</td>

<if condition="$show['forumlink']">
<td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
</if>
</if>

<if condition="$show['inlinemod']">
<td class="alt1">
<input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> />
</td>
</if>
</tr>

Andrew111888
08-20-2005, 04:30 PM
That's because this hack is for vBulletin 3.0.x, and you use vBulletin 3.5.0.... you want this version (https://vborg.vbsupport.ru/showthread.php?s=&threadid=94328).

Forumi Shqiptar
08-26-2005, 10:58 PM
nice work mate

Gunshot
09-10-2005, 01:00 AM
works perfectly

now,,,,

how would one change the font color in stickies only?

TalkCS
09-11-2005, 05:42 PM
lovely lovely mod, thanks alot

WoodiE
10-02-2005, 04:26 PM
I can't believe this was so easy. I love the second option of adding your own css class which gives you the ability to change more things such as font, font size, borders and so on.

Nicely done!

-Michael

mikehawk
11-09-2005, 01:41 AM
Thanks. :)

TOZ
11-22-2005, 10:21 PM
quick question.

This code:
.stickybg
{
background-color: #hex;
color: #000000;
}
Will only change the Sticky font color, but not the background. I need to change the background.
By the way everything works on 3.5.1 exept this.

Andrew111888
11-23-2005, 02:54 AM
Responded in appropriate thread (https://vborg.vbsupport.ru/showthread.php?p=828366#post828366)

Andrew111888
08-14-2006, 04:06 PM
This has been updated for 3.6.0:

https://vborg.vbsupport.ru/showthread.php?t=123939