HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Adding ShareThis code to Ocportal

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#103219 (In Topic #20213)
Avatar

Honoured member

I would like to use the http://www.sharethis.com/ side bar to my ocportal set up. it wants me to do this:

Place these script tags in "head" section of your html.

Code

<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript" src="http://s.sharethis.com/loader.js"></script>
----------
Now, put these scripts at the end of your page. They contain the parameter preferences in JSON format.

Code

<script type="text/javascript">stLight.options({publisher: "b16f1710-1d07-4d5f-8c96-0f268e54417d", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
<script>
var options={ "publisher": "b16f1710-1d07-4d5f-8c96-0f268e54417d", "position": "right", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}, "chicklets": { "items": ["facebook", "googleplus", "twitter", "linkedin", "stumbleupon", "pinterest", "email", "sharethis"]}};
var st_hover_widget = new sharethis.widgets.hoverbuttons(options);
</script>

Not sure exactly WHERE I would add those things in the site code....a quick pointer to the files to edit?
Back to the top
 
Posted
Rating:
#103220
Avatar

Community saint

You can place all of that code in the GLOBAL_HTML_WRAP.tpl template.

The first block of code for the "head" section would go between the <head> and </head> html tags near the top of the GLOBAL_HTML_WRAP.tpl template. The second block of code would go near the end of the same template, probably right after the line with {$EXTRA_FOOT} to make it easier to find if you need to change or remove it in the future.
Back to the top
 
Posted
Rating:
#103230
Avatar

Honoured member

I've used that before i also sometimes add it to the bottom of the News Template too (i forget the exact file off hand) instead of the inbuilt sharing options

Just Jarv
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: