Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Mar 22nd, 2018, 06:59am

Board Hacks
Important News
Please read the notes posted with any codes carefully, as they will usually tell you where they need to go.
Welcome to the Conforums Hacks Board!

All codes here have been tested but we accept no responsibility if these codes do not work on your board, or have an adverse effect when used in combination with other codes.

This board is read only. Any queries or requests for codes should be made on the Coding Forum

Helpful sites
Dynamic Drive

The Staff

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Add extra smilies with originals.  (Read 2900 times)
I've always wanted one of these wink
Conforums Administrator

member is offline


Mr Fixit...

Homepage PM

Gender: Male
Posts: 17664
xx Add extra smilies with originals.
« Thread started on: Aug 30th, 2005, 03:41am »

<script language="javascript" type="text/javascript">
// Add Extra Smilies to originals in Post Box
// Coded by Dave -

var smilie = new Array();
var censor = new Array();
var tds = document.getElementsByTagName('td');
//Contains URLs of extra Smilies and censored words

smilie[0] = "";
censor[0] = ":thumb:";

var ftloc = (location.href.match(/imshow/)) ? 2 : 3;
function addsmile(smile,image){
var sm = new RegExp(smile,"g");
for(ji=0;ji<tds.length; ji++){
if(tds[ji].width=="80%" && tds[ji].height=="100%"){
tds[ji].getElementsByTagName('FONT')[ftloc].innerHTML = tds[ji].getElementsByTagName('FONT')[ftloc].innerHTML.replace(sm,'<img src="'+image+'" border="0">');

if (location.href.match(/=post|reply|modify|quote|imsend/) && !location.href.match(/modify2/)) {
for(k=0; k<smilie.length; k++){
document.getElementById('extrasmilie').innerHTML+= (smilie[k] == "<br>") ? "<br />" : "<a href=javascript:add('%20"+censor[k]+"')><img src= "+smilie[k]+" align=bottom alt= "+censor[k]+" border='0'></a> ";
}} else {
for(kl=0; kl<smilie.length; kl++){

This code goes in the Global Footers.

This code should now be 100% cross browser compatible, although it will not convert the censored words on the post preview page.

If you want the smilies to appear in a new line, then insert a <br> tag into the smilie array and make the censor array empty for that value.



This code goes in all footers..

To see a preview of this code's effects Click Here
User IP Logged

Have you read the FAQ or checked the Hacks board before posting?
Then please do so...
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls