WordPress.org

Ready to get started?Download WordPress

Forums

SEO Friendly Social Links
SEO Social Links error under SETTINGS (19 posts)

  1. nbercasio
    Member
    Posted 3 years ago #

    Installed SEO Social Links plug-in then when I went to "Settings" then click on "SEO Social Links", I got this error

    "Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/24/d127686945/htdocs/wp-content/plugins/seo-friendly-social-links/Service.php on line 8"

    http://wordpress.org/extend/plugins/seo-friendly-social-links/

  2. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Could you paste the content of the file here? What version of PHP are you running?

  3. nbercasio
    Member
    Posted 3 years ago #

    Version 4.4.9

    <?php
    /**
    * Description of Service
    *
    * @author micha
    */
    class SEOSocialService {
    public $name;
    public $link;

    public function __construct($name, $link) {
    $this->name = $name;
    $this->link = $link;
    }
    }
    ?>

  4. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Seems like I would make an additional class definition for php4... Will fix it in the next update.

  5. nbercasio
    Member
    Posted 3 years ago #

    I found this info from my host 1and1. Hope it helps...

    *****************

    With 1&1 Linux hosting packages you have the choice between PHP4, PHP5 and PHP6. 1&1 Web Hosting packages use PHP4 as default for all .php files. For more information about PHP5, please reference What's new in PHP5?

    You may choose to simply name the script with the .php5 file extension if there are only a few scripts that require PHP5. If you don't want to rename all your scripts to .php5, you can create a .htaccess file (or edit the existing .htaccess file, if you already have one). You can create this file using a text editor such as Notepad, WordPad, vi, nano, etc. and place the following line in the text file:

    AddType x-mapp-php5 .php

    Save the text file as .htaccess in the folder where you need to use PHP5 (or upload the file to the correct folder). The settings specified in the .htaccess file are recursive meaning that the settings will apply to the current folder where the file is saved as well as all subfolders.

    While the PHP developers have done their utmost to ensure compatibility, we cannot guarantee that PHP4 scripts will function 100% correctly under PHP5. PHP5 has register_globals, allow_url_include and allow_url_fopen all disabled by default which may cause improper functionality for some scripts when switching from PHP4 to PHP5.

  6. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the info!

    I'll try to make it PHP4 compatible with the next update and it should be fine by then. Please stay tuned and thanks for patience.

  7. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Try updating to 1.1 and the error should be gone.

  8. nbercasio
    Member
    Posted 3 years ago #

    I uninstalled the old version and reinstalled new version 1.1, same error under settings. Any ideas?

  9. nbercasio
    Member
    Posted 3 years ago #

    Just want to add that I have no other plug ins installed except "Akismet" but it is deactivate.

  10. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Can you edit the file on your server in the wordpress plugins directory and remove the block public function __construct($name, $link) {
    $this->name = $name;
    $this->link = $link;
    }

    So that it only leaves the bottom block. Does this help?

  11. nbercasio
    Member
    Posted 3 years ago #

    Which file coz' the block is not on the service.php file?

  12. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    I'm sorry that I can't help you better yet. I don't have access to a running PHP4 instance so debugging seems quite clumsy.

    Would you replace the class definition in your Service.php with

    class SEOSocialService {
        var $name;
        var $link;
    
        function SEOSocialService ($name, $link) {
            $this->name = $name;
            $this->link = $link;
        }
    
    }

    This might do the trick?!?

  13. nbercasio
    Member
    Posted 3 years ago #

    That did it, error gone so time to play around now. Thanks for the ALMOST real time help. Great plug in!

  14. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the testing! I'll put the code in the plugin and load it if the server is using PHP4 instead of PHP5. So with a release > 1.1 it should work for everybody thanks to your help. What's your blog? Have a link?

  15. nbercasio
    Member
    Posted 3 years ago #

    here's my site at http://www.normanbercasio.com It is a WordPress "Full Screen" theme.

    I am still playing with the plug in. As you can see under "Gallery" and "Services", the plug in is showing for each blog but it is not clickable. Now under "About" it is possible.

    I changed the setting to insert links manually but I cannot find what is the line of code to insert.

  16. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    Like the site!

    If you choose to insert the links by yourself modify your theme and add the following code:

    <?php if (function_exists('the_seo_friendly_links')) {
       echo the_seo_friendly_links();
    }?>

    I added the instructions to the settings page so they can be found easily.

  17. nbercasio
    Member
    Posted 3 years ago #

    I am still learning PHP so when you say modify your theme, which PHP file or are you talking about each blog post?

  18. Michael Henke
    Member
    Plugin Author

    Posted 3 years ago #

    You can try single.php if you have one but it depends heavily on your theme.

  19. nbercasio
    Member
    Posted 3 years ago #

    I have single.php, inserted the code on the very bottom but I don't see any difference. I going to hit the road now, will continue working on my site on Tuesday. Thanks for the help. Have a good weekend.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic