|
Post by crazynarutard on Dec 13, 2005 2:44:27 GMT
Well I posted in the thread @ chill out, but nobody even bothered to start adding some functions to it. So maybe posting it here would get some attention from the coders. To read more about the community project go HereHere's the code: <script type='text/javascript'>
var Post = new function() { var Rows = document.getElementsByTagName('tr'); this.Addsmilies = function(ar) { for( r = 0 ; r < Rows.length ; r ++ ) { if( Rows[r].cells[1] ) { if( Rows[r].cells[1].width == "70%" && Rows[r].cells[1].className == "windowbg2" && Rows[r].cells[0].innerHTML.match(/Add\sSmilies/) ) { if( ar ) { for( a = 0 ; a < ar.length ; a ++ ) { var Link = document.createElement('a'); var Image = document.createElement('img'); Image.src = arguments[0][0]; Image.border = 0; Link.href = 'javascript:add("%20'+ar[1]+'")'; Link.appendChild(Image); Rows[r].cells[1].appendChild( Link ); Rows[r].cells[1].appendChild( document.createTextNode(' ') ); } } } } } } }
</script>
Smiley adding goes something like this: Post.Addsmilies([['url','shortcut'],['url','shortcut'],['url','shortcut']]);I might make it so that the Array goes into a hash table so it would look easier to edit for the users. =P
|
|
|
Post by Xephra on Dec 13, 2005 13:31:35 GMT
It looks pretty good...I wish I had internet to waste my time. =(
|
|
|
Post by Eric on Dec 13, 2005 20:15:15 GMT
It looks pretty good...I wish I had internet to waste my time. =( lol, sorry that you don't have connection Once I get done with exams I'll be extending this some.
|
|
|
Post by pascanner(v4) on Dec 13, 2005 20:51:49 GMT
So where in this code does:
Post.Addsmilies([['url','shortcut'],['url','shortcut'],['url','shortcut']]);
That go
|
|
|
Post by crazynarutard on Dec 13, 2005 21:17:16 GMT
So where in this code does: Post.Addsmilies([['url','shortcut'],['url','shortcut'],['url','shortcut']]); That go You put that code in your footers and put Post.Addsmilies([['url','shortcut'],['url','shortcut'],['url','shortcut']]); right under it, in the same script tag.
|
|