PDA

View Full Version : Sticky Background Color Change with Rollover Effect


Chris-777
17 Jan 2006, 23:44
Sticky Background Color Change with Rollover Effect

This mod takes from the following two releases:
Live Wire's Forumhome Mouseover Effect Mod. (http://www.vbulletin.org/forum/showthread.php?t=92600)
Andrew111888's Sticky Background color Mod. (http://www.vbulletin.org/forum/showthread.php?t=94328)

I've taken bits from both and combined them, and take no credit for the original idea of either, save that I'm doing them both. It's my first attempt at a release and should be considered beta until checked out by more experienced Coders than myself.

What it does: Changes the background color of sticky threads, with a mouseover effect:

Time to install: 5 minutes
Difficulty: Easy
Templates: 1
CSS Edit: 1
Demo: Here (http://www.sevenstring.org/forum/forumdisplay.php?f=23)
Tested: IE, Maxthon, Firefox

Updated: 1.0.1: Fixed a bug where it wasn't showing thread preview for non-sticky threads.

ACP -> Styles & Templates -> Style Manager -> Edit Templates -> Threadbit

Find:

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


Replace with:

<!-- Sticky Rollover Color -->
<if condition="$thread['sticky'] == 1">
<td class="stickybg" id="td_title_$thread[realthreadid]" title="$thread[preview]" onmouseover="this.className='stickyover';" onmouseout="this.className='stickybg';">
<else />
<td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">
</if>
<!-- /Sticky Rollover Color -->


ACP -> Styles & Templates -> Style Manager -> Style Name -> Main CSS -> Additional CSS Definitions

You will need to add these two declarations:

The normal background color, change #333333 to your desired background color:


.stickybg
{
background-color: #333333;
}


And the mouseover color, change #444444 to your desired highlight color:


.stickyover
{
background-color: #444444;
}


Screenshot attached.

Please Click https://www.vbulletin.org/forum/ (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=105597) if you're using this. Thanks!

Note: This does NOT effect any ajax functionality.

creedmaniac
18 Jan 2006, 01:18
how would i change this to make all posts do this, not just stickies

Chris-777
18 Jan 2006, 01:25
how would i change this to make all posts do this, not just stickies

http://www.vbulletin.org/forum/showthread.php?t=92600

Of note, that mod worked for my forumhome, but for some reason, viewing the forum lists via category view broke the mouseout, so when I rolled the mouse off, the background of the cell would turn black. I seem to be the only person noticing the behavior however.

Snake
18 Jan 2006, 14:32
Hey thanks for the mod.

Danny Diamond
09 Feb 2006, 01:16
installed thanks

sandalwood
01 Apr 2006, 03:48
does this affect the ajax function, where moderator can doubleclick to edit titles? the other thread mentions that this is the case. and i don't like missing that feature.

sandalwood
01 Apr 2006, 05:13
okie doke, confirmed that this does not affect ajax :)
cool thanks installed

Chris-777
28 Apr 2006, 16:14
Thanks. :)

I'll edit the original post to reflect it - apologies for not answering the question sooner.

rrr
28 Apr 2006, 16:58
Is there a way to make this go across all the columns instead of just the thread title column?

Chris-777
06 Jul 2006, 15:11
Not that I'm aware of, at least not with my method, since I'm doing it within the cell.

NetworkTown.Net
09 Jul 2006, 16:33
Have you got a update for 3.5.4?

Chris-777
13 Jul 2006, 14:57
This works for 3.5.4.

Chicago_VLNU_4s
03 Sep 2006, 10:45
doesn't work for me :/

Tri@de
01 Mar 2007, 08:41
There's a way to make also all the other posts work like this?

ekool
30 Nov 2007, 16:29
I don't think this works with 3.6.8 -- any updates?

SBlueman
02 Jan 2011, 19:26
The default color is being determined by the table border css on my end. I can't seem to make this a different color