2003³â 1¿ù 8ÀÏ ÀÌÈÄ 
¸ðµÎ ¸í  ¿À´Ã ¸í 
¸ÞÀÎ ÆäÀÌÁö  
Ä®·³ º¸±â  
Ä«Å÷ º¸±â  
°Ô½ÃÆÇ °¡±â  
»çÀÌÆ®¸Ê  
±×¹ÛÀÇ °Íµé  

°¡ÀÔÇϸé Á¤¸» ÆíÇÕ´Ï´Ù;;
¢º¸®µð ½ºÅ¸ÀÏ
·£´ý¹è³Ê ºÏ¸¶Å©
Æß Àü¿ë À̸ðÅ×ÀÌÆÛ
 

The others
¸®µðÆø½º´åÄÄ ºôµù¸Ê
¸®µðÆø½º´åÄÄÀ» ¸¸µé¶§ »ç¿ëµÈ °¢Á¾ ¼Ò½º¸¦ ¸ð¾Ò½À´Ï´Ù.
Áú¹®Àº Áú´ä°Ô½ÃÆÇ¿¡¼­¸¸ ¹Þ½À´Ï´Ù.

 Multiple Show & Hide function  
 ¸®µð  posted at 2004-05-06 09:29:06
5340 hits  0 comments
 http://reedyfox.com/fox NeWin reedyfox is level 38  llllllllll 
 ÆÛ¸Ó¸µÅ© : http://reedyfox.com/island.php/building/83  [º¹»ç]
This tip is based on Tattertools' source code.
http://www.tattertools.com»õâÀ¸·Î ¿­±â



1) Insert below code at the top of write.php which is in skin directory.
(/skin/skin name/write.php)


<script>
function random(n) {
        return Math.floor(Math.random()*n);
}

function AddshowandhideTag(ch1,ch2){
        if(document.write.memo.createTextRange){
                document.write.memo.focus();
                document.selection.createRange().duplicate().text = ch1 + random(10000) + "|" + document.selection.createRange().duplicate().text + ch2;
                document.selection.createRange().select();
        }
}
</script>



And make a button at suitable place in the same file.
It's okay wherever you can see it in 'write-mode'.

<a href="JavaScript:onclick=AddshowandhideTag('[showandhide|Show more|Hide this|','|showa$ndhide]');">Show & Hide</a>



2) Insert below code at the top(suitable) of setup.php which is in skin directory, too.

<script>
function layer_toggle(obj) {
        if (obj.style.display == 'none') obj.style.display = 'block';
        else if (obj.style.display == 'block') obj.style.display = 'none';
}
</script>



3) Open list_check.php. (include/list_check.php)
Approximately at the line 82, you can find this.

                // À̹ÌÁö ¹Ú½º »ç¿ëÀ» À§Çؼ­ Á¤±ÔÇ¥Çö½Ä »ç¿ë
                if($data[ismember]) {
                        $imageBoxPattern = "/\[img\:(.+?)\.(jpg|gif)\,align\=([a-z]){0,}\,width\=([0-9]+)\,height\=([0-9]+)\,vspace\=([0-9]+)\,hspace\=([0-9]+)\,border\=([0-9]+)\]/i";
                        $data[memo]=preg_replace($imageBoxPattern,"<img src='icon/member_image_box/$data[ismember]/\\1.\\2' align='\\3' width='\\4' height='\\5' vspace='\\6' hspace='\\7' border='\\8'>", stripslashes($data[memo]));
                } else {
                        $data[memo]=stripslashes($data[memo]);
                }


And add code under that like this.

                // À̹ÌÁö ¹Ú½º »ç¿ëÀ» À§Çؼ­ Á¤±ÔÇ¥Çö½Ä »ç¿ë
                if($data[ismember]) {
                        $imageBoxPattern = "/\[img\:(.+?)\.(jpg|gif)\,align\=([a-z]){0,}\,width\=([0-9]+)\,height\=([0-9]+)\,vspace\=([0-9]+)\,hspace\=([0-9]+)\,border\=([0-9]+)\]/i";
                        $data[memo]=preg_replace($imageBoxPattern,"<img src='icon/member_image_box/$data[ismember]/\\1.\\2' align='\\3' width='\\4' height='\\5' vspace='\\6' hspace='\\7' border='\\8'>", stripslashes($data[memo]));
                } else {
                        $data[memo]=stripslashes($data[memo]);
                }


// show and hide
$imageBoxPattern = "/\[showandhide\|([^\n]*)\|([^\n]*)\|([0-9]+)\|/i";
$data[memo]=preg_replace($imageBoxPattern,"<div id='a\\3' style='display:block'><a href='javascript:;' onclick=\"layer_toggle(document.getElementById('a\\3')); layer_toggle(document.getElementById('b\\3')); return false;\">\\1</a></div><div id='b\\3' style='display:none'><a href='javascript:;' onclick=\"layer_toggle(document.getElementById('a\\3')); layer_toggle(document.getElementById('b\\3')); return false;\">\\2</a><br />", $data[memo]);

$data[memo]=str_replace("|showa$ndhide]","</div>", $data[memo]);



I inserted '$' not to be replaced, so you must erase '$'. (marked in red)


  PRINT Text  PRINT HTML  

  Trackbacks for this Posting (0)
'»ý°¢Çϴ¼¶ ¹Ù´å°¡ - Multiple Show & Hide function'
LIST ALL               GO TO THE TOP


Copyright 1999-2024 Zeroboard

 
»ý°¢ÇÏ´Â ¼¶, ¹Ù´å°¡´Â ¸®µð°¡ ¿î¿µÇÏ´Â °³ÀÎ Ä®·³ »çÀÌÆ®À̸ç ÀϺΠÄÁÅÙÃ÷´Â ¸®µð ¿ÜÀÇ ÇÊÁø¿¡ ÀÇÇØ ÀÛ¼ºµÇ¾ú½À´Ï´Ù. ÀÌ°÷ÀÇ ¸ðµç ÄÁÅÙÃ÷´Â Ãâó(Deep Link URL) ¹× ÀÛ°¡¸¦ ¸í½ÃÇÏ´Â Á¶°ÇÀ¸·Î ºñ»ó¾÷Àû ¿ëµµÀÇ ÀüÁ¦/º¹Á¦°¡ °¡´ÉÇÕ´Ï´Ù. ±×·¯³ª ÀÌ°÷¿¡ °ÔÀçµÈ ÄÁÅÙÃ÷ÀÇ ÃëÁö ¶Ç´Â ÀÛ°¡ÀÇ Àǵµ°¡ ¿Ö°îµÇ¾î Çؼ®µÉ ¼ö ÀÖ´Â ÄÁÅÙÃ÷ º¯ÇüÀº ±ÝÁöÇÕ´Ï´Ù. ÀÌ°÷¿¡ ±âÀçµÈ ÀüÀÚ¿ìÆíÁÖ¼Ò¿¡ ´ëÇÑ ÀÏüÀÇ ¼öÁýÇàÀ§¸¦ °ÅºÎÇÕ´Ï´Ù.(°Ô½ÃÀÏ 2008³â 1¿ù 1ÀÏ)
Google
  Ä«½ºÇÏ´Â ³²ÀÚ;;  
Window close