Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Du klausimai

Parašė Athrax· 2007 Lie. 18 11:07:50
#18

Toonis parašė:
3. Sakiau jog nežinau,permesk tuos failus kuriuos nesenai redagavai ar keitei į kitus.
4. http://www.modding.bendras.com - tikrai yra,bet kur - neberandu.

3 - keiciau tik tiek, kad pridejau 4 smailus:
/ Parse smiley bbcode into HTML images
function parsesmileys($message) {
   $smiley = array(
      "#\:\)#si" => "<img src='".IMAGES."smiley/smile.gif' alt='smiley'>",
      "#\;\)#si" => "<img src='".IMAGES."smiley/wink.gif' alt='smiley'>",
      "#\:\(#si" => "<img src='".IMAGES."smiley/sad.gif' alt='smiley'>",
      "#\:\|#si" => "<img src='".IMAGES."smiley/frown.gif' alt='smiley'>",
      "#\:o#si" => "<img src='".IMAGES."smiley/shock.gif' alt='smiley'>",
      "#\:p#si" => "<img src='".IMAGES."smiley/pfft.gif' alt='smiley'>",
      "#b\)#si" => "<img src='".IMAGES."smiley/cool.gif' alt='smiley'>",
      "#\:d#si" => "<img src='".IMAGES."smiley/grin.gif' alt='smiley'>",
      "#\:@#si" => "<img src='".IMAGES."smiley/angry.gif' alt='smiley'>",
                "#\:s#si" => "<img src='".IMAGES."smiley/shy.gif' alt='smiley'>",
                "#\:1#si" => "<img src='".IMAGES."smiley/thinking.gif' alt='smiley'>",
                "#\:2#si" => "<img src='".IMAGES."smiley/confused.gif' alt='smiley'>",
                "#\:3#si" => "<img src='".IMAGES."smiley/good.gif' alt='smiley'>",
                "#\:4#si" => "<img src='".IMAGES."smiley/bravo.gif' alt='smiley'>",
                "#\:5#si" => "<img src='".IMAGES."smiley/haha.gif' alt='smiley'>"
   );
   foreach($smiley as $key=>$smiley_img) $message = preg_replace($key, $smiley_img, $message);
   return $message;
}

// Show smiley icons in comments, forum and other post pages
function displaysmileys($textarea) {
   $smiles = "";
   $smileys = array (
      ":)" => "smile.gif",
      ";)" => "wink.gif",
      ":|" => "frown.gif",
      ":(" => "sad.gif",
      ":o" => "shock.gif",
      ":p" => "pfft.gif",
      "B)" => "cool.gif",
      ":D" => "grin.gif",
      ":@" => "angry.gif",
                ":s" => "shy.gif",
                ":1" => "thinking.gif",
                ":2" => "confused.gif",
                ":3" => "good.gif",
                ":4" => "bravo.gif",
                ":5" => "haha.gif"
   );
   foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."smiley/$smiley' alt='smiley' onClick=\"insertText('$textarea', '$key');\">\n";
   return $smiles;
}


KAS BLOGAI ?
4 - pasirodo ne taip lengva ir surast :| kad as zinociau kaip tai vadintusi... ?|

Redagavo Athrax· 2007 Lie. 18 11:07:12