News:

Wondering if this will always be free?  See why free is better.

Main Menu

Social Bookmarks

Started by M-DVD, October 14, 2007, 04:06:46 PM

Previous topic - Next topic

M-DVD

Link to Mod




MOD Social Bookmarks v2.0
===================






  • Create by:
karlbenson
  • Developed by:
M-DVD
  • Version:
2.0
  • Languages:
  • Compatible With:
SMF 1.1.1 - 1.1.8
SMF 2 RC1




Comment this Mod
My MODs
Images
Help support my MODs

  • You like report an error or new site? Check it

Features:

  • With this MOD you can adds icons to social bookmark your topics via up to +50 social bookmarking sites.

  • By default the 7 most popular social bookmarking sites are enabled.

  • You can enable and disable +50 social bookmarking sites:
    Admin > Posts and Topics > Social Bookmarks Settings

  • You can add "nofollow" in links

  • New XHTML and CSS style more light

==========================

Languages (normal & utf-8)


  • English
  • English_British
  • Spanish_Es
  • Spanish_Latin

$txt['socialbookmarks_01'] = 'Show Social Bookmarks Icons Top';
$txt['socialbookmarks_02'] = 'Show Social Bookmarks Icons Down';
$txt['socialbookmarks_03'] = 'Show Icons Hover Social Bookmarks';
$txt['socialbookmarks_04'] = 'Add "nofollow" in links';

$txt['manageposts_socialbookmarks_settings'] = 'Social Bookmarks Settings';
$txt['manageposts_socialbookmarks_settings_description'] = 'Here you can set all settings involving
social bookmarks.'
;


I welcome new translations here

==========================

Características:

  • Con este MOD puedes añadir iconos de marcadores sociales desde tus temas con más de 50 sitios a elegir.

  • Por defecto están activados los 7 más populares.

  • También puedes activar y desactivar todos los sitios:
    Administración > Mensajes y Temas > Configuración de Marcadores Sociales

  • Tiene un XHTML y CSS nuevo y más ligero.

Fin.

ES23

8: Undefined variable: socialbookmark
File: /var/www/html/forums/Sources/Display.php
Line: 1375

This is the error encountered after installing the mod and visiting the topic.

How do I go about solving this error?

forty

it works for me with smf 1.1.4 and tinyportal 0.9.8.
how can i use it show on the article section in tinyportal?

falguni1

the bookmarks look beautiful can you add some more bookmarks to the list hehe.

forty

i think the beta version is the one with 30 bookmarking sites.

karlbenson

This one has 30 bookmarks.

Its just only the major 7 sites are enabled by default.
Then other 23 can be enabled by uncommenting the code.

Forty, I have never used TinyPortal so I wouldn't know how to add stuff to tinyportal.  It would therefore probably be best to bring it up on TP.net

ES23

This mod works fine for me as well but there are errors shown on the forum error log everytime I visit the topic an try clicking on the 7 icons ... Is there any way to clear up this error?I got the feeling that there is some coding problem for modifications made to Display.php ...

8: Undefined variable: socialbookmark
File: /var/www/html/forums/Sources/Display.php
Line: 1375

Aileen

How can I use this in other themes?

karlbenson

#8
ES23,
I've got through the mod and I can't see any errors.
Can you attach your display.php file here please.
Have you unlocked any further social bookmarking sites?
Is the mod enabled via your admin area?

Will888.
This mod needs to be manually installed onto other themes.  Please see http://docs.simplemachines.org/index.php?topic=402.msg531

ES23

Attached is my Display.php file :) Please advise.

And I have found a small error under modifications to Display.php

The line
$socialbookmark[] = array('name' => 'Digg', 'icon' => 'digg', 'url' => '>http://www.digg.com/submit?phase=2&url=$1&title=$2');

should be changed to

$socialbookmark[] = array('name' => 'Digg', 'icon' => 'digg', 'url' => 'http://www.digg.com/submit?phase=2&url=$1&title=$2');

with the > removed or the booking for digg would have some problems.

Also,

for modifications made to Display.php,

The code

