PDA

View Full Version : Different Cell Color for Stickies


Andrew111888
14 Aug 2006, 17:03
What this modification does is change the td cell background color for a sticky thread when viewing a thread listing.

Please note the screenshots are from my 3.0.x release as there's no reason to make new ones.

Versions:
3.6.0 (http://www.vbulletin.org/forum/showthread.php?t=123939)
3.5.0 (http://www.vbulletin.org/forum/showthread.php?t=94328)
3.0.0 (http://www.vbulletin.org/forum/showthread.php?t=93195)

ericgtr
15 Aug 2006, 17:17
Neat, I have a slightly different use for this utilizing your code. I want unanswered topics to be highlighted, so I changed

<if condition="$thread['sticky'] == 1">


to

<if condition="$thread[replycount] == 0">


And walla! :)

Thanks, installed.

bongwater
24 Aug 2006, 14:20
I am running 3.6 Gold and I tried following your attached instructions by looking for the following line in the threadbit:

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


and it's not found. Can somebody tell me which string of text to find, if 3.6 gold differs from previous versions?

thanks

Andrew111888
26 Aug 2006, 03:55
I have just confirmed that with a default 3.6.0 gold template, that line is indeed in the threadbit template.

Perhaps your template is out of version?

bongwater
26 Aug 2006, 10:11
Hmm, I guess I must have been looking at the wrong template , because I found it! This was a quick easy one.

Thanks *clicks install*

Snake
30 Aug 2006, 17:23
Thanks for the hack! I'll install it right away... :)

StarBuG
20 Oct 2006, 18:54
I realy liked the Idea from ericgtr

I modified it a little further.

2 options:

1) Highlight only 0 reply threads but no stickies (that is my choice)

<if condition="$thread[replycount] != 0">
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<if condition="$thread['sticky'] == 1 AND $thread[replycount] == 0">
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="zeroreplybg" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>
</if>

and for the css

.zeroreplybg
{
background-color: #ebf0d2;
color: #000000;
}


2) highlight both (same colors)

<if condition="$thread[replycount] == 0 OR $thread['sticky'] == 1">
<td class="stickybg" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>

and for the css

.stickybg
{
background-color: #ebf0d2;
color: #000000;
}


Thx *install*

craig hughes
19 Nov 2006, 18:31
Great change...thanks

Nathan2006
25 Nov 2006, 02:42
Thanks Andrew ;)

Also works really well when using "Separate Sticky and Normal Threads"

Install

SirFlash
08 Mar 2007, 22:13
works on 3.6.4 thanks

anywares
09 Mar 2007, 13:41
Neat, I have a slightly different use for this utilizing your code. I want unanswered topics to be highlighted, so I changed

<if condition="$thread['sticky'] == 1">


to

<if condition="$thread[replycount] == 0">


And walla! :)

Thanks, installed.

same here :D

*installed*

Tri@de
16 Mar 2007, 09:41
There's a way to have this working for all forums/thread/posts?

DiSpy
24 Mar 2007, 19:33
I found this code in threadbit in v 3.6.5:


<td class="alt1Active" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">


and replaced it with this:


<if condition="$thread['sticky'] == 1">
<td class="stickybg" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1Active" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>


...and don't forget to add:


.stickybg
{
background-color: #hex;
color: #000000;
}


to your CSS style definitions (and replace #hex with a color).

Atakan KOC
26 Mar 2007, 07:41
Thanks....

mikewiemholt
24 Apr 2007, 07:08
Thanks a bunch - instead of using a bg color I used an image which was nice ;)

Thanks again,

iorkara
25 Apr 2007, 04:21
Great Thanks Clicks Install

Billspaintball
27 Apr 2007, 04:25
Handy little idea :)

dbembibre
18 May 2007, 09:43
To extend the background in 3.6.x to announce as in the image 35356

In ACP -> Styles & Templates -> Style Manager -> [desired style] -> Edit Templates -> threadbit_announcement

Find

<td class="alt2" colspan="$announcecolspan">


Change to

<td class="stickybg" colspan="$announcecolspan">



For 3.5 versión see the following post
http://www.vbulletin.org/forum/showpost.php?p=787101&postcount=13

obmob
13 Jun 2007, 16:13
Easy to use, thanks! :D

BTW: i think there is a typo in the install file it is this:

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

instead of this:

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

rooney72
15 Jun 2007, 04:53
I modified advanced .css

.stickybg
{
background-color: #hex;
color: #750B10;
}

But the color is still light blue and NOT red as I want it

yessir
23 Jun 2007, 12:50
bg color = cell color
color = text color

Dannyloski
29 Jul 2007, 03:28
I might add this, subscribed for when i get home i can insall ...

Gringos.com
30 Jul 2007, 18:41
Hey Guys -

I am trying to highlight the 'Sticky' thread topic but not sure how. Is this an FTP or CP (control panel) change? I want to draw attention to my 'Sticky' topics. I'm not a Geek so any details is very much appreciated.

Thanks

rapidphim
10 Aug 2007, 17:08
I am not able to read the txt file from here. Can some one please make it readable or post directly on the thread?

Also, is this compatible with 3.6.8?

rb290
24 Aug 2007, 22:12
Yea the .txt is hard to read!

DJ2492
25 Aug 2007, 23:00
This may be one of the dumbest questions ever but um well I am new to my vB Board and I was wondering where I would install the text that I got inside my text file :erm:

Tom_S
29 Aug 2007, 16:35
Nice addition ;)

rolloffhill
10 Sep 2007, 13:38
Works perfect.

frostyIntrepid
19 Sep 2007, 02:41
I did edit the css file and changed to #hex color but it doesn't seem to be reflecting on my forum.

Any idea guys?

jackiereitz
19 Sep 2007, 15:54
very quick and easy. Thanks

NeoAntrax
05 Oct 2007, 08:56
I did edit the css file and changed to #hex color but it doesn't seem to be reflecting on my forum.

Any idea guys?
I'm too :confused:

puregraf
26 Oct 2007, 18:51
here you go all, or you simply copy all from the notepad and open word pad and past and it will be perfect:

Different Cell Color for Stickies
by Andrew111888

In ACP -> Styles & Templates -> Style Manager -> [desired style] -> Edit Templates -> threadbit

Find the following line:

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

and replace it with the following:

<if condition="$thread['sticky'] == 1">
<td class="alt2" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>

####################################
####################################
####################################

If that is not enough of an offset, you could also do what I did.

========== STEP 1 ==========

In ACP -> Styles & Templates -> Style Manager -> [desired style] -> Edit Templates -> threadbit

Find the following line:

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

and replace it with the following:

<if condition="$thread['sticky'] == 1">
<td class="stickybg" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>

========== STEP 2 ==========

In ACP -> Styles & Templates -> Style Manager -> [desired style] -> Main CSS -> Additional CSS Definitions

Add the following declaration:

.stickybg
{
background-color: #hex;
color: #000000;
}

and simply replace hex with the desired hexcode.

RedGTiVR6
27 Feb 2008, 19:10
Anyone know if this will work with 3.7?

DieselMinded
09 May 2008, 03:38
Working Great on 3.7.0 Gold

KAWIE1
21 Jul 2008, 02:27
Thanks man! My second mod...:D

kpmedia
28 Jan 2010, 04:26
Works in vB 3.8.2