Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » SSocialize Installation

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1099 Views
  • meesto
    Avatar
    Community Member
    3 Posts

    SSocialize Installation Link to this post

    I am having some issues installing SSocialize. I've downloaded the most recent version, extracted, renamed the directory to be "ssocialize" and have uploaded it to the root of my SS install. I've also run the dev/rebuild process and all looks OK. This is the point where I get stuck.

    What am I supposed to enter into my _config.php file to get my blog and other pages to show a share on Facebook and Twitter button?

    The installation steps mention a few lines of code, but when I add something like:

    SSocialize::these('Blog');


    SilverStripe breaks and only shows a blank white page.

    I would like to see an example of what I should be using to get this to work. I am just barely able to read code and as such would appreciate seeing a full set of code for identifying a particular part of the site tree, FaceBook and Twitter feed links and a URL shortener.

    Thank you for your assistance.

    Regards,
    Chris

  • tchintchie
    Avatar
    Community Member
    63 Posts

    Re: SSocialize Installation Link to this post

    hi there!

    I´m not a pro with those things either but here´s what I added to my _config.php to make it work:

    SSocialize::these(array('HomePage', 'Page'));

    with these settings I got my facebook button on each page (even on my blog). Not sure what code you need if you only want to put it on specific pages such as the blog e.g. but my guesses are you just replace the 'Homepage', 'Page' with 'Blog' ???

    kind regards

  • meesto
    Avatar
    Community Member
    3 Posts

    Re: SSocialize Installation Link to this post

    Thanks for writing me back!

    So from what you've written if looks like the names correspond to the names of elements that are found in the theme/template location. So when I use this:

    SSocialize::these('Page');
    SSocialize::add_to_group(array('facebookShare'));

    and modify my Page.ss and BlogEntry.ss templates to include:

    <div class="innerpad">
                $Content
                $SSocializeLinkGroup
                $Form
                $PageCommentss
             </div>

    I can see the Facebook Share icon. I don't seem to be able to get Twitter to work though either on it's own or as part of an array. Thanks again for writing back. I hope I can get the rest of this working.

    Kind regards,
    Chris

  • meesto
    Avatar
    Community Member
    3 Posts

    Re: SSocialize Installation Link to this post

    OK then, I've sorted this out and it is working now. This is what I needed to use in my _config.php file:

    SSocialize::these('Page');
    TweetThis::set_short_url_class('BitlyURL');
    SSocialize::add_to_group(array('facebookShare', 'TweetThis'));
    SSocializeShortURL::set_shortener_params('myAPI_Key', 'myTwitterUserName');

    I did not realize from the installation instructions that I needed to declare TweetThis before adding it to the add_to_group call. It is all working fine now. You can see it in action on my brewery web site at http://kererubrewing.co.nz

    Regards,
    Chris

  • tchintchie
    Avatar
    Community Member
    63 Posts

    Re: SSocialize Installation Link to this post

    alright didn´t know that since I only use the facebook button. will keep it in mind though ;-)

    1099 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.