Social Bookmarks v2

Started by renlok, August 08, 2008, 05:40:20 PM

Previous topic - Next topic

renlok

Link to Mod

An upgrade of karlbenson Social Bookmarks to work with 2.0 Beta 3.1 Public.

Adds social bookmarks to the top of each thread. You can easily change which are shown simply open
Sources/Display.php
and search for
// UNLOCK EXTRA BOOKMARK SITES

then remove/add comments where needed.
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

SwapsRulez

I'm the first one to have problem. :D

http://www.project-bb.org/index.php?pretty;board=feedback;topic=shoutbox-is-up!.msg3643
8: Undefined index: socialbookmarks
File: /home/vol5/byethost8.com/b8_1764301/project-bb.org/htdocs/Themes/default/Display.template.php (main sub template - eval?)
Line: 13
   
http://www.project-bb.org/index.php?pretty;board=feedback;topic=shoutbox-is-up!.msg3643
8: Undefined index: socialbookmarks
File: /home/vol5/byethost8.com/b8_1764301/project-bb.org/htdocs/Sources/Display.php
Line: 1128

I'm using SMF 2.0 Beta 3.1 off course as the mod is for that version only. :P
The MOD installed correctly, but i got the above error messages in the error log.

All links of those icons are redirecting me to the same page. Means..

Suppose if you have page http://www.project-bb.org/index.php (just an example, i know the icons don't show on these pages)

