Post by Ross on Jul 27, 2006 15:27:19 GMT -8
Global Footer
Simply put, this allows members to use smilies (eg. in the titles of their threads. No editing required unless you have custom images; in which case just change the image URLs
<script type="text/javascript">
<!--
/* smileys in thread titles
by ross of 101support.proboards.com
please do not repost or redistribute */
var smiley_array = [
['', 'http://images.proboards.com/smiley.gif'],
['', 'http://images.proboards.com/wink.gif'],
['', 'http://images.proboards.com/sad.gif'],
['', 'http://images.proboards.com/rolleyes.gif'],
[':\'(', 'http://images.proboards.com/cry.gif'],
['', 'http://images.proboards.com/shocked.gif'],
['', 'http://images.proboards.com/tounge.gif'],
['', 'http://images.proboards.com/embarassed.gif'],
['', 'http://images.proboards.com/lipsrsealed.gif'],
['', 'http://images.proboards.com/kiss.gif'],
[';D', 'http://images.proboards.com/grin.gif'],
['', 'http://images.proboards.com/cheesy.gif'],
['', 'http://images.proboards.com/huh.gif'],
['', 'http://images.proboards.com/unsure.gif'],
['', 'http://images.proboards.com/cool.gif'],
['', 'http://images.proboards.com/angry.gif']
];
var a = document.getElementsByTagName('a');
smiley_array.reverse();
for(s=0; s<smiley_array.length; s++) {
smiley_array[0] = smiley_array[0].replace(/(\(|\)|\[|\]|\?|\*)/g, '\\$1');
smiley_array[0] = new RegExp(smiley_array[0], 'gi');
smiley_array[1] = '<img src="'+smiley_array[1]+'" border="0" />';
document.title = document.title.replace(smiley_array[0], '');
document.getElementsByTagName('font').item(1).innerHTML = document.getElementsByTagName('font').item(1).innerHTML.replace(smiley_array[0], '');
}
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(&?board=.+?(&page=\d+)?)?(#.+?)?$/) && !location.href.match(/ion=(display|(pm)?(calendar)?view|search2)/)) {
for(i=0; i<a.length; i++) {
if(a.item(i).href.match(/ion=display/)) {
for(s=0; s<smiley_array.length; s++) {
a.item(i).innerHTML = a.item(i).innerHTML.replace(smiley_array[0], smiley_array[1]);
}
}
}
}
//-->
</script>
Simply put, this allows members to use smilies (eg. in the titles of their threads. No editing required unless you have custom images; in which case just change the image URLs
<script type="text/javascript">
<!--
/* smileys in thread titles
by ross of 101support.proboards.com
please do not repost or redistribute */
var smiley_array = [
['', 'http://images.proboards.com/smiley.gif'],
['', 'http://images.proboards.com/wink.gif'],
['', 'http://images.proboards.com/sad.gif'],
['', 'http://images.proboards.com/rolleyes.gif'],
[':\'(', 'http://images.proboards.com/cry.gif'],
['', 'http://images.proboards.com/shocked.gif'],
['', 'http://images.proboards.com/tounge.gif'],
['', 'http://images.proboards.com/embarassed.gif'],
['', 'http://images.proboards.com/lipsrsealed.gif'],
['', 'http://images.proboards.com/kiss.gif'],
[';D', 'http://images.proboards.com/grin.gif'],
['', 'http://images.proboards.com/cheesy.gif'],
['', 'http://images.proboards.com/huh.gif'],
['', 'http://images.proboards.com/unsure.gif'],
['', 'http://images.proboards.com/cool.gif'],
['', 'http://images.proboards.com/angry.gif']
];
var a = document.getElementsByTagName('a');
smiley_array.reverse();
for(s=0; s<smiley_array.length; s++) {
smiley_array
smiley_array
smiley_array
document.title = document.title.replace(smiley_array
document.getElementsByTagName('font').item(1).innerHTML = document.getElementsByTagName('font').item(1).innerHTML.replace(smiley_array
}
if(location.href.match(/\.com\/?(index.cgi)?\??(&?action=home)?(&?board=.+?(&page=\d+)?)?(#.+?)?$/) && !location.href.match(/ion=(display|(pm)?(calendar)?view|search2)/)) {
for(i=0; i<a.length; i++) {
if(a.item(i).href.match(/ion=display/)) {
for(s=0; s<smiley_array.length; s++) {
a.item(i).innerHTML = a.item(i).innerHTML.replace(smiley_array
}
}
}
}
//-->
</script>