Social Bookmarks Mod updated

Comments (4)

Just a quick update on the social bookmarks mod of mine, I recently noticed that when using it on a "page", it wasn't displaying the correct link url, so I have fixed fix this, if you were using my default social.php, this is a drop in replacement, if not, note the changes, first find;

//grabs the url to the article
$social_url = urlencode(_SITE.$uri."/".$r['asef']);

and then change it to;

//grabs the url to the article
if (empty($currentPage)) {
    $social_url = urlencode($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
} else {
    $social_url = urlencode(_SITE.$uri."/".$r['asef']);
}

That's it! Updated INSTALL instructions are included in the zip file.

bookmark / share this: Bookmark and Share
rated 3.83/5 (6 votes)


4 comments

Add a new comment »

Patric Patric said:
Jan 25th, 2010 at 11:54 am

Another addition to this would be to add the Facebook sharing link and icon: Add this to your social.php in the lik section:

<a href="http://www.facebook.com/sharer.php?u=$social_url&title=$social_title"><img src="/images/social/facebook.png" alt="facebook" style="$img_style" />

And if you need a icon:

http://p-ahlqvist.com/images/social/facebook.png

Thanks, Matty.


Matt Matt said:
Jan 25th, 2010 at 12:13 pm

no problem man :)


Tatsu Tatsu said:
Mar 29th, 2010 at 12:07 pm

Howdy,

can anyone tell me how to add to this bookmarks...the next pages:
* Twitter
* myspace
* google
* Live
* newsvine
If anyone would so good to poste the code! Tnx for your help!


Matt Matt said:
Mar 29th, 2010 at 12:24 pm

Hi Tatsu,

Give these a try...

<a href="http://twitter.com/home?status=$social_title-$social_url"><img src="/images/social/twitter.png" alt="twitter" style="$img_style" /></a>

<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=$social_url&amp;t=$social_title"><img src="/images/social/myspace.png" alt="myspace" style="$img_style" /></a>

<a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=$social_url&amp;$social_title=$social_title"><img src="/images/social/google.png" alt="google" style="$img_style" /></a>

<a href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=$social_url&amp;$social_title=$social_title"><img src="/images/social/live.png" alt="live" style="$img_style" /></a>

<a href="http://www.newsvine.com/_tools/seed&amp;save?u=$social_url&amp;h=$social_title"><img src="/images/social/newsvine.png" alt="newsvine" style="$img_style" /></a>



Write a comment

* = required field

:

:

:

:

You may insert urls in plain text, urls will be automatically linkified for trusted users and on seasoned posts only. All first comments are moderated, so use your email if you want to be remembered.


Back to top