// START OF SOCIAL BOOKMARKS
if($modSettings['socialbookmarks']) {
$socialbookmark = array();
// DEFAULT MOST POPULAR BOOKMARKING SITES
$socialbookmark[] = array('name' => 'Del.icio.us', 'icon' => 'delicious', 'url' => 'http://del.icio.us/post?url=$1&title=$2');
$socialbookmark[] = array('name' => 'Digg', 'icon' => 'digg', 'url' => 'http://www.digg.com/submit?phase=2&url=$1&title=$2');
$socialbookmark[] = array('name' => 'FURL', 'icon' => 'furl', 'url' => 'http://www.furl.net/storeIt.jsp?t=$2&u=$1');
$socialbookmark[] = array('name' => 'FaceBook', 'icon' => 'facebook', 'url' => 'http://www.facebook.com/share.php?u=$1');
$socialbookmark[] = array('name' => 'Stumble Upon', 'icon' => 'stumbleupon', 'url' => 'http://www.stumbleupon.com/submit?url=$1&title=$2');
$socialbookmark[] = array('name' => 'Reddit', 'icon' => 'reddit', 'url' => 'http://reddit.com/submit?url=$1&title=$2');
$socialbookmark[] = array('name' => 'SlashDot', 'icon' => 'slashdot', 'url' => 'http://slashdot.org/bookmark.pl?title=$2&url=$1');
// UNLOCK EXTRA BOOKMARK SITES
// or ADD YOUR OWN (use $1 for the url, $2 for the topic subject)
// Remove the // before any of the lines to unlock any bookmarking sites listed below
// $socialbookmark[] = array('name' => 'Ask', 'icon' => 'ask', 'url' => 'http://mystuff.ask.com/mysearch/QuickWebSave?v=2.0&t=webpages&title=$2&url=$1');
// $socialbookmark[] = array('name' => 'BlinkBits', 'icon' => 'blinkbits', 'url' => 'http://blinkbits.com/bookmarklets/save.php?v=1&source_url=$1&title=$2');
// $socialbookmark[] = array('name' => 'BlinkList', 'icon' => 'blinklist', 'url' => 'http://blinklist.com/index.php?Action=Blink/addblink.php&Name=$2&Description=$2&Url=$1');
// $socialbookmark[] = array('name' => 'Co.mments', 'icon' => 'comments', 'url' => 'http://co.mments.com/track?url=$1&title=$2');
// $socialbookmark[] = array('name' => 'Delirious', 'icon' => 'delirious', 'url' => 'http://de.lirio.us/rubric/post?uri=$1');
// $socialbookmark[] = array('name' => 'Feed Me Links', 'icon' => 'feedmelinks', 'url' => 'http://feedmelinks.com/categorize?from=toolbar&op=submit&name=$2&url=$1&version=0.7');
// $socialbookmark[] = array('name' => 'Google Bookmarks', 'icon' => 'googlebookmarks', 'url' => 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=$1&title=$2');
// $socialbookmark[] = array('name' => 'Linkagogo', 'icon' => 'linkagogo', 'url' => 'http://www.linkagogo.com/go/AddNoPopup?url=$1&title=$2');
// $socialbookmark[] = array('name' => 'Ma.gnolia', 'icon' => 'magnolia', 'url' => 'http://ma.gnolia.com/bookmarklet/add?url=$1&title=$2&description=$2');
// $socialbookmark[] = array('name' => 'MSN Live', 'icon' => 'msnlive', 'url' => 'https://favorites.live.com/quickadd.aspx?url=$1&title$2');
// $socialbookmark[] = array('name' => 'Netscape', 'icon' => 'netscape', 'url' => 'http://www.netscape.com/submit/?U=$1&T=$2');
// $socialbookmark[] = array('name' => 'Netvouz', 'icon' => 'netvouz', 'url' => 'http://netvouz.com/action/submitBookmark?url=$1&title=$2&popup=no');
// $socialbookmark[] = array('name' => 'Newsvine', 'icon' => 'newsvine', 'url' => 'http://www.newsvine.com/_wine/save?u=$1&h=$2');
// $socialbookmark[] = array('name' => 'RawSugar', 'icon' => 'rawsugar', 'url' => 'http://www.rawsugar.com/tagger/?turl=$1&tttl=$2');
// $socialbookmark[] = array('name' => 'Rojo', 'icon' => 'rojo', 'url' => 'http://www.rojo.com/add-subscription/?resource=$1');
// $socialbookmark[] = array('name' => 'Smarking', 'icon' => 'smarking', 'url' => 'http://smarking.com/editbookmark/?url=$1&title=$2');
// $socialbookmark[] = array('name' => 'Socializer', 'icon' => 'socializer', 'url' => 'http://ekstreme.com/socializer/?url=$1&title=$2');
// $socialbookmark[] = array('name' => 'Sphinn', 'icon' => 'sphinn', 'url' => 'http://sphinn.com/submit.php?url=$1&title=$2');
// $socialbookmark[] = array('name' => 'Spurl', 'icon' => 'spurl', 'url' => 'http://www.spurl.net/spurl.php?url=$1&title=$2&v=3&blocked=$2');
// $socialbookmark[] = array('name' => 'Squidoo', 'icon' => 'squidoo', 'url' => 'http://www.squidoo.com/lensmaster/bookmark?$1');
// $socialbookmark[] = array('name' => 'Tailrank', 'icon' => 'tailrank', 'url' => 'http://tailrank.com/share/?title=$2&link_href=$1');
// $socialbookmark[] = array('name' => 'Technorati', 'icon' => 'technorati', 'url' => 'http://www.technorati.com/faves?add=$1');
// $socialbookmark[] = array('name' => 'Yahoo My Web', 'icon' => 'yahoomyweb', 'url' => 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=$1&t=$2');

// CREATE URL/TITLE & URLENCODE
$url = urlencode($scripturl . '?topic=' . $topic . '.0');
$title = urlencode($topicinfo['subject']);

// REPLACE $1 AND $2 WITH THE URL AND TITLE
foreach($socialbookmark as $a => $b) {
$b['url'] = str_replace('$1', $url, $b['url']);
$socialbookmark[$a]['url'] = str_replace('$2', $title, $b['url']);
}
// TIDY UP
unset($a,$b);
}

