Welcome to Geeklog Sunday, October 22 2017 @ 11:21 am EDT


Status: offline

CavemanJoe

Forum User
Chatty
Registered: 20/09/2006
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:

PHP 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!

Status: offline

winnerdk

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

Don Winner, Panama-Guide.com


Status: offline

THEMike

Forum User
Moderator
Registered: 25/07/2003
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:

PHP 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:

PHP 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.

Status: offline

CavemanJoe

Forum User
Chatty
Registered: 20/09/2006
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!

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/2005
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.

Status: offline

ItsCurly

Forum User
Junior
Registered: 05/12/2005
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,

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
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.

PHP 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

All times are EDT. The time is now 11:21 am.

  • 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