Social Web CMS
February 09, 2010, 06:42:32 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: We have reinvented SocialWebCMS as HotaruCMS, which is available to download from http://hotarucms.org.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Add To Module v.0.3  (Read 705 times)
Nick
Administrator
Hero Member
*****
Offline Offline

Posts: 668



View Profile WWW
« on: January 25, 2009, 10:22:52 am »

Add To v0.3
Created by: Nick Ramsay
Created on: 2008/01/25

Updated to v.0.3 on January 30th 2009

Description
Adds a drop-down box of social bookmarking links to each story.

Note: The only difference between this and the "Add this link to..." option already in most templates is that this one loads the bookmark links with Ajax.

Instructions
1. Upload the add_to folder to your modules folder. Install it from Module Management in Admin.
2. You'll need the following in /templates/your_template/link_summary.tpl:

 {checkActionsTpl location=tpl_link_summary_pre_report"}

before this block of code:

Code:
{if $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0}
<span id="xreport-{$link_shakebox_index}"><span id="linksummaryBury"><a href="javascript:{$link_shakebox_javascript_report}">{#PLIGG_Visual_Vote_Bury#}</a></span></span>
{/if}

Revision History
Nick 2008/01/30 - v0.3 Made the bookmark links load with Ajax
Nick 2008/01/29 - v0.2 Bug fix
Nick 2008/01/25 - v0.1 First version

* add_to.zip (23.15 KB - downloaded 49 times.)
« Last Edit: January 29, 2009, 11:28:20 pm by Nick » Logged

Reinventing SWCMS at HotaruCMS.org - testers, designers and developers wanted!
Nick
Administrator
Hero Member
*****
Offline Offline

Posts: 668



View Profile WWW
« Reply #1 on: January 29, 2009, 07:55:47 am »

Add To module updated to v.0.2

Changes:
Fixes a bug that shifted the "Report" button down with the "Add this link to..." box. Now the Report button stays where it should.
Logged

Reinventing SWCMS at HotaruCMS.org - testers, designers and developers wanted!
Nick
Administrator
Hero Member
*****
Offline Offline

Posts: 668



View Profile WWW
« Reply #2 on: January 29, 2009, 11:35:48 pm »

Updated the Add To module to v.0.3

Changes
- This module now loads the bookmark links with Ajax.

If you want to replace your "Add this link to..." stuff with this module, you'll need to remove the existing code from your template and then follow the instructions in the first post in this thread.

In /templates/your_template/link_summary.tpl

Remove:

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}


Also remove:

Code:
{if $Enable_AddTo eq 1}
<span id="addto-{$link_shakebox_index}" style="display:none"><br />{#PLIGG_Visual_LS_AddTo#}
&nbsp;&nbsp;<a title="submit '{$title_short}' to del.icio.us" href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url={$enc_url}&amp;title={$enc_title_short}', '{#PLIGG_Visual_LS_Delicious#}','toolbar=no,width=700,height=400'); return false;"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/delicious.png" border="0" alt="submit '{$title_short}' to del.icio.us" /></a>
&nbsp;&nbsp;<a title="submit '{$title_short}' to digg" href="http://digg.com/submit?phase=2&amp;url={$enc_url}&amp;title={$title_short}&amp;bodytext={$story_content}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/digg.png" border="0" alt="submit '{$title_short}' to digg" /></a>
&nbsp;&nbsp;<a title="submit '{$title_short}' to reddit" href="http://reddit.com/submit?url={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/reddit.gif" border="0" alt="submit '{$title_short}' to reddit" /></a>
&nbsp;&nbsp;<a title="submit '{$title_short}' to Pligg" href="http://pligg.com/submit.php?url={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/pligg.png" border="0" alt="submit '{$title_short}' to Pligg" /></a>
&nbsp;&nbsp;<a title="submit '{$title_short}' to yahoo" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$enc_url}&amp;title={$title_short}"><img src="{$my_base_url}{$my_pligg_base}/templates/{$the_template}/images/yahoomyweb.png" border="0" alt="submit '{$title_short}' to yahoo" /></a>
&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:bookmarksite('{$title_url}', '{$enc_url}')">{#PLIGG_Visual_LS_Fav_Book#}</a>&nbsp;&nbsp;
</span>
{/if}
   

Logged

Reinventing SWCMS at HotaruCMS.org - testers, designers and developers wanted!
davemackey
Administrator
Sr. Member
*****
Offline Offline

Posts: 271



View Profile WWW
« Reply #3 on: February 01, 2009, 03:29:33 pm »

Nick,
   This is great. Would you consider adding support for services like ShareThis and AddThis to the module? I think it would pretty much be adding a small block of javascript and setting two or three portions as variables and allowing site owners to fill in those spots with the correct info. from ShareThis/AddThis. Just a thought. Smiley
Dave.
Logged

- http://www.informednetworker.com/ - Informed Networker - Social News for IT Professionals.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!