|
Post by FireIndy on Mar 9, 2007 0:40:49 GMT
Ok, this is kinda of new stuff to me but here it goes. This adds an icon in posting forms. It looks up a word on Dictionary.com You type:
[dictionary=Word to Lookup]Actual Text they will see[/dictionary]
It adds a link to the text between the the [dictionary] tags. So when clicked, it takes u too the definition of the text after the "=" sign on Dictionary.com
Global Footer
<script> <!--
/* Dictionary.com Lookup Code By FireIndy. May not be reposted or edited unless stated by author elsewise. */ var dictionB = "http://img63.imageshack.us/img63/5430/dfordictionaryyf7.gif"; if(document.postForm && document.postForm.color) { document.postForm.color.parentNode.innerHTML+="<a href=javascript:add(\"[dictionary=Text]\",\"[/dictionary]\")><img src=\""+dictionB+"\" alt=\"Dictionary.com Lookup\" border=\"0\"></a>"; }
if(!document.postForm){ var td = document.getElementsByTagName('td'); for(x=0;x<td.length;x++){ if(td.item(x).innerHTML.match(/\[dictionary=(.+?)\](.+?)\[\/dictionary\]/gi)){ var i1 = td.item(x).innerHTML.match(/\[dictionary=(.+?)\](.+?)\[\/dictionary\]/gi).length; for(i=0;i<i1;i++){ td.item(x).innerHTML = td.item(x).innerHTML.replace(/\[dictionary=(.+?)\](.+?)\[\/dictionary\]/gi, "<a href='http://dictionary.reference.com/browse/$1'>$2 - <i>Dictionary.com Definition</i></a>"); } } } } //--> </script>
|
|