Welcome to Geeklog, Anonymous Friday, December 13 2024 @ 12:43 pm EST

Geeklog Forums

Add to Digg, StumbleUpon, del.icio.us and a range of others


Status: offline

CavemanJoe

Forum User
Chatty
Registered: 09/20/06
Posts: 41
Location:Cheshire, England
cheerful
Heyla! The other night I found addtoany.com, and gave my GeekLog sites little links within the articles for users to submit them to their online bookmarks.

Here's the code for the link taken from twistedlibrarian.com - replace sitename and siteurl with your own details:

Text Formatted Code
<a href="http://www.addtoany.com/?sitename=Twisted%20Librarian&amp;siteurl=http%3A//www.twistedlibrarian.com/&amp;linkname={story_title}&amp;linkurl={article_url}&amp;type=page">Add this review to any online bookmarking service</a>


Placed in storytext.thtml and featuredstorytext.thtml, this fills in the title of the page and its URL. You could probably create a standard link for all GeekLog sites by extending this method to cover the site name and home URL, but I haven't tested this yet.

See it in action at twistedlibrarian.com - the links at the top-right of each story will add that particular story to your online bookmarks service (all services that I know of are supported).
Silly browser RPG: improbableisland.com!
 Quote

Status: offline

winnerdk

Forum User
Full Member
Registered: 04/24/05
Posts: 339
Location:Panama City, Republic of Panama
Very cool. Works like a charm. Thanks.

Don Winner, Panama-Guide.com

     19  Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
Quote by: CavemanJoe


Here's the code for the link taken from twistedlibrarian.com - replace sitename and siteurl with your own details:




siteurl is of course available in the story template as site_url so:

Text Formatted Code
<a href="http://www.addtoany.com/?sitename=Twisted%20Librarian&amp;siteurl={site_url}&amp;linkname={story_title}&amp;linkurl={article_url}&amp;type=page">Add this review to any online bookmarking service</a>


Site name is not currently available, so I've just checked in a tweak that includes site name as site_name, so in the next release from CVS:

Text Formatted Code
<a href="http://www.addtoany.com/?sitename={site_name}&amp;siteurl={site_url}&amp;linkname={story_title}&amp;linkurl={article_url}&amp;type=page">Add this review to any online bookmarking service</a>


Of course, the problem with this is that site_name, site_url etc will not properly be URL Encoded and thus might break your addtoany.com link.
 Quote

Status: offline

CavemanJoe

Forum User
Chatty
Registered: 09/20/06
Posts: 41
Location:Cheshire, England
Thanks for the amendments!
Well, story_title isn't URL encoded either, and addtoany seems to like it just fine. Maybe we could get away with it? I guess? Perhaps? :pray:
Silly browser RPG: improbableisland.com!
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: CavemanJoe

Thanks for the amendments!
Well, story_title isn't URL encoded either, and addtoany seems to like it just fine. Maybe we could get away with it? I guess? Perhaps? :pray:

Just don't try to submit a story with an ampersand in it.
 Quote

Status: offline

ItsCurly

Forum User
Junior
Registered: 12/05/05
Posts: 24
Was looking for something similar so modified the code slightly as I wanted some nice icons:

Grabbed the icons and uploaded into the bookmarkicons folder off my main images directory.

Would love to post the code, but Geeklog thinks its spam so keeps deleting the post.

Works a dream especially with Chameleon as I only need to add it to two files.

A question, would it be possible to do this with the forums, so add a link of the thread. That would be really handy for me.

Thanks,
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Posted for ItsCurly:
Was looking for something similar so modified the code slightly as I wanted some pretty icons:

Grabbed the icons and uploaded into the /bookmarkicons folder off my main images directory.

Text Formatted Code
<p>Add to: <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk={article_url}"><img src="images/bookmarkicons/googlebookmarks.png" alt="Google Bookmarks"></a> <a href="http://del.icio.us/post?url={article_url}&title={story_title}"><img src="images/bookmarkicons/delicious.png" alt="Del.icio.us Bookmarks"></a> <a href="http://favorites.live.com/quickadd.aspx?url={article_url}?story={story}&title={story_title}"><img src="images/bookmarkicons/live.gif" alt="Live Bookmarks"></a>

        <p><a href="http://www.addtoany.com/?sitename={site_name}&amp;siteurl={site_url}&amp;linkname={story_title}&amp;linkurl={article_url}&amp;type=page">Add this story to any other online bookmarking service</a></p>


Works a dream especially with Chameleon as I only need to add it to two files.


The original post was rejected by SLV. Can't tell which link triggered that verdict, though.

bye, Dirk
 Quote

All times are EST. The time is now 12:43 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content