Travel
 | 
Food
 | 
Arts
 | 
Sports
 | 
Advice
 | 
Life
 | 
Greensboro
 |  Secularity |  Blog

Social Bookmarking Mod for PHPBB3

by Liv | Published on Sun May 17, 2009 12:54 am | Advice
Here's the Share Square, a social bookmarking modification for PHPBB3 forums.

Not a big fan of the "bookmark them all" websites and the risks associated with running their script on every page. Also there's not much out there that does just the "big" social sites, so I wrote my own. It will actually work with any blogging software since all you have to do is pass the URL and title via a GET variable... but I thought I'd post it here for PHPBB3 users:

1) Download sharesquare_v3.zip, decompress and upload sharesquare.php to your root directory.
sharesquare_v3.zip
(1.17 KiB) Downloaded 248 times


2) Open viewtopic.php in your root directory and find:
Code: Select all
   'FORUM_ID'       => $forum_id,


before it add:
Code: Select all
'U_SHARE_SQUARE' => urlencode("http://{$_SERVER['HTTP_HOST']}/viewtopic.$phpEx?f=$forum_id%26t=$topic_id"),
'SHARE_SQUARE_TITLE' => urlencode($topic_data['topic_title']),


3) open your viewtopic_body.html template (forum\style\{style name}\template\viewtopic_body.html) in your administrator control panel and find:
Code: Select all
{postrow.MESSAGE}

after it add:
Code: Select all
<!-- IF postrow.S_FIRST_ROW -->
<div style="align:left;">
<iframe src="sharesquare.php?url={U_SHARE_SQUARE}&title={SHARE_SQUARE_TITLE}" width="100%" height="40" frameborder="0" scrolling="no"><a href="http://greensboring.com/viewtopic.php?f=23&t=10521">Social Bookmarking for PHPBB</a></iframe>
</div>
<!-- ENDIF -->


Of course fudging the U_SHARE_SQUARE variable will allow you to adapt for subdomains, etc. and so on.

Updates:
5/24/2009 - Fixed Yahoo Buzz.
9/2/2009 - Added Rededit & Delicious

 
Hi there.. Your Social bookmarking script for PHPBB3 is not so popular but it is the best I've seen. Thanks a lot.

One suggestion to be updated in the post.
change "3) open your topic template and find:" to "open forum\style\{style name}\template\viewtopic_body.html and find"

I followed the steps as above, but I got a a vertical window on the right side of the very first post where as you get a horizontal window at the bottom of the last post. Can you please look at the page below let me know how to fix it.
http://www.right2.info/forum/viewtopic.php?f=13&t=15

I don't know if you would be free enough to solve this issues but thanks for giving un-bloated and best "Social Bookmarking" script for phpbb3.
Guest
 
Thanks for this MOD. couple of issues though. This script doesn't give Reddit and Delicious links as they are not in the coded into PHP file in sharesquare_v2.zip. Also, Mouse hover doesn't appear in case of Yahoo. Check your page itself. Look forward for these two issues being fixed.
Guest
 
Guest wrote:Hi there.. Your Social bookmarking script for PHPBB3 is not so popular but it is the best I've seen. Thanks a lot.

One suggestion to be updated in the post.
change "3) open your topic template and find:" to "open forum\style\{style name}\template\viewtopic_body.html and find"

I followed the steps as above, but I got a a vertical window on the right side of the very first post where as you get a horizontal window at the bottom of the last post. Can you please look at the page below let me know how to fix it.
http://www.right2.info/forum/viewtopic.php?f=13&t=15

I don't know if you would be free enough to solve this issues but thanks for giving un-bloated and best "Social Bookmarking" script for phpbb3.


Thanks!

Yes, eventually I decided the vertical one just took up too much screen real-estate, and was tossed in lieu of the slimmer version you see here. (I just never got around to uploading it for distribution.) I just updated the file up top, and the associated code. (Basically just change the viewtopic_body.html to a left hand div and upload the new script, and you can skip the viewtopic.php codes, as they're all the same.)
User avatar
Liv
Just sit there and watch me!
 
Guest wrote:Thanks for this MOD. couple of issues though. This script doesn't give Reddit and Delicious links as they are not in the coded into PHP file in sharesquare_v2.zip. Also, Mouse hover doesn't appear in case of Yahoo. Check your page itself. Look forward for these two issues being fixed.


Version 3 (just uploaded adds these two bookmarking sites)...

Yahoo, (and rededit) are both Javascripts so they operate in a different manner than the other links.
User avatar
Liv
Just sit there and watch me!
 
For me educating the user that they can social bookmark is quite important, so a prominent vertical list taking more real estate is OK so I mixed and matched the v2 and v3. :) and made the list vertical. You have added new site and I didn't notice the difference.
There is a bug in v3. Look at word "submit" getting displayed at the end of reddit which is again for reddit submission. "submit" adds another column in vertical display (of v2). Check out the page above. Also, Reddit icon is having a black border. :(
Guest
 
That's on rededit's part.... it's apart of their "count" mechanism which I believed is replaced once it's rededit... I may at some point change that as it bugs me a bit too....

I'll give it a few weeks and see how I like it.
User avatar
Liv
Just sit there and watch me!
 
How do I change the background color? My forum is black but the iframe is white.
genesis2
 
genesis2 wrote:How do I change the background color? My forum is black but the iframe is white.


Good question!

You're going to have to open up the sharesquare.php file and find the 'style' portion of the code, it's right towards the top.... in it find this:

Code: Select all
<style type="text/css">


Right after it and before the next line add this:

Code: Select all
body { background: #000000; }


Or whatever exact shade of black you have by altering the '000000' to the appropriate hexidecimal equivelent.
User avatar
Liv
Just sit there and watch me!
 
Thank you for this mod! I've spent the last five days looking for such a thing, and have devoted much of that time in the effort of trying to cobble together what measly little attempts I have found. This took me five minutes to install and customize, and it is working perfectly! :dance:
Fliggerty