Post by deadlyassassin on Feb 4, 2006 5:49:38 GMT -8
The following code allows you to change the color of the stickies and announcement thread links if you want them to stand out more than usual. !
If your using the normal stick/lock images, then all you need to do is edit the hex color codes and place it in your Global Footer.
If not, then take your stick image url, it'll be something like
yourhost.com/yourfolder/sticky.gif
Take the red part and place it:
take your sticklock image url, it'll be something like yourhost.com/yourfolder/stickylock.gif
Preview: Click Here
Global or Baord Footers
<script type="text/javascript">
<!--
/* Diiferent Color Links For Sticky Threads, Announcements
By {XF}Äs$@§sîñ™, www.xf-clan.net/
Code from www.utopiangfx.proboards56.com/index.cgi */
// Edit where neccessary
var stickcolor = "#Hex Color"; // Sticky Link Color
var stickyhovercolor = "#Hex Color"; // Sticky Hover Link Color
var stickyImageRE = /(sticky|stickylock).(gif|png|jpg)$/i; // For Custom Images
var td = document.getElementsByTagName('td');
if(location.href.match(/\?board=\w+&?((mod\w+|page)=\d+)?$/)) {
for (i=0; i<td.length; i++) {
var iTarget = td.item(i).getElementsByTagName('img').item(0);
if (td.item(i).width == "5%" && iTarget && iTarget.src.match(stickyImageRE)) {
var lTarget = td.item(i).nextSibling.nextSibling.getElementsByTagName('a').item(0);
lTarget.style.color = stickcolor;
lTarget.onmouseover = function() {
this.style.color = stickyhovercolor;
}
lTarget.onmouseout = function() {
this.style.color = stickcolor;
}
}
}
}
//-->
</script>
01.28.11 Removed an extra comment tag. - Trublu
If your using the normal stick/lock images, then all you need to do is edit the hex color codes and place it in your Global Footer.
If not, then take your stick image url, it'll be something like
yourhost.com/yourfolder/sticky.gif
Take the red part and place it:
take your sticklock image url, it'll be something like yourhost.com/yourfolder/stickylock.gif
Preview: Click Here
Global or Baord Footers
<script type="text/javascript">
<!--
/* Diiferent Color Links For Sticky Threads, Announcements
By {XF}Äs$@§sîñ™, www.xf-clan.net/
Code from www.utopiangfx.proboards56.com/index.cgi */
// Edit where neccessary
var stickcolor = "#Hex Color"; // Sticky Link Color
var stickyhovercolor = "#Hex Color"; // Sticky Hover Link Color
var stickyImageRE = /(sticky|stickylock).(gif|png|jpg)$/i; // For Custom Images
var td = document.getElementsByTagName('td');
if(location.href.match(/\?board=\w+&?((mod\w+|page)=\d+)?$/)) {
for (i=0; i<td.length; i++) {
var iTarget = td.item(i).getElementsByTagName('img').item(0);
if (td.item(i).width == "5%" && iTarget && iTarget.src.match(stickyImageRE)) {
var lTarget = td.item(i).nextSibling.nextSibling.getElementsByTagName('a').item(0);
lTarget.style.color = stickcolor;
lTarget.onmouseover = function() {
this.style.color = stickyhovercolor;
}
lTarget.onmouseout = function() {
this.style.color = stickcolor;
}
}
}
}
//-->
</script>
01.28.11 Removed an extra comment tag. - Trublu