[Oscailt] Adding links for Social Bookmarking

Terence S terence010203 at yahoo.co.uk
Thu Apr 24 14:44:21 PDT 2008


Folks,
I was just going through the mailing list archives and noticed that last May 07, Toscana IMC asked about how to add social bookmarks in Oscailt namely in the Article Viewer module
Original email is here
http://lists.indymedia.org/pipermail/oscailt/2007-May/0512-mf.html

For example for the Digg It social website the URL that you place on your own site is of the form:
http://digg.com/submit?phase=2&url=[URL]&title=[TITLE]

The question was how to extract the URL and TITLE. 

Within the articledisplay.inc, you just go to the location where you want to generate the DiggIt url -probably near the end of the story. To extract the title you use $story->story_title

For the URL, you want the full site URL and the story id and it is of the form:
www.yoursite.domain/article/story_id

Use something like:
 $social_url = $system_config->site_url ."/article/" .$story->story_id

Make sure global $system_config is declared in whatever function you do this.

Then generate the full url like:
$diggit_url ="http://digg.com/submit?phase=2&url=" . $social_url ."&title=".$story->story_title;

And output it as something like <a href="$diggit_url">Digg this story</a>

rgds
Terence

       
---------------------------------
Sent from Yahoo! Mail.
A Smarter Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.indymedia.org/pipermail/oscailt/attachments/20080424/f5e6c33c/attachment.htm 


More information about the Oscailt mailing list