Log in

View Full Version : Different Cell Color for Stickies


Andrew111888
08-14-2005, 10:00 PM
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 (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)

RoryF
08-15-2005, 08:08 AM
Installs, thanks :)

turksengel
08-15-2005, 08:28 AM
thanks good idea ;)

jugo
08-15-2005, 12:27 PM
Great idea.

/me installs.

Andrew111888
08-15-2005, 04:35 PM
Thanks ;).

Floris
08-16-2005, 05:35 PM
Cool, I like this! Tnx for sharing.

alwafi
08-16-2005, 11:58 PM
thanks it's nice

ehjay
08-18-2005, 03:24 AM
Mm, is it possible to have the color appear when announcements are unread -- and then have it revert to standard cell coloring once the user has read that announcement?

might be interesting to look into.

quasel
08-18-2005, 04:59 AM
nice one

Gizmo5h1t3
08-19-2005, 04:24 PM
nice addition, installed

Kirk Y
08-20-2005, 03:10 PM
Cool. How could we do this for Announcements?

Edit: Nevermind, I figured it out.

Andrew111888
08-20-2005, 04:26 PM
Yeah, that would just be editing the announcement template :).

dbembibre
10-05-2005, 01:13 PM
If you want make the same with anouncement make de following
Edit forumdisplay_announcement

Search this

<td class="alt2" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">6<else /><if condition="!$show['threadicons'] AND !$show['inlinemod']">4<else />5</if></if>">
<div>


Replace with this:

<td class="stickybg" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">6<else /><if condition="!$show['threadicons'] AND !$show['inlinemod']">4<else />5</if></if>">
<div>

MichaelJM13k
10-06-2005, 05:53 AM
How would i go about making the word 'sticky' <i> and <b> like yours?

dbembibre
10-06-2005, 12:52 PM
How would i go about making the word 'sticky' <i> and <b> like yours?

Edit the sticky_thread_prefix phrase with your HTML codes

<b><font color="red">Sticky: </font></b>

RaceJunkie
10-06-2005, 05:20 PM
Installed

ggiersdorf
10-07-2005, 09:56 AM
dosent work in my 3.5 Gold nothing changes..

Kaliyoda
10-07-2005, 12:01 PM
Works great here in my 3.5 Gold - Installed - many thanks :D

PennylessZ28
10-08-2005, 01:00 AM
No work on gold, background is a just white, but not the color I programed.

PennylessZ28
10-08-2005, 01:04 AM
Works

ggiersdorf
10-08-2005, 10:44 AM
care to explain what you changed? I cant get it to work on my theme never changes colors..

Quillz
10-08-2005, 05:10 PM
Just installed it to my 3.5.0 test board! Great hack!

nUCLEArcENTURy
10-08-2005, 10:54 PM
Edit the sticky_thread_prefix phrase with your HTML codes

<b><font color="red">Sticky: </font></b>
Hi, where can i find sticky_thread_prefix?

Andrew111888
10-08-2005, 11:33 PM
Hi, where can i find sticky_thread_prefix?

It's a phrase as stated.

TygerTyger
10-09-2005, 10:33 AM
This works fine on Gold (not tried assigning a specific colour). Thanks! Installed.

Aeolian_X
10-09-2005, 02:57 PM
How do you assign a specific color? Mine color that was chosen is too dark for the font color.

Aeolian_X
10-09-2005, 03:19 PM
The color seems to come from your table border setting. Only problem is, I can't change the link font color without changing it for everything.

italks
10-10-2005, 10:48 AM
Installed thanks.

ggiersdorf
10-11-2005, 09:46 PM
wow the support for this is great, Id love to use it but no one seems to respond.. As stated by Aeolian_X I cannot get it to change either..

Andrew111888
10-11-2005, 11:35 PM
As I don't have a 3.5.0 Gold board and the admin demo is still only 3.0.7 I cannot test this hack to provide support.

But when half of the people say it works and the other half says it doesn't, I don't know how I'd provide support anyway.

LJR
10-15-2005, 04:47 PM
Okay, and taking into consideration that I am thicker than a whale omlette, where can I find the sticky_thread_prefix bit?

Cheers

Andrew111888
10-15-2005, 06:35 PM
....

It's a phrase as stated.

LJR
10-15-2005, 11:25 PM
Okay, so we've established it's a phrase.

Now...where is it?

I can't find any reference to it in the templates or style sheets. So I am somewhat bemused. Mind you, this is only my first day with vBulletin.

Andrew111888
10-16-2005, 02:18 AM
As it's a phrase, Admin CP -> Languages & Phrases -> Phrases would probably be a good place to look ;).

LJR
10-16-2005, 10:19 AM
Doh!

Thank you so much. I found it. I'm sorry but I just didn't realise the meaning of "it's a phrase". So I have learned two things here.

Great mod/hack/whatever they call them here.

Thanks!!!!

Andrew111888
10-16-2005, 12:14 PM
No problem :).

TOZ
11-22-2005, 10:30 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.

I wanted to do something like this:
http://www.ls1tech.com/forums//forumdisplay.php?f=80

Andrew111888
11-23-2005, 02:53 AM
Are you changing #hex to a numerical hexcode value? Like #000000.