// PASS THE VARIABLE TO THE THEME
$context['socialbookmarks'] = $socialbookmark;
// END OF SOCIAL BOOKMARKS


should be added in front of



}

// Load up the "double post" sequencing magic.
if (!empty($options['display_quick_reply']))
checkSubmitOnce('register');


or you may not be able to see the social bookmarks(for some ppl).

karlbenson

[Mod]
1.1 - 20th October 2007
o Added English_British/English_British-utf8
o Fixed Bug with Digg link

haiwasnm

karlbenson, my hero ! Gread mod

forty

i also want to put the bookmark icons above the <board name> > <category> (category page)
bec in your mod it only show in the read topic page.

so what file should i edit?
thanks.

karlbenson

I don't see why you would want to.
Your only meant to bookmark/digg actual content, not a forum or board. eg the posts.

And I don't that level of support for adding it to other areas/making edits anyway. I just don't have the time nor the desire.  If you really want it I would suggest requesting in the Help Wanted forum with a [free] or [paid] request for someone to do the 'custom' work for you.

medflux

Hey karlbenson , nice mod as usual , actually you are the best.. :D

Just a small problem , i installed the mod successfully to a custom mod and it showed the default 7 icons working fine , i wanted to add some more , so when i went to Sources/Display.php and searched for

      // UNLOCK EXTRA BOOKMARK SITES

I couldn't find that code , i tried alot but no use , so i can't add any more bookmarks sites

karlbenson

it is probably around line 810 (maybe a slightly further down depending on how many other mods you have installed).

if you stilll can't find it, attach your Display.php here and I will give you the exact line no.

medflux

#16
Oh , you are right , it's working fine now , i added extra 4 ones :D

Only remains a small catch : when i tried to add all the remaining bookmarks , the layout slightly got distorted , becuz the icons arranges in a single row of 16 icons above each topic before it starts to make another one below the first one ... only if i could split it to more rows may be 6-7 icons each , it won't distort the layout ... don't know if this is related to the mod , but i'm asking anyway

Also , if my forum users bookmarked alot of my topics , does this help my results in search engines ??

at last : another big thank you for this great mod , can't wait to see your next masterpiece :D

karlbenson

It isnt designed to split them equally.
If ALL of them are enabled, it will fill two lines.

To alter it to your own needs
FIND

// SOCIAL BOOKMARK BOX
if($modSettings['socialbookmarks']) {
echo '<div style="width:320px;

Change the 320px to a smaller/larger width to force more or less on the same line.

medflux

mission accomplished  :D

but you didn't answer : do i get better search engines ranking ?

karlbenson

sorry missed that but.

If you get some topics bookmarked you may get some visitors coming your way. If you get anywhere near the top page on Digg/Slashdot etc, you will get hammered.  Thats what is known as "The Slashdot Effect".

You may pick up a few more backlinks which may slightly increase the PR of your site. But mostly it won't affect search engines.  This is more to do with humans and bookmarking.

Advertisement: