• I was trying to change my smilies but I somehow screwed up my vars.php file. I keep getting this error on my homepage:


    Parse error: syntax error, unexpected '(', expecting ')' in /home/pimentel/public_html/blog/wp-includes/vars.php on line 55

    This is my vars.php file:

    <?php

    // On which page are we ?
    $PHP_SELF = $_SERVER['PHP_SELF'];
    if (preg_match('#([^/]+.php)#',

    $PHP_SELF, $self_matches)) {
    $pagenow = $self_matches[1];
    } else if (strstr($PHP_SELF, '?')) {

    $pagenow = explode('/', $PHP_SELF);
    $pagenow = trim($pagenow[(sizeof($pagenow)-1)]);

    $pagenow = explode('?', $pagenow);
    $pagenow = $pagenow[0];
    } else {
    $pagenow = 'index.php';
    }

    //

    Simple browser detection
    $is_lynx = 0; $is_gecko = 0; $is_winIE = 0; $is_macIE = 0; $is_opera = 0;

    $is_NS4 = 0;
    if (!isset($HTTP_USER_AGENT)) {
    $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
    }
    if

    (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
    $is_lynx = 1;
    } elseif (preg_match('/Gecko/',

    $HTTP_USER_AGENT)) {
    $is_gecko = 1;
    } elseif ((preg_match('/MSIE/', $HTTP_USER_AGENT)) &&

    (preg_match('/Win/', $HTTP_USER_AGENT))) {
    $is_winIE = 1;
    } elseif ((preg_match('/MSIE/',

    $HTTP_USER_AGENT)) && (preg_match('/Mac/', $HTTP_USER_AGENT))) {
    $is_macIE = 1;
    } elseif

    (preg_match('/Opera/', $HTTP_USER_AGENT)) {
    $is_opera = 1;
    } elseif ((preg_match('/Nav/',

    $HTTP_USER_AGENT) ) || (preg_match('/Mozilla\/4\./', $HTTP_USER_AGENT))) {
    $is_NS4 = 1;
    }
    $is_IE

    = (($is_macIE) || ($is_winIE));

    // Server detection
    $is_apache = strstr($_SERVER

    ['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
    $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-

    IIS') ? 1 : 0;

    // if the config file does not provide the smilies array, let's define it here
    if (!

    isset($wpsmiliestrans)) {
    $wpsmiliestrans = array(
    ' :angel:'=> 'frosty_angel.gif',

    ' :oops:'=> 'frosty_blush.gif',

    ' :blush:'=> 'frosty_blush.gif',

    ' :brb:'=> 'frosty_brb.gif',

    ' :cheerful:'=> 'frosty_cheerful.gif',

    ' ^__^'=> 'frosty_cheerful.gif',

    ' :confused:'=> 'frosty_confused.gif',

    ' 8)'=> 'frosty_cool.gif',

    ' 8-)'=> 'frosty_cool.gif',

    ' :cool:'=> 'frosty_cool.gif',

    ' :crush:'=> 'frosty_crush.gif',

    ' :cry:'=> 'frosty_cry.gif',

    ' ;__;=> 'frosty_cry.gif',

    ' :'('=> 'frosty_cry.gif',

    ' :dead:'=> 'frosty_dead.gif',

    ' :depressed:'=> 'frosty_depressed.gif',

    ' :devil:'=> 'frosty_devil.gif',

    ' :evil:'=> 'frosty_devil.gif',

    ' :eek:'=> 'frosty_eek.gif',

    ' :fairy:'=> 'frosty_fairy.gif',
    ' :frown:'=> 'frosty_frown.gif',

    ' :('=> 'frosty_frown.gif',

    ' :-('=> 'frosty_frown.gif',

    ' :sad:'=> 'frosty_frown.gif',

    ' :grr:'=> 'frosty_grr.gif',

    ' :heart:'=> 'frosty_heart.gif',

    ' :heh:'=> 'frosty_heh.gif',

    ' :hero:'=> 'frosty_hero.gif',

    ' :|'=> 'frosty_huh.gif',

    ' :-|'=> 'frosty_huh.gif',

    ' :innocent:'=> 'frosty_innocent.gif',

    ' :kawaii:'=> 'frosty_kawaii.gif',

    ' :kiss:'=> 'frosty_kiss.gif',

    ' :*'=> 'frosty_huh.gif',

    ' :D'=> 'frosty_largegrin.gif',

    ' :-D'=> 'frosty_largegrin.gif',

    ' :grin:'=> 'frosty_largegrin.gif',

    ' :lol:'=> 'frosty_lol.gif',

    ' :mad:'=> 'frosty_mad.gif',

    ' :moo:'=> 'frosty_moo.gif',

    ' :moustache:'=> 'frosty_moustache.gif',
    ' :nerd:'=> 'frosty_nerd.gif',

    ' :omg:'=> 'frosty_omg.gif',

    ' :peek:'=> 'frosty_peek.gif',

    ' :pirate:'=> 'frosty_pirate.gif',

    ' :queen:'=> 'frosty_queen.gif',

    ' 8O'=> 'frosty_shocked.gif',

    ' 8-O'=> 'frosty_shocked.gif',

    ' :shock:'=> 'frosty_shocked.gif',

    ' :sick:'=> 'frosty_sick.gif',

    ' :smallgrin:'=> 'frosty_smallgrin.gif',

    ' :)'=> 'frosty_smile.gif',

    ' :-)'=> 'frosty_smile.gif',

    ' :smile:'=> 'frosty_smile.gif',

    ' :smirk:'=> 'frosty_smirk.gif',

    ' :sneer:'=> 'frosty_sneer.gif',

    ' :stare:'=> 'frosty_stare.gif',
    ' :sweat:'=> 'frosty_stressed.gif',

    ' :stress:'=> 'frosty_stressed.gif',

    ' :thumbsup:'=> 'frosty_thumbsup.gif',

    ' :P'=> 'frosty_tongue.gif',

    ' :-P'=> 'frosty_tongue.gif',

    ' :razz:'=> 'frosty_tongue.gif',

    ' :uh:'=> 'frosty_uh.gif',

    ' (:'=> 'frosty_upsidedown.gif',

    ' (-:'=> 'frosty_upsidedown.gif',

    ' :S'=> 'frosty_warped.gif',

    ' :-S'=> 'frosty_warped.gif',

    ' :weird:'=> 'frosty_weird.gif',
    ' :wink:'=> 'frosty_wink.gif',

    ' ;)'=> 'frosty_wink.gif',

    ' ;-)'=> 'frosty_wink.gif',

    ' :wtf:'=> 'frosty_wtf.gif',

    ' :yawn:'=> 'frosty_yawn.gif',

    ' :yum:'=> 'frosty_yum.gif',

    ' :zip:'=> 'frosty_zip.gif',

    ' :-X'=> 'frosty_zip.gif',

    ' :X'=> 'frosty_zip.gif',
    );
    }

    // sorts the smilies' array
    if (!function_exists('smiliescmp')) {
    function smiliescmp ($a, $b) {

    if (strlen($a) == strlen($b)) {
    return strcmp($a, $b);
    }
    return (strlen($a)

    > strlen($b)) ? -1 : 1;
    }
    }
    uksort($wpsmiliestrans, 'smiliescmp');

    // generates smilies' search &

    replace arrays
    foreach($wpsmiliestrans as $smiley => $img) {
    $wp_smiliessearch[] = $smiley;

    $smiley_masked = htmlspecialchars( trim($smiley) , ENT_QUOTES);
    $wp_smiliesreplace[] = " <img

    src='" . get_settings('siteurl') . "/wp-images/smilies/$img' alt='$smiley_masked' class='wp-smiley'

    /> ";
    }

    // Path for cookies
    define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings

    ('home') . '/' ) );
    define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings

    ('siteurl') . '/' ) );

    ?>

    How do I fix this??

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding smilies…messed up vars.php’ is closed to new replies.