After clicking any of the icon, it redirects to the same page. :(

You know the solution of the problem. :(
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

hmm, did you edit the mod atall other than removing the comments?
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

Quote from: renlok on August 18, 2008, 05:28:46 PM
hmm, did you edit the mod atall other than removing the comments?

Nope, i've only removed the comments to unlock the extra mods. But the problem was the same before i edited it. :(
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

hmm i guess its a problem with
foreach($socialbookmark as $a => $b) {
   $b['url'] = str_replace('$1', $url, $b['url']);
   $socialbookmark[$a]['url'] = str_replace('$2', $title, $b['url']);
}

add

print_r($socialbookmark);

and see what is displays
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

#6
Just 1 sec... I'm doing that... :P

But where to add in display or template ? Also inside for loop or outside ?
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

SwapsRulez

Update : Added that after for loop in display.php

got this...




Array ( [0] => Array ( [name] => Mixx [icon] => mixx [url] => http://www.mixx.com/submit?page_url=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [1] => Array ( [name] => Del.icio.us [icon] => delicious [url] => http://del.icio.us/post?url=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [2] => Array ( [name] => Digg [icon] => digg [url] => http://www.digg.com/submit?phase=2&url=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [3] => Array ( [name] => FURL [icon] => furl [url] => http://www.furl.net/storeIt.jsp?t=Entering+text+which+appears+as+asterisk+i.e.+password+format&u=http://www.project-bb.org/index.php?topic=3244.0  ) [4] => Array ( [name] => FaceBook [icon] => facebook [url] => http://www.facebook.com/share.php?u=http://www.project-bb.org/index.php?topic=3244.0  ) [5] => Array ( [name] => Stumble Upon [icon] => stumbleupon [url] => http://www.stumbleupon.com/submit?url=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [6] => Array ( [name] => Reddit [icon] => reddit [url] => http://reddit.com/submit?url=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [7] => Array ( [name] => WeLink [icon] => welink [url] => http://link.we-link.co.uk/bookmarks.php/?action=add&address=http://www.project-bb.org/index.php?topic=3244.0&title=Entering+text+which+appears+as+asterisk+i.e.+password+format  ) [8] => Array ( [name] => SlashDot [icon] => slashdot [url] => http://slashdot.org/bookmark.pl?title=Entering+text+which+appears+as+asterisk+i.e.+password+format&url=http://www.project-bb.org/index.php?topic=3244.0  ) )
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

...well thats looks fine, what other mods do you have installed?
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

1.     Social Bookmarks for SMF 2     1.1     
2.    Add Favicon.ico Support    1.0    
3.    DisplayPostedTopicsMod    1.0    
4.    nneonneo's AJAX ShoutBox    1.20    
5.    AJAX Instant Quick Reply    1.0.1    
6.    Pretty URLs    0.9    
7.    Copy Topics    1.4    
8.    Hide Signatures for Guest    1.0    
9.    Message Index Formatting    1.0    
10.    Disable Right click    2.0    
11.    Add Domaintools to TrackIP    1.1    
12.    autoTooltips autoLinktips for SMF    0.9    
13.    PM Popup - Uses Active Window    1.3    
14.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0    
15.    Joined Date    1.0    
16.    Hide SMF Version    1.0.2    
17.    Auto Email Inactive Users    1.7    
18.    Hide Tag    2.2.1    
19.    Alternativ Protocol Fix    1.0.1    
20.    Custom Action Mod    3.0    
21.    Auto Embed Video Clips    2.2    
22.    Digg in Topics (for 2.0 Beta 3)    1.3    
23.    Remove Post Modified Time    1.2    
24.    SMF Sitemap    1.3.0    
25.    vBulletin Style Meta Tags    1.1    
26.    No Temp Directory Removal    1.0    
27.    Case Insensitive Smileys    1.1    
28.    Randomized Newsfader    1.0    
29.    Recount Posts Maintenance    1.1    
30.    Profil Moderator Managment    1.0.0    
31.    Order News    1.0.4    
32.    BoardHover Mod    1.2    
33.    More Spiders    1.0    
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

urgh im far to lazy to look those but i think it may a problem because of Pretty URLs    0.9   

try

changing

$url = $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']);
}


to


$socialurl = $scripturl . '?topic=' . $topic . '.0';
$socialtitle = urlencode($topicinfo['subject']);

// REPLACE $1 AND $2 WITH THE URL AND TITLE
foreach($socialbookmark as $a => $b) {
$b['url'] = str_replace('$1', $socialurl, $b['url']);
$socialbookmark[$a]['url'] = str_replace('$2', $socialtitle, $b['url']);
}
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

Still not working... I really need this nice mod... :(
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

#12
erm, try add print_r($context['socialbookmarks']) before foreach($context['socialbookmarks'] as $a => $b) { in the display template


EDIT:
Actually could you just send me the display and the display template that would be far easier.
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

ahk... attaching....  ;)

btw...Maximum attachment size allowed: 5096 KB, per post: 36

is that real ? :o
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

lol well that wasn't very helpful. Pfft im hopeless at this. Well the only other thing that i can see that might be the problem is on the template $context['socialbookmarks'] may be set incorrectly but ive no idea why that would happen. Urm stick print_r($context['socialbookmarks']) before foreach($context['socialbookmarks'] as $a => $b) { if that doesnt show anything odd, im afraid ive no idea what might be the problem.
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

SwapsRulez

Quote from: renlok on August 20, 2008, 03:28:27 PM
lol well that wasn't very helpful. Pfft im hopeless at this. Well the only other thing that i can see that might be the problem is on the template $context['socialbookmarks'] may be set incorrectly but ive no idea why that would happen. Urm stick print_r($context['socialbookmarks']) before foreach($context['socialbookmarks'] as $a => $b) { if that doesnt show anything odd, im afraid ive no idea what might be the problem.

Can it be written manually instead of passing some varibles or arrays or something ? :(
Project-BB.org : Educational Forum For Engineering, Diploma & Technical Students

The Engineering, Diploma & All technical students lounge for Free Projects, Seminars, Syllabus, Question Papers, College Assignments, Placement Papers, E-Books, Company Information & other technical stuffs.

renlok

yeah thats a good idea OK change the display.php code to

// START OF SOCIAL BOOKMARKS
if($modSettings['socialbookmarks']) {
// PASS THE VARIABLE TO THE THEME
$context['socialurl'] = $scripturl . '?topic=' . $topic . '.0';
$context['socialtitle'] = urlencode($topicinfo['subject']);;
}
// END SOCIAL BOOKMARK BOX


and the template.display code to


// SOCIAL BOOKMARK BOX
if($modSettings['socialbookmarks']) {
echo '<div style="width:320px;padding:2px;float:right;text-align:right;" class="socialbookmark">';
echo '<a href="http://del.icio.us/post?url='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="Del.icio.us" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/delicious.png" title="Del.icio.us" alt="Del.icio.us"></a> <a href="http://www.digg.com/submit?phase=2&amp;url='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="Digg" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/digg.png" title="Digg" alt="Digg"></a> <a href="http://www.furl.net/storeIt.jsp?t='.$context['socialtitle'].'&amp;u='.$context['socialurl'].'" title="FURL" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/furl.png" title="FURL" alt="FURL"></a> <a href="http://www.facebook.com/share.php?u='.$context['socialurl'].'" title="FaceBook" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/facebook.png" title="FaceBook" alt="FaceBook"></a> <a href="http://link.we-link.co.uk/bookmarks.php/admin?action=add&amp;address='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="WeLink" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/welink.png" title="WeLink" alt="WeLink"></a> <a href="http://www.stumbleupon.com/submit?url='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="Stumble Upon" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/stumbleupon.png" title="Stumble Upon" alt="Stumble Upon"></a> <a href="http://reddit.com/submit?url='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="Reddit" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/reddit.png" title="Reddit" alt="Reddit"></a> <a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk='.$context['socialurl'].'&amp;title='.$context['socialtitle'].'" title="Google Bookmarks" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/googlebookmarks.png" title="Google Bookmarks" alt="Google Bookmarks"></a> <a href="http://www.squidoo.com/lensmaster/bookmark?'.$context['socialurl'].'" title="Squidoo" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/squidoo.png" title="Squidoo" alt="Squidoo"></a> <a href="http://www.technorati.com/faves?add='.$context['socialurl'].'" title="Technorati" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/technorati.png" title="Technorati" alt="Technorati"></a> <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u='.$context['socialurl'].'&amp;t='.$context['socialtitle'].'" title="Yahoo My Web" target="_blank"><img src="'.$settings['default_images_url'].'/socialbookmarks/yahoomyweb.png" title="Yahoo My Web" alt="Yahoo My Web"></a>';
echo '</div><br />';
}
// END SOCIAL BOOKMARK BOX
WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

renlok

WeLink Directory
How Do I? - Get help with anything.
WeBid - Free auction script.

RoarinRow


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Frozt

I have a problem, in my forum the mod not work now, in the local installation work, but after I upload the forum I see that all links open again the topic of the forum in a new window instead go to the social bookmarking site

I use 2.0 Beta 4
and I use Pretty URLs for use seo urls, but in local I have the same configuration and work
I have the last version of Social Bookmarks v2

Advertisement: