Support » Plugin: PHP code snippets (Insert PHP) » Problem moving from old system

  • I’ve upgraded the plugin which has worked fine for a couple of years.
    Copied my code into a snippet and get this error message;
    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 4:
    syntax error, unexpected ‘http’ (T_STRING), expecting ‘,’ or ‘;’
    I think it’s probably a quote mark issue – does the upgrade handle them differently?
    Here’s the code which shows either a logged in user name or a link to the login box;
    if ( is_user_logged_in() ) {
    global $current_user;
    get_currentuserinfo();
    echo “Click here to Upload Your Pictures. Logged in as “.$current_user->display_name.”“; } else {
    echo “Click here to Login before uploading your pictures“;
    }
    Same code works fine with [insert_php] tags.
    Trying hard not to panic…..
    Many Thanks
    ROD

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.