Click here to Skip to main content
15,888,733 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: post data missing after php parses raw post to post variable Pin
Marc Firth25-Nov-09 22:20
Marc Firth25-Nov-09 22:20 
GeneralRe: post data missing after php parses raw post to post variable Pin
cjoki27-Nov-09 10:37
cjoki27-Nov-09 10:37 
QuestionProblem with Visual Cpp compiler Pin
Game-point23-Nov-09 18:10
Game-point23-Nov-09 18:10 
AnswerRe: Problem with Visual Cpp compiler Pin
Richard MacCutchan1-Dec-09 2:29
mveRichard MacCutchan1-Dec-09 2:29 
AnswerRe: Problem with Visual Cpp compiler Pin
LloydA11114-Jan-10 8:42
LloydA11114-Jan-10 8:42 
QuestionHelp with assigning variables to smarty template engine (php). Pin
djkee23-Nov-09 10:20
djkee23-Nov-09 10:20 
AnswerRe: Help with assigning variables to smarty template engine (php). Pin
fly90423-Nov-09 10:53
fly90423-Nov-09 10:53 
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
djkee23-Nov-09 13:42
djkee23-Nov-09 13:42 
I tried what you suggested but the script crashed so i changed it to this script:

function smiley($text)
{
    // Settings: Change necessary settings here! //

    $path = "./smiley"; // Your Image Folder's Location
    $width = '24';
    $height = '24';

    // Smiley Codes & Image File-name Array - you can change as necessary

    $arr[":))"] = "d.png";
    $arr[":(("] = "cry.png";
    $arr[";)"] = "wink.png";
    $arr[":s"] = "s.png";
    $arr[":@"] = "angry.png";
    $arr[":)"] = "happy.png";
    $arr[":("] = "sad.png";
    $arr[":o"] = "o.png";
    $arr[":x"] = "love.png";
    $arr["b-)"] = "b.png";
    $arr[":d"] = "d.png";
    $arr[":p"] = "p.png";
    $arr["o)"] = "angel.png";
    $arr[":-b"] = "nerd.png";
    $arr[":*"] = "kiss.png";
    $arr["x("] = "angry.png";

    // DON'T CHANGE ANYTHING BELOW to avoid malfunction!!!

    $code_arr = array_keys($arr);
    foreach($code_arr as $code)
        $text = str_ireplace($code, "<img width = '" . $width . "' height = '" . $height . "' src='$path/" . $arr[$code] . "'>" , $text);
    // Done! Return text
    return $text;
}


After putting your code in the file nothing changed Frown | :( all smilies just show as text

$reviews = am_queries($db, "SELECT * FROM AMCMS_reviews WHERE gameid=$got_gameid AND approved=1;");

foreach ( $reviews as $rev )
{

    $rev[ 3 ] = smiley( $rev[ 3 ] );

}


Any other suggestions ?
Any way to do the same foreach in smarty ?

Thanks for helping btw
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
fly90424-Nov-09 2:30
fly90424-Nov-09 2:30 
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
djkee24-Nov-09 8:30
djkee24-Nov-09 8:30 
QuestionPERL Craps game Pin
Rhodge0923-Nov-09 9:30
Rhodge0923-Nov-09 9:30 
AnswerRe: PERL Craps game Pin
Rhodge0923-Nov-09 9:51
Rhodge0923-Nov-09 9:51 
Questionextract numeric values from string Pin
shaina223120-Nov-09 2:42
shaina223120-Nov-09 2:42 
AnswerRe: extract numeric values from string Pin
cjoki20-Nov-09 6:37
cjoki20-Nov-09 6:37 
AnswerRe: extract numeric values from string Pin
fly90420-Nov-09 17:14
fly90420-Nov-09 17:14 
AnswerRe: extract numeric values from string Pin
Marc Firth23-Nov-09 22:21
Marc Firth23-Nov-09 22:21 
GeneralRe: extract numeric values from string Pin
fly90424-Nov-09 2:32
fly90424-Nov-09 2:32 
GeneralRe: extract numeric values from string Pin
Marc Firth24-Nov-09 2:45
Marc Firth24-Nov-09 2:45 
QuestionWeb framework [modified] Pin
rastaVnuce18-Nov-09 14:39
rastaVnuce18-Nov-09 14:39 
AnswerRe: Web framework Pin
Michael Hansen23-Nov-09 12:37
Michael Hansen23-Nov-09 12:37 
GeneralRe: Web framework Pin
rastaVnuce23-Nov-09 12:40
rastaVnuce23-Nov-09 12:40 
AnswerRe: Web framework Pin
Chris Austin5-Dec-09 8:24
Chris Austin5-Dec-09 8:24 
GeneralRe: Web framework Pin
rastaVnuce8-Dec-09 13:52
rastaVnuce8-Dec-09 13:52 
GeneralRe: Web framework Pin
Massimo Di Pierro25-Dec-09 11:17
Massimo Di Pierro25-Dec-09 11:17 
Questionhow can i view crystal report on an apche server, not IIS on windows server 2003 ? Pin
amran imu17-Nov-09 15:41
amran imu17-Nov-09 15:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.