Please HELP Parse error: syntax error, unexpected ';', expecting

Discussion in 'PHP' started by gilbert90, Jul 3, 2012.

  1. #1
    Hi, my website just got stuck while doing some coding and i cannot establish the real problem.
    this is the error message i get.

    "Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/gilbert9/public_html/wp-content/themes/SuperWP/includes/social_profiles.php on line 22"

    The coding is below:

    <?php
    new Themater_Social_Profiles();

    class Themater_Social_Profiles
    {
    var $theme;
    var $status = false;
    var $display_networks = false;
    var $url;

    var $defaults;

    function __construct()
    {
    global $theme;
    $this->theme = $theme;
    $this->url = THEMATER_INCLUDES_URL . '/social_profiles';

    $this->defaults = array(
    'hook' => 'social_profiles',
    'networks' => array(
    array('title' => 'Twitter', 'url' => 'https://twitter.com/Winkblogger', 'button' => get_template_directory_uri() . '/images/social-profiles/twitter.png'),
    array('title' => 'Facebook', 'url' => 'http://www.facebook.com/pages/Winkblogger/309709002453713', 'button' => get_template_directory_uri() . '/images/social-profiles/facebook.png'),
    array('title' => 'Google Plus', 'url' => 'https://plus.google.com/', 'button' => get_template_directory_uri() . '/images/social-profiles/gplus.png'),
    array('title' => 'LinkedIn', 'url' => 'http://www.linkedin.com/', 'button' => get_template_directory_uri() . '/images/social-profiles/linkedin.png'),
    array('title' => 'RSS Feed', 'url' => $theme->rss_url(), 'button' => get_template_directory_uri() . '/images/social-profiles/rss.png'),
    array('title' => 'Email', 'url' => 'mailto:your@email.com', 'button' => get_template_directory_uri() . '/images/social-profiles/email.png')
    )
    );

    if(is_array($this->theme->options['plugins_options']['social_profiles']) ) {
    $this->defaults = array_merge($this->defaults, $this->theme->options['plugins_options']['social_profiles']);
    }

    $this->theme->add_hook($this->defaults['hook'], array(&$this, 'display_social_profiles'), 1);

    if($this->theme->is_admin_user()) {
    $this->themater_options();
    }
    }

    function display_social_profiles()
    {
    $widget_name = 'ThematerSocialProfiles';
    $args = array('before_widget' => '','after_widget' => '');
    $get_instance = $this->theme->get_option('themater_social_profiles_networks');
    $instance = array('profiles' => $get_instance);
    the_widget($widget_name, $instance, $args);
    }

    function get_widget_form()
    {
    $widget_name = 'ThematerSocialProfiles';
    $run_widget = new $widget_name();
    $run_widget->id_base = 'plugin';
    $get_instance = $this->theme->get_option('themater_social_profiles_networks');
    $instance = array('profiles' => $get_instance);
    $run_widget->form($instance);
    ?>
    <script>
    var update_scial_content = $thematerjQ('.themater_social_profiles_widget').html();
    update_scial_content = update_scial_content.replace(/widget-plugin\[\]\[profiles\]/g, 'themater_social_profiles_networks');
    $thematerjQ('.themater_social_profiles_widget').html(update_scial_content);
    $thematerjQ('.themater_social_profiles_widget_title').hide();
    </script>
    <?php
    }


    function themater_options()
    {

    $this->theme->admin_option(array('Social Profiles', 16),
    'Social Profiles' , 'social_profiles',
    'content', 'Add buttons to your social network profiles.'
    );

    $this->theme->admin_option('Social Profiles',
    'Networks', 'themater_social_profiles_networks',
    'callback', $this->defaults['networks'],
    array('callback' => array(&$this, 'themater_social_profiles_networks'), 'display' => 'clean')
    );

    }

    function themater_social_profiles_networks()
    {
    $this->get_widget_form();
    }
    }
    ?>

    I will really appreciate help with this.
     
    gilbert90, Jul 3, 2012 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    Format your code then post it. It's just a mess and there's no reason for someone to go through your code and do that for you.
     
    NetStar, Jul 3, 2012 IP
  3. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #3
    i don't see anything wrong with this code upto line 22, could it be a problem with the code that calls it?
     
    atxsurf, Jul 3, 2012 IP
  4. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #4
    >php -l "blah.php"
    No syntax errors detected in blah.php
    >Exit code: 0
     
    NetStar, Jul 3, 2012 IP
  5. gilbert90

    gilbert90 Well-Known Member

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Ok thanks very much guys just used my host and its solved.
    Cheers
     
    gilbert90, Jul 3, 2012 IP