manguish
11-26-2005, 08:51 AM
3.5.1 - same here - background goes white, and text goes to the colour defined in the css.

da420
11-26-2005, 06:31 PM
Its not working for me for some reason in my v3.5.1...

I replace this line in threadbit:

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

With this line:

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

and then I go to the CSS definitions, and add this to the code at the bottom:

.stickybg
{
background-color: #00FF00;
color: #000000;
}

I would much appreciate some help, Thanks!

manguish
11-27-2005, 07:45 AM
I did this :


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

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


Worked well with my scheme too :D

manguish
11-27-2005, 07:45 AM
Its not working for me for some reason in my v3.5.1...

I replace this line in threadbit:

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

With this line:

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

and then I go to the CSS definitions, and add this to the code at the bottom:

.stickybg
{
background-color: #00FF00;
color: #000000;
}


I would much appreciate some help, Thanks!

Change the red bit to say :

stickybg

Andrew111888
11-27-2005, 07:06 PM
Its not working for me for some reason in my v3.5.1...

I replace this line in threadbit:

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

With this line:

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

and then I go to the CSS definitions, and add this to the code at the bottom:

.stickybg
{
background-color: #00FF00;
color: #000000;
}


I would much appreciate some help, Thanks!

The following will fix your issue:

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

You defined stickybg but you weren't utilizing it.

AWI
12-08-2005, 08:50 AM
Works on 3.5.2, I was looking for something like this thanks

dieselpowered
12-11-2005, 04:10 PM
Woks just fine on 3.5.2 :)

Thanks!

LBSources
12-17-2005, 12:41 AM
great thanks..

ReZ
12-27-2005, 03:56 PM
I followed the instructions correctly, but i can't get this to work.
Even when i define my hex code, the cell background keeps showing up as black.
Has anyone else got this to work with 3.5.2.?

Andrew111888
01-02-2006, 11:39 PM
Numerous people have said it works with 3.5.2.

You have some incorrect code somewhere.

Club3G
01-15-2006, 04:14 PM
I removed the hex line altogether to make it work, and just changed the color code to my background.

Edit: And threw up my own spin on it here:

https://vborg.vbsupport.ru/showthread.php?p=874196

QueenBee
01-15-2006, 05:56 PM
when the regular one it it was fine. but it was too broght for me, so i tried the color one. it froze up my board.:(

::clicks uninstall::

Andrew111888
01-20-2006, 09:07 PM
If it froze your board, you did not follow my instructions. I can guarantee you if my code was installed correctly it will not freeze your board ;).

Hell, I don't even know if incorrect HTML can freeze your board...

abadired
01-29-2006, 06:15 AM
Thanks! installed perfectly on 3.5.3 :D

kallelm
02-03-2006, 07:02 PM
Only my stupidty kept me from installing this correctly.

Works fine on 3.5.3

Thank you!

LiveMicSociety
02-18-2006, 07:29 PM
Installed :up:

Cedric_FP
02-24-2006, 12:09 AM
Brilliant stuff.

BabyNameAddict
03-06-2006, 03:46 PM
Instead of using the different cell color, I simply changed the text to Pinned and made it a different color (and bold). So thanks for that tip!

Nathan2006
03-09-2006, 03:38 PM
Nice idea

Thank you

Install*

Evil Chris
07-11-2006, 12:53 PM
I ended up just changing the phrase and not the subject mod.
Thanks.

BuRNZau
08-10-2006, 07:14 AM
Any chance of an updated version for vB v3.6.0?

When I install this version on vB v3.6.0 AJAX inline thread title editing stops working. :(

Andrew111888
08-14-2006, 03:53 PM
I'll look into it :).

Andrew111888
08-14-2006, 04:07 PM
This has now been released for 3.6.0:

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

DigitalDesktops
08-14-2006, 06:16 PM
Any way of changing the cells next to it for a sticky too? gave it my own shot but screamed as i saw 6 or so error messages and no posts in forums =S

Note: haven't skimmed a lot as am very busy so if it's in another thread just link me =)

Andrew111888
08-14-2006, 07:33 PM
In the threadbit template, simply find the desired <td>'s you're looking for and use the conditional:


<if conditional="$thread['sticky'] == 1">
// sticky td
<else />
// normal td
</if>

DigitalDesktops
08-14-2006, 07:46 PM
hmm ok, gave it a go, problem is some of it is already within an if tag and as a result returns:
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/outrider/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 67

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

EDIT:

Got it working, had to however use this instead (kinda different to what you said, as i can't seem to embed ifs together very well.

Here's a sample


<!-- NEW LATEST POST COLUMN FOR STICKY -->

<if condition="$show['threadmoved']">
<td class="alt2" align="center">-</td>

<else />




<if condition="$thread['sticky'] == 1">
<td class="stickybg" 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>


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


Note: this doesn't make it look perfect once moved, so don't use it if you can think of something better =)

Andrew111888
08-15-2006, 05:43 PM
I'll look into it tonight, though really, it shouldn't be difficult...

danward
03-07-2007, 01:54 PM
Installed on my board and works a treat! Had to alter it slightly to work on 3.6.4 but thanks for the mod its great! :)