Post by zando on Jun 16, 2006 4:29:27 GMT -8
This code will allow you to add a prefix to the thread subject of stickied subjects, locked subjects and stickylock subjects.
Preview
Board Footers
Edit Red
Cross-Browser
<script type="text/javascript">
<!--
/*
Lock, sticky and locked sticky thread prefix
Coded By Zando
*/
var announce="announcement.gif";
function ooo(source,text){
var tdz=document.getElementsByTagName("td")
for(z=0;z<tdz.length;z++){
if(tdz[z].width.match(/(48)|(43)%/) && tdz[z].className.match(/windowbg/) && tdz[z-1].width=="5%" && tdz[z-1].className.match(/windowbg2/)){
var an=tdz[z-1].getElementsByTagName("img")[0]
if(an.src.match(announce)){
}else{
var pic=tdz[z-2].getElementsByTagName("img")[0]
if(pic.src.match(source)){
var des=tdz[z].getElementsByTagName("font")[0].innerHTML
tdz[z].innerHTML="<font size='2'>"+text+" "+des
}
}}}}
ooo("locked.gif","Locked:"); //Delete this line if you do not want a locked prefix
ooo("sticky.gif","Sticky:"); //Delete this line if you do not want a sticky prefix
ooo("stickylock.gif","Sticky Lock:"); //Delete this line if you do not want a sticky lock prefix
//-->
</script>
Ok, where it has
announcement.gif
you must put the url of your annoucnemnt icon, however, just include the last part of the url, so instead of using
s2.images.proboards.com/announcement.gif
you would simply use
announcement.gif
In the line
ooo("locked.gif","Locked:");
you must replace
locked.gif
with the URL of the locked image (once again, just the last part of the URL)
You must replace the
Locked:
with the prefix that will appear before a locked subject.
You must do the same with the other two lines.
Preview
Board Footers
Edit Red
Cross-Browser
<script type="text/javascript">
<!--
/*
Lock, sticky and locked sticky thread prefix
Coded By Zando
*/
var announce="announcement.gif";
function ooo(source,text){
var tdz=document.getElementsByTagName("td")
for(z=0;z<tdz.length;z++){
if(tdz[z].width.match(/(48)|(43)%/) && tdz[z].className.match(/windowbg/) && tdz[z-1].width=="5%" && tdz[z-1].className.match(/windowbg2/)){
var an=tdz[z-1].getElementsByTagName("img")[0]
if(an.src.match(announce)){
}else{
var pic=tdz[z-2].getElementsByTagName("img")[0]
if(pic.src.match(source)){
var des=tdz[z].getElementsByTagName("font")[0].innerHTML
tdz[z].innerHTML="<font size='2'>"+text+" "+des
}
}}}}
ooo("locked.gif","Locked:"); //Delete this line if you do not want a locked prefix
ooo("sticky.gif","Sticky:"); //Delete this line if you do not want a sticky prefix
ooo("stickylock.gif","Sticky Lock:"); //Delete this line if you do not want a sticky lock prefix
//-->
</script>
Ok, where it has
announcement.gif
you must put the url of your annoucnemnt icon, however, just include the last part of the url, so instead of using
s2.images.proboards.com/announcement.gif
you would simply use
announcement.gif
In the line
ooo("locked.gif","Locked:");
you must replace
locked.gif
with the URL of the locked image (once again, just the last part of the URL)
You must replace the
Locked:
with the prefix that will appear before a locked subject.
You must do the same with the other two lines.