Log In · Register

 
 
Closed TopicStart new topic
smilies in comments
cherryish
post Jan 29 2004, 06:56 PM
Post #1


Newbie
*

Group: Member
Posts: 2
Joined: Jan 2004
Member No: 1,900



how can you use your own smilies in the comments section? i've seen xangas using their own smilies for the person to comment with. does that make sense? _unsure.gif
 
Maria
post Jan 30 2004, 01:16 AM
Post #2


Senior Member
***

Group: Member
Posts: 70
Joined: Jan 2004
Member No: 969



you could use this:

<!-- -----smiley collection below -->
<script type="text/javascript">
//
// *** Smiley Script V 2.2 ***
//
// ©2003 by EasterEgg, http://www.xanga.com/easteregg
//
// You can use this code freely, as long as the entire script remains intact.
//
// WHAT'S NEW?
//
// 1.0 (February 11, 2003)
// - initial release
//
// 2.0 (May 12, 2003)
// - cross browser: it runs in IE, Netscape, Mozilla and Opera
// - ready for the upcoming (beta tested) changes at Xanga
// - clickable smileys, even for non-IE users, displayed in buttons
// - customizable number of smileys displayed in one row
// - customizable smiley button size
// - easily adjustable: only two arrays to maintain
//
// 2.1 (May 12, 2003)
// - preloading images for faster performance
// - XP Bugfix
//
// 2.2 (May 17, 2003)
// - necessary adjustments made because of recent changes at Xanga
// - made suitable for Mac users!
// - runs only at the comment page for increased performance
//
// HOW TO USE:
// For use at Xanga only. Copy this entire code (including the script tags)
// and paste in the Website Stats box at your Look and Feel page. Make sure
// the previous version of this script (if any) is completely removed first.
//
// The script contains two arrays: "textSmileys" and "realSmileys". The items
// present in the array "textSmileys" will be automatically replaced with the
// corresponding images in the array "realSmileys". You can modify the arrays
// as you see fit, as long as both arrays keep the exact same number of items.
//
// For example, suppose you want to add some smiley to the script... that would mean
// in "textSmileys" you would add a shorthand like ":some_smiley:" or {somesmiley},
// and in "realSmileys" you would add it's url: "http://www.dude.com/some_smiley.gif".
//
// SETTINGS:
// - "maxNumberOfSmileysPerRow": number of smileys that will be displayed in one row.
// Smileys above that number will automatically be added to a new line. 10 by default.
// - "buttonSize": size of the smiley buttons in pixels. 30 px by default.
//
// AVAILABILITY:
// The script has been tested in the latest versions of IE, Netscape,
// Mozilla and Opera (Windows 98).
//

function typeSmiley(sSmiley)
{
if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
var editor = document.getElementsByTagName('textarea')[0];
else
{
var allTextAreas = document.getElementsByTagName('textarea');
for (i = 0; i < allTextAreas.length; ++i)
{
if (allTextAreas[i].getAttribute('name') == 'bdescr')
{
var editor = allTextAreas[i];
break;
}
}
}
editor.value = editor.value + sSmiley;
}

function replaceTextSmileys()
{
// ***add textual emoticons to the array below
var textSmileys = new Array(
":)",
":(",
"wink",
":p",
":lol:",
":mad:",
":heartbeat:",
":love:",
":eprop:",
":wave:",
":sunny:",
":wha:",
":yes:",
":sleepy:",
":rolleyes:",
":lookaround:",
":eek:",
":confused:",
":nono:",
":fun:",
":goodjob:",
":giggle:",
":cry:",
":shysmile:",
":jealous:",
":whocares:",
":spinning:",
":coolman:",
":littlekiss:",
":laugh:");

// *** add the url's from the corresponding images below
var realSmileys = new Array(
"http://www.xanga.com/Images/smiley1.gif",
"http://www.xanga.com/Images/smiley2.gif",
"http://i.xanga.com/Alice/AliceSmileyAnimatedWink.gif",
"http://www.xanga.com/Images/smiley4.gif",
"http://i.xanga.com/Alice/Smileylol.gif",
"http://i.xanga.com/Alice/7_mad.gif",
"http://i.xanga.com/Alice/heartbeating.gif",
"http://i.xanga.com/Alice/SmileLove.gif",
"http://i.xanga.com/Alice/eProp.gif",
"http://i.xanga.com/Alice/SmileyWave.gif",
"http://i.xanga.com/Alice/sunnySmiley.gif",
"http://i.xanga.com/Alice/wha.gif",
"http://i.xanga.com/Alice/yes.gif",
"http://i.xanga.com/Alice/Smileysleep.gif",
"http://i.xanga.com/Alice/Smileyrolleyes.gif",
"http://i.xanga.com/Alice/SmileyLookaround.gif",
"http://i.xanga.com/Alice/Smileyeek.gif",
"http://i.xanga.com/Alice/Smileyconfused.gif",
"http://i.xanga.com/Alice/SmileyAnimatedNoNo.gif",
"http://i.xanga.com/Alice/propeller.gif",
"http://i.xanga.com/Alice/goodjob.gif",
"http://i.xanga.com/Alice/emot-giggle.gif",
"http://i.xanga.com/Alice/blueAnimatedCry.gif",
"http://i.xanga.com/Alice/Animatedshysmile.gif",
"http://i.xanga.com/Alice/AliceJealous.gif",
"http://i.xanga.com/Alice/19_indifferent.gif",
"http://i.xanga.com/Alice/Smileyspinning.gif",
"http://i.xanga.com/Alice/25_coolguy.gif",
"http://i.xanga.com/Alice/AliceSmileyAnimatedBlinkKiss.gif",
"http://i.xanga.com/Alice/LaughingAgua.gif");

// *** number of smileys that will be displayed per row
var maxNumberOfSmileysPerRow = 10;

// *** button size in pixels
var buttonSize = 30;

// preloading images
var preloadedImages = new Array(realSmileys.length);
for (i = 0; i < preloadedImages.length; ++i)
{
preloadedImages[i] = new Image();
preloadedImages[i].src = realSmileys[i];
}

var allTableData = document.getElementsByTagName('td');
var indx;
var smiley;
var replacement;

for (var i = 0 ; i < allTableData.length ; ++i )
{
for ( var n = 0 ; n < textSmileys.length; ++n )
{
if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
(allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
{
indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
if (indx != -1)
{
while (indx != -1)
{
replacement = '';
indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
smiley = '<img src=\"' + realSmileys[n] + '">'
replacement = allTableData[i].innerHTML.replace(textSmileys[n],smiley);
allTableData[i].innerHTML = replacement;
}
}
}

}
}

if (document.URL.indexOf('weblogs') != -1)
{
var smileyCollection = new Array(realSmileys.length);
var smileyBar = '';

if (document.getElementById('htmleditor'))
{
for (i = 0; i < smileyCollection.length; ++i)
{
smileyCollection[i] = '<button type="button" value="" ' +
'style="width:' + buttonSize + 'px; height:' +
buttonSize + 'px;" onclick="java script:insertHTML(\' ' +
textSmileys[i] + '\'); return false;">' +
'<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
'"></button>';
}
}
else
{
for (i = 0; i < smileyCollection.length; ++i)
{
smileyCollection[i] = '<button type="button" value="" ' +
'style="width:' + buttonSize + 'px; height:' +
buttonSize + 'px;" onclick="java script:typeSmiley(\' ' +
textSmileys[i] + '\'); return false;">' +
'<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
'"></button>';
}
}


for (i = 0; i < smileyCollection.length; ++i)
{
if (i != 0)
if ( (i/maxNumberOfSmileysPerRow).toString().indexOf('.') == -1)
smileyBar = smileyBar + '<BR>';
smileyBar = smileyBar + smileyCollection[i];
}

// add SmileyBar
infoLink = '<a href="http://www.alicewoodrome.com/smileyscript.html"' +
'target=blank><font style="font-size: xx-small; font-weight: normal;">' +
'Smiley Script</font><a/><br><br>';
smileyBarHtml = '<br><b>Add Emoticons</b><br><font style="font-size: xx-small">' +
'Simply add emoticons to your comments by clicking them!</font> ' +
infoLink + smileyBar + '<br><br>';

if (navigator.userAgent.indexOf('Mac') == -1)
{
if (document.getElementById('htmleditor'))
var obj1 = document.getElementById('htmleditor').parentNode;
else
{
if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
var obj1 = document.getElementsByTagName('textarea')[0].parentNode;
else
{
var allTextAreas = document.getElementsByTagName('textarea');
for (i = 0; i < allTextAreas.length; ++i)
{
if (allTextAreas[i].getAttribute('name') == 'bdescr')
{
var obj1 = allTextAreas[i].parentNode;
break;
}
}
}
}
var obj2 = document.createElement('span');
obj2.setAttribute('ID','idSmileyBar');
obj2.innerHTML = smileyBarHtml;
obj1.insertBefore(obj2,obj1.firstChild);
}
else
{
// alternative solution for the Mac
for (var i = 0 ; i < allTableData.length ; ++i )
{
if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
(allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
{
if (allTableData[i].innerHTML.toUpperCase().indexOf('(OPTIONAL)') != -1)
{
var temp = allTableData[i].innerHTML;
allTableData[i].innerHTML = temp + '<br>' + smileyBarHtml;
break;
}
}
}
}
}

}
if (document.URL.indexOf('weblogs') != -1)
replaceTextSmileys();
</script>

<!-- ---smiley collection above-->

wink.gif
 
Your_Lord_And_Ma...
post Jan 30 2004, 01:44 AM
Post #3


Horror Punk
***

Group: Member
Posts: 32
Joined: Jan 2004
Member No: 1,596



Very nice script, though, it would be better if you could use the smiley's from here laugh.gif They're just so damned cute..Heh.
 
Your_Lord_And_Ma...
post Jan 30 2004, 01:53 AM
Post #4


Horror Punk
***

Group: Member
Posts: 32
Joined: Jan 2004
Member No: 1,596



Mm..Would it be ok to use these smilies? _unsure.gif Peas? innocent.gif
 
Maria
post Jan 30 2004, 01:58 AM
Post #5


Senior Member
***

Group: Member
Posts: 70
Joined: Jan 2004
Member No: 969



yeah, that would be nice wouldn`t it? i just thought of that now .. haha
 
Fe_LL
post Jan 30 2004, 10:13 AM
Post #6


Senior Member
*****

Group: Member
Posts: 372
Joined: Jan 2004
Member No: 813



You could use the ones here, but that would use the sites banwidth if you link directly.

But yeah, just change that long list of urls in the code and it should work. happy.gif
 
lemmonii
post Jan 30 2004, 12:21 PM
Post #7


whoa...lol
**

Group: Member
Posts: 17
Joined: Jan 2004
Member No: 1,974



actually...i found this xanga site with the same exact smilies plus but i havent been able to get it yet because my IE is having some technical difficulties trying to view source...i'll try to get the source asap...i like these smilies too cuz the ones from xanga sorta suck..shh!! dont tell...lol
 
Your_Lord_And_Ma...
post Jan 30 2004, 12:30 PM
Post #8


Horror Punk
***

Group: Member
Posts: 32
Joined: Jan 2004
Member No: 1,596



Yay! thumbsup.gif I love these lil guys..
 
lido_lep
post Feb 1 2004, 04:10 AM
Post #9


Straight river, Not Circled Lake
***

Group: Member
Posts: 39
Joined: Jan 2004
Member No: 1,727



where do i put this?
 
lemmonii
post Feb 1 2004, 06:35 PM
Post #10


whoa...lol
**

Group: Member
Posts: 17
Joined: Jan 2004
Member No: 1,974



lido lep: u put the script under webstats in ur claf aka "look and feel"

so as i promised here are the smilies that are identical to the ones on this site...however...this script is missing some ie. yawn.gif xmas.gif worthy.gif thumbsup.gif throb.gif sick.gif showoff.gif pooh.gif hammer.gif group.gif flowers.gif fallen.gif console.gif boxing.gif and wub.gif ...i might have missed some... but to make up for it there are other faces besides the one on this site...you might want to check the original sites that the smilies came from (embedded in script). please respect the person who arranged these smilies by keeping the entire script intact. btw i didnt create this script so be extra careful, or else i wouldnt care that much...so keep those hands busy and dont delete the unessary. thank you

CODE
<!-- begin code provided by createblog.com -->

<script type="text/javascript">
//
// *** Smiley Script Jiangsta21 Edition ***
// http://www.xanga.com/JiAnGsTa21
// http://www.freewebs.com/JiAnGsTa21
//
// You can use this code freely, as long as the entire script remains intact.
//
// WHAT'S NEW?
// - Reloaded on: 01.07.04
// - clickable smileys, even for non-IE users, displayed in buttons
// - customizable smiley button size
// - easily adjustable: only two arrays to maintain
// - preloading images for faster performance
// - made suitable for Mac users!
// - runs only at the comment page for increased performance
// - fixed problem which changed =) to a 2nd emoticon on the comment page of weblog. Now, it will only appear on the comment
// HOW TO USE:
// For use at Xanga only. Copy this entire code (including the script tags)
// and paste in the Website Stats box at your Look and Feel page.
//
// The script contains two arrays: "textSmileys" and "realSmileys". The items
// present in the array "textSmileys" will be automatically replaced with the
// corresponding images in the array "realSmileys". You can modify the arrays
// as you see fit, as long as both arrays keep the exact same number of items.
//
// For example, suppose you want to add some smiley to the script... that would mean
// in "textSmileys" you would add a shorthand like ":some_smiley:" or {somesmiley},
// and in "realSmileys" you would add it's url: "http://www.dude.com/some_smiley.gif".
//
// SETTINGS:
// - "maxNumberOfSmileysPerRow": number of smileys that will be displayed in one row.
// Smileys above that number will automatically be added to a new line. 10 by default.
// - "buttonSize": size of the smiley buttons in pixels. 30 px by default.
//
// AVAILABILITY:
// The script has been tested in the latest versions of IE, Netscape,
// Mozilla and Opera (Windows 98).
//
function typeSmiley(sSmiley)
{
   if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
       var editor = document.getElementsByTagName('textarea')[0];
   else
   {
       var allTextAreas = document.getElementsByTagName('textarea');
       for (i = 0; i < allTextAreas.length; ++i)
       {
           if (allTextAreas[i].getAttribute('name') == 'bdescr')
           {
               var editor = allTextAreas[i];
               break;
           }
       }
   }
   editor.value = editor.value + sSmiley;
}
function replaceTextSmileys()
{
   // ***add textual emoticons to the array below
   var textSmileys = new Array(
       ":blink:",
       ":rolleyes:",
       ":sweatingbullets:",
       ":unsure:",
       ":wacko:",
       ":bookread:",
       ":bounce:",
       ":hypo:",
       ":hug:",
       ":kicking:",
       ":shifty:",
       ":shutup:",
       ":wave:",
       ":biggrin:",
       ":cooll:",
       ":crazy:",
       ":dry:",
       ":happyy:",
       ":huh:",
       ":kisss:",
       ":laugh:",
       ":mad:",
       ":mellow:",
       ":ohmy:",
       ":sadd:",
       ":sleep:",
       ":smile:",
       ":tongue:",
       ":tongue2:",
       ":wink:",
       ":w00t:",
       ":angryy:",
       ":blushing:",
       ":censoredd:",
       ":chicken:",
       ":cry:",
       ":devil:",
       ":disgust:",
       ":ermm:",
       ":flowers:",
       ":geek:",
       ":innocent:",
       ":king:",
       ":nugget:",
       ":nuke:",
       ":pease:",
       ":phone:",
       ":rasberry:",
       ":saddd:",
       ":sleeping:",
       ":surrender:",
       ":teehee:",
       ":thumbsup:",
       ":whistling:",
       ":pirate:",
       ":homestar:",
       ":strongbad:",
       ":ninja:",
       ":ph34r:",
       ":smurf:",
       ":zoro:",
       ":paperbag:",
       ":alien:",
       ":excl:",
       ":arrow:",
       ":qmark:");


   // *** add the url's from the corresponding images below
   var realSmileys = new Array(
       "http://soompi.com/forums/html/emoticons/blink.gif",
       "http://soompi.com/forums/html/emoticons/rolleyes.gif",
       "http://soompi.com/forums/html/emoticons/sweatingbullets.gif",
       "http://soompi.com/forums/html/emoticons/unsure.gif",
       "http://soompi.com/forums/html/emoticons/wacko.gif",
       "http://www.lpassociation.com/forums/html/emoticons/bookread.gif",
       "http://www.lpassociation.com/forums/html/emoticons/bounce.gif",
       "http://www.lpassociation.com/forums/html/emoticons/hypo.gif",
       "http://www.lpassociation.com/forums/html/emoticons/hug.gif",
       "http://www.lpassociation.com/forums/html/emoticons/kicking.gif",
       "http://www.lpassociation.com/forums/html/emoticons/shifty.gif",
       "http://www.lpassociation.com/forums/html/emoticons/shutup.gif",
       "http://www.lpassociation.com/forums/html/emoticons/wave.gif",
       "http://soompi.com/forums/html/emoticons/biggrin.gif",
       "http://soompi.com/forums/html/emoticons/cool.gif",
       "http://soompi.com/forums/html/emoticons/crazy.gif",
       "http://soompi.com/forums/html/emoticons/dry.gif",
       "http://soompi.com/forums/html/emoticons/happy.gif",
       "http://soompi.com/forums/html/emoticons/huh.gif",
       "http://soompi.com/forums/html/emoticons/kiss.gif",
       "http://soompi.com/forums/html/emoticons/laugh.gif",
       "http://soompi.com/forums/html/emoticons/mad.gif",
       "http://soompi.com/forums/html/emoticons/mellow.gif",
       "http://soompi.com/forums/html/emoticons/ohmy.gif",
       "http://soompi.com/forums/html/emoticons/sad.gif",
       "http://soompi.com/forums/html/emoticons/sleep.gif",
       "http://soompi.com/forums/html/emoticons/smile.gif",
       "http://soompi.com/forums/html/emoticons/tongue.gif",
       "http://soompi.com/forums/html/emoticons/tongue2.gif",
       "http://soompi.com/forums/html/emoticons/wink.gif",
       "http://soompi.com/forums/html/emoticons/w00t.gif",
       "http://www.lpassociation.com/forums/html/emoticons/angry.gif",
       "http://www.lpassociation.com/forums/html/emoticons/blushing.gif",
       "http://www.lpassociation.com/forums/html/emoticons/censored.gif",
       "http://www.lpassociation.com/forums/html/emoticons/chicken.gif",
       "http://www.lpassociation.com/forums/html/emoticons/cry.gif",
       "http://www.lpassociation.com/forums/html/emoticons/devil.gif",
       "http://www.lpassociation.com/forums/html/emoticons/disgust.GIF",
       "http://www.lpassociation.com/forums/html/emoticons/ermm.gif",
       "http://www.lpassociation.com/forums/html/emoticons/flowers.gif",
       "http://www.lpassociation.com/forums/html/emoticons/geek.gif",
       "http://www.lpassociation.com/forums/html/emoticons/innocent.gif",
       "http://www.lpassociation.com/forums/html/emoticons/king.gif",
       "http://www.lpassociation.com/forums/html/emoticons/nugget.gif",
       "http://www.lpassociation.com/forums/html/emoticons/nuke.gif",
       "http://www.lpassociation.com/forums/html/emoticons/pease.gif",
       "http://www.lpassociation.com/forums/html/emoticons/phone.gif",
       "http://www.lpassociation.com/forums/html/emoticons/rasberry.GIF",
       "http://www.lpassociation.com/forums/html/emoticons/sad.gif",
       "http://www.lpassociation.com/forums/html/emoticons/sleeping.gif",
       "http://www.lpassociation.com/forums/html/emoticons/surrender.gif",
       "http://www.lpassociation.com/forums/html/emoticons/teehee.gif",
       "http://www.lpassociation.com/forums/html/emoticons/thumbsup.gif",
       "http://www.lpassociation.com/forums/html/emoticons/whistling.gif",
       "http://soompi.com/forums/html/emoticons/pirate.gif",
       "http://soompi.com/forums/html/emoticons/homestar.gif",
       "http://soompi.com/forums/html/emoticons/strongbad.gif",
       "http://soompi.com/forums/html/emoticons/ninja.gif",
       "http://soompi.com/forums/html/emoticons/ph34r.gif",
       "http://soompi.com/forums/html/emoticons/smurf.gif",
       "http://soompi.com/forums/html/emoticons/zoro.gif",
       "http://www.lpassociation.com/forums/html/emoticons/paperbag.gif",
       "http://www.lpassociation.com/forums/html/emoticons/alien.gif",
       "http://www.lpassociation.com/forums/html/emoticons/excl.gif",
       "http://www.lpassociation.com/forums/style_images/LPA-009/icon11.gif",
       "http://www.lpassociation.com/forums/style_images/LPA-009/icon14.gif");

   // *** number of smileys that will be displayed per row
   var maxNumberOfSmileysPerRow = 11;
   // *** button size in pixels
   var buttonSize = 30;
   // preloading images
   var preloadedImages = new Array(realSmileys.length);
   for (i = 0; i < preloadedImages.length; ++i)
   {
       preloadedImages[i] = new Image();
       preloadedImages[i].src = realSmileys[i];
   }
   
   var allTableData = document.getElementsByTagName('td');
   var indx;
   var smiley;
   var replacement;
   
   for (var i = 0; i < allTableData.length; ++i )
   {  
       for ( var n = 0; n < textSmileys.length; ++n )
       {
           if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
               (allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
           {
               indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
               if (indx != -1)
               {
                   while (indx != -1)
                   {  
                       replacement = '';
                       indx = allTableData[i].innerHTML.indexOf(textSmileys[n]);
                       smiley = '<img src=\"' + realSmileys[n] + '">'
                       replacement = allTableData[i].innerHTML.replace(textSmileys[n],smiley);
                       allTableData[i].innerHTML = replacement;                  
                   }                  
               }
           }
       
       }
   }
   
   if (document.URL.indexOf('weblogs') != -1)
   {
       var smileyCollection = new Array(realSmileys.length);
       var smileyBar = '';
       
       if (document.getElementById('htmleditor'))
       {
           for (i = 0; i < smileyCollection.length; ++i)
           {
               smileyCollection[i] = '<button type="button" value="" ' +
                   'style="width:' + buttonSize + 'px; height:' +
                   buttonSize + 'px;" onclick="javascript:insertHTML(\'&nbsp;' +
                   textSmileys[i] + '\'); return false;">' +
                   '<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
                   '"></button>';
           }
       }
       else
       {
          for (i = 0; i < smileyCollection.length; ++i)
           {
               smileyCollection[i] = '<button type="button" value="" ' +
                   'style="width:' + buttonSize + 'px; height:' +
                   buttonSize + 'px;" onclick="javascript:typeSmiley(\'&nbsp;' +
                   textSmileys[i] + '\'); return false;">' +
                   '<img src=\"' + realSmileys[i] + '" alt="' + textSmileys[i] +
                   '"></button>';
           }
       }
       
   
       for (i = 0; i < smileyCollection.length; ++i)
       {  
          if (i != 0)
              if ( (i/maxNumberOfSmileysPerRow).toString().indexOf('.') == -1)
                  smileyBar = smileyBar + '<BR>';
          smileyBar = smileyBar + smileyCollection[i];
       }
       
       // add SmileyBar
       infoLink = '<a href="http://www.xanga.com/item.aspx?user=JiAnGsTa21&tab=weblogs&uid=43487158"' +
           'target=blank><font style="font-size: xx-small; font-weight: normal;">' +
           'HERE</font><a/><br><br>';
       smileyBarHtml = '<br><b>Smileys modified by Jiangsta21</b><br><font style="font-size: xx-small">' +
           'If you want to get these smileys too, click -----></font> ' +
           infoLink + smileyBar + '<br><br>';
       if (navigator.userAgent.indexOf('Mac') == -1)
       {
           if (document.getElementById('htmleditor'))
               var obj1 = document.getElementById('htmleditor').parentNode;
           else
           {
              if (document.getElementsByTagName('textarea')[0].getAttribute('name') == 'bdescr')
                  var obj1 = document.getElementsByTagName('textarea')[0].parentNode;
              else
              {
                  var allTextAreas = document.getElementsByTagName('textarea');
                  for (i = 0; i < allTextAreas.length; ++i)
                  {
                      if (allTextAreas[i].getAttribute('name') == 'bdescr')
                      {
                          var obj1 = allTextAreas[i].parentNode;
                          break;
                      }
                  }
              }
           }
           var obj2 = document.createElement('span');
           obj2.setAttribute('ID','idSmileyBar');
           obj2.innerHTML = smileyBarHtml;
           obj1.insertBefore(obj2,obj1.firstChild);
       }
       else
       {
           // alternative solution for the Mac
           for (var i = 0; i < allTableData.length; ++i )
           {
               if ((allTableData[i].innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
               (allTableData[i].innerHTML.indexOf('previewHTML()') == -1))
               {  
                   if (allTableData[i].innerHTML.toUpperCase().indexOf('(OPTIONAL)') != -1)
                   {
                       var temp = allTableData[i].innerHTML;
                       allTableData[i].innerHTML = temp + '<br>' + smileyBarHtml;
                       break;
                   }
               }
           }
       }
   }
   
}
if (document.URL.indexOf('weblogs') != -1)
   replaceTextSmileys();
</script>

<!-- end code provided by createblog.com -->
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: