Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: ExtraBoard- galingas forumas

Parašė mXt· 2008 Vas. 1 19:02:36
#66

man isviso pievos instaliuojant :D

neleidzia naudoti kai kuriu funkciju, kadangi jos yra po 2.

pvz parsesmiley()

viena funkcija:
function parsesmileys($message) {
    $query = mysql_query("select * from ".DB_PREFIX."smilies") or die(mysql_error());
        while($row = mysql_fetch_object($query))
{
        $img="<img src=".IMAGES."smiley/".$row->smile_url.">";
        $message =str_replace($row->code,$img,$message);
        }
    return $message;
}function displaysmileys($textarea) {
    $querya = mysql_query("select * from ".DB_PREFIX."smilies WHERE view='1' LIMIT 0,10") or die(mysql_error());
        while($rowa = mysql_fetch_object($querya)){
        $smiles="$smiles <img src='".IMAGES."smiley/$rowa->smile_url' onClick=\"insertText('$textarea', '$rowa->code ');\">\n";
        }
    return $smiles;
}




kita funkcija:
// 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'>"
);
foreach($smiley as $key=>$smiley_img) $message = preg_replace($key, $smiley_img, $message);
return $message;
}




ir ka daryt? :D niekaip kampo nepagaunu... tas pats sh vyksta ir su displaysmileys()...