View Single Post
  #1 (permalink)  
Old 07-12-2008, 12:20 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 2,155
Thanks: 290
Thanked 266 Times in 177 Posts
Thumbs up MOD: Replace your default Pligg Add to/share with Addthis/sharethis widgets

Addthis button:
visit Add This! - Social Bookmark & Feed Button Builder - click on get button code (default options are just fine) and add to desired position in link_summary.tpl - notice I have replaced the [url] and [TITLE] with pligg variables:

Code:
<!-- AddThis Button BEGIN -->
<script type="text/javascript">addthis_pub  = 'stevej123';</script>
<a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '{$enc_url}', '{$title_short}')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s9.addthis.com/button1-addthis.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>
<!-- AddThis Button END -->
If you want to link directly to your site then use {$my_base_url}{$my_pligg_base}{$story_url} instead of {$enc_url}


ShareThis:
Goto http://www.sharethis.com/publisher (no registration needed - you can safely click on 'No Thanks'), set desired options, click get code

Code:
<script type="text/javascript" src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=default&amp;publisher=2975655c-edbd-4475-aa0a-dc4db6ccd1eb"></script>
But this will only provide link to the document.url - so no customization to set particular urls while in index/upcoming pages possible to link to source or story page url.


In default yget template the desired location for adding this code is to replace the code below:
Code:
{if $Enable_AddTo eq 1}
				<span id="linksummaryAddLink">
					<a href="javascript://" onclick="var replydisplay=document.getElementById('addto-{$link_shakebox_index}').style.display ? '' : 'none';document.getElementById('addto-{$link_shakebox_index}').style.display = replydisplay;"> {#PLIGG_Visual_LS_AddThisLinkTo#}</a>&nbsp;
				</span>
			{/if}
Reply With Quote
The Following User Says Thank You to dollars5 For This Useful Post: