加入我的最愛  |   設定為首頁  |   圖片上載  論壇音樂模式    非音樂模式   
 
I-See 論壇

I-See 論壇 註冊 登錄 會員 勳章中心 MSN宣傳系統 虛擬形象 音樂盒中心 隨機圖片中心 Flash 遊戲 會員相冊 新手手冊 娛樂設施 幫助 簡體中文 界面風格




 發新回覆
發新主題 發新投票
標題: problem of xanga!comment add pics code not working!y?correct pls!
載入中 ...
sorrymonkey
初生嬰兒




會員編號 225963
精華 0
積分 349
帖子 14
威望 0 點
I-See幣 11031 錢
GAME幣 100 個
MSN宣傳 0 次
性別  保密 保密
配偶 未婚
閱讀權限 40
註冊 2006-11-3
註冊天數 6586
狀態 離線
  只顯示 sorrymonkey 的帖子
發表於 2006-11-8 04:51 PM  資料  短消息  加為好友 
problem of xanga!comment add pics code not working!y?correct pls!

<script type="text/javascript">
//
// *** Smiley Script V 3.0 ***
// Original author: EasterEgg (遊客無法瀏覽此圖片或下載點,請先註冊或登入會員。
//
// You can use this code freely, as long as the entire script remains
// intact, including the copyright notice.
//
// Many thanks to Alice Woodrome (遊客無法瀏覽此圖片或下載點,請先註冊或登入會員。, who handpicked
// the emoticons that are currently present in this version of the script.
//
// VERSION HISTORY
//
// 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
//
// 3.0 (Nov 5, 2005)
// - script was broken, due to changes at Xanga. Fixed.
// - script overall revised, some obsolete code removed.
//
// 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.getAttribute('name') == 'bdescr')
            {
                var editor = allTextAreas;
                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_2:",
        ":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://blog.yam.com/onion_club/3eb4e7b3.gif",
        "http://blog.yam.com/onion_club/6184ceba.gif",
        "http://blog.yam.com/onion_club/d79df121.gif",
        "http://blog.yam.com/onion_club/5a6157d0.gif",
        "http://blog.yam.com/onion_club/8f337f1c.gif",
        "http://blog.yam.com/onion_club/70bff581.gif",
        "http://blog.yam.com/onion_club/332f960b.gif",
        "http://blog.yam.com/onion_club/54bd3bbb.gif",
        "http://blog.yam.com/onion_club/da4c2d5e.gif",
        "http://blog.yam.com/onion_club/cd08785a.gif",
        "http://blog.yam.com/onion_club/f5f49335.gif",
        "http://blog.yam.com/onion_club/20f27c58.gif",
        "http://blog.yam.com/onion_club/87a4e689.gif",
        "http://blog.yam.com/onion_club/9bbc76d5.gif",
        "http://blog.yam.com/onion_club/860e2a45.gif",
        "http://blog.yam.com/onion_club/5c745924.gif",
        "http://blog.yam.com/onion_club/4412144b.gif",
        "http://blog.yam.com/onion_club/b6b25dc6.gif",
        "http://blog.yam.com/onion_club/1894c7a1.gif",
        "http://blog.yam.com/onion_club/215ad82f.gif",
        "http://blog.yam.com/onion_club/5e565bcb.gif",
        "http://blog.yam.com/onion_club/875328cc.gif",
        "http://blog.yam.com/onion_club/d1eef220.gif",
        "http://blog.yam.com/onion_club/9a9e6a59.gif",
        "http://blog.yam.com/onion_club/e111de78.gif",
        "http://blog.yam.com/onion_club/55318906.gif",
        "http://blog.yam.com/onion_club/6f428754.gif",
        "http://blog.yam.com/onion_club/7f5341cc.gif",
        "http://blog.yam.com/onion_club/967339c1.gif",
        "http://blog.yam.com/onion_club/8dcf9699.gif",
        "http://blog.yam.com/onion_club/ac0d5cff.gif",
        "http://blog.yam.com/onion_club/b210e58c.gif",
        "http://blog.yam.com/onion_club/17f0f3b0.gif",
        "http://blog.yam.com/onion_club/c6a3ddb3.gif",
        "http://blog.yam.com/onion_club/ceb85dec.gif",
        "http://blog.yam.com/onion_club/098eb4a5.gif",
        "http://blog.yam.com/onion_club/a03cbf1e.gif",
        "http://blog.yam.com/onion_club/ce3ec6c2.gif",
        "http://blog.yam.com/onion_club/d16c4689.gif",
        "http://blog.yam.com/onion_club/04a97f13.gif",
        "http://blog.yam.com/onion_club/efb50fe2.gif",
        "http://blog.yam.com/onion_club/af48944b.gif",
        "http://blog.yam.com/onion_club/07baa27a.gif",
        "http://blog.yam.com/onion_club/33c4b951.gif",
        "http://blog.yam.com/onion_club/154218d4.gif",
        "http://blog.yam.com/onion_club/4e5dd44a.gif",
        "http://blog.yam.com/onion_club/b048a2d2.gif",
        "http://blog.yam.com/onion_club/1025c640.gif",
        "http://blog.yam.com/onion_club/baa60776.gif",
        "http://blog.yam.com/onion_club/058e8b09.gif",
        "http://blog.yam.com/onion_club/3c68bb64.gif",
        "http://blog.yam.com/onion_club/0fbbf481.gif",
        "http://blog.yam.com/onion_club/d582d79f.gif",
        "http://blog.yam.com/onion_club/3070242c.gif",
        "http://blog.yam.com/onion_club/4d6161fd.gif",
        "http://blog.yam.com/onion_club/4519626a.gif",
        "http://blog.yam.com/onion_club/4fd9f2d3.gif",
        "http://blog.yam.com/onion_club/d33561e9.gif",
        "http://blog.yam.com/onion_club/c8908497.gif");
    // *** number of smileys that will be displayed per row
    var maxNumberOfSmileysPerRow = 10;
    // *** button size in pixels
    var buttonSize = 60;
    // preloading images
    var preloadedImages = new Array(realSmileys.length);
    for (i = 0; i < preloadedImages.length; ++i)
    {
        preloadedImages = new Image();
        preloadedImages.src = realSmileys;
    }
   
    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.innerHTML.toUpperCase().indexOf('TABLE') == -1) &&
                (allTableData.innerHTML.indexOf('previewHTML()') == -1))
            {
                indx = allTableData.innerHTML.indexOf(textSmileys[n]);
                if (indx != -1)
                {
                    while (indx != -1)
                    {   
                        replacement = '';
                        indx = allTableData.innerHTML.indexOf(textSmileys[n]);
                        smiley = '<img src=\"' + realSmileys[n] + '">'
                        replacement = allTableData.innerHTML.replace(textSmileys[n],smiley);
                        allTableData.innerHTML = replacement;                  
                    }                  
                }
            }
        
        }
    }
   
    if (document.getElementById('idSmileyBar'))
    {
        var smileyCollection = new Array(realSmileys.length);
        var smileyBar = '';
        
        if (document.getElementById('htmleditor'))
        {
            for (i = 0; i < smileyCollection.length; ++i)
            {
                smileyCollection = '<button type="button" value="" ' +
                    'style="width:' + buttonSize + 'px; height:' +
                    buttonSize + 'px;" onclick="javascript:insertHTML(\' ' +
                    textSmileys + '\'); return false;">' +
                    '<img src=\"' + realSmileys + '" alt="' + textSmileys +
                    '"></button>';
            }
        }
        else
        {
           for (i = 0; i < smileyCollection.length; ++i)
            {
                smileyCollection = '<button type="button" value="" ' +
                    'style="width:' + buttonSize + 'px; height:' +
                    buttonSize + 'px;" onclick="javascript:typeSmiley(\' ' +
                    textSmileys + '\'); return false;">' +
                    '<img src=\"' + realSmileys + '" alt="' + textSmileys +
                    '"></button>';
            }
        }
           
        for (i = 0; i < smileyCollection.length; ++i)
        {  
           if (i != 0)
               if ( (i/maxNumberOfSmileysPerRow).toString().indexOf('.') == -1)
                   smileyBar = smileyBar + '<BR>';
           smileyBar = smileyBar + smileyCollection;
        }
        // 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>';
        obj2 = document.getElementById('idSmileyBar');
        obj2.innerHTML = smileyBarHtml;
    }
}
if (document.getElementById('idSmileyBar'))
    replaceTextSmileys();   
</script>


<!-- begin code provided by sillything.info-->
<script language=javascript>
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var ns6=document.getElementById&&!document.all;

var rate = 100;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
si=ssetResizable;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}
if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = si("ChangeColor()",100);
}
}
function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearIntervalM(TimerID);
act = 0;
}
}
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement;
while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
}
if (obj.tagName == 'A' && obj.href != '') {
act = 1;
clrOrg = obj.style.color;
TimerID = si("ChangeColor()",100);
}
}
}
//document.write.blogring
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == 'A') {
obj.style.color = clrOrg;
clearIntervalM(TimerID);
act = 0;
}
}
}
function ChangeColor()
{
obj.style.color = makeColor();
}
function makeColor()
{
// HSVtoRGB
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;
if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
//document.write.blogring
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
return clrRGB;
}
</script

I-See Forum @ All rights reserved.
頂部
載入中 ...
 發新回覆
發新主題 發新投票


載入中 ...


當前時區 GMT+8, 現在時間是 2024-11-15 04:40 AM

  Powered by Discuz!  © Comsenz Inc.
Processed in 0.042126 second(s), 7 queries , Gzip enabled

清除 Cookies - 聯繫我們 - I-See 論壇 - Archiver - WAP