miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

How to implement Social Bookmarking (Digg, Del.icio.us, Facebook) script in every thread?

 
Author Benluke
Partaker
#1 | Posted: 5 Dec 2008 05:46 
Hi,

I'm wondering where I would impliment the following social bookmarking code - So it would appear in every topic.

I geuss I would like it to appear after the last reply.

Social Bookmarking

<div style="border-top-style:solid; padding-top:3px; border-top-width: 1px; border-top-color: #2A4956; float: left;">

<a rel="nofollow" style="text-decoration:none;" href="http://digg.com/" onclick="window.open('http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(location.href)+'&amp;bodytext=&amp;tag s=&amp;title='+encodeURIComponent(document.title));return false;" title="Bookmark to: Digg"> <img style="padding-bottom:1px;" src="digg.gif" alt="Bookmark to: Digg" name="Digg" border="0" id="Digg"/> </a>

<a rel="nofollow" style="text-decoration:none;" href="http://del.icio.us/" onclick="window.open('http://del.icio.us/post?v=2&amp;url='+encodeURIComponent(location.href)+'&amp;notes=&amp;tags=&amp ;title='+encodeURIComponent(document.title));return false;" title="Bookmark to: Del.icio.us"> <img style="padding-bottom:1px;" src="del.gif" alt="Bookmark to: Del.icio.us" name="Delicious" border="0" id="Delicious"/> </a>

<a rel="nofollow" style="text-decoration:none;" href="http://www.facebook.com/" onclick="window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&amp;t='+encodeURICompon ent(document.title));return false;" title="Bookmark to: Facebook"> <img style="padding-bottom:1px;" src="facebook.gif" alt="Bookmark to: Facebook" name="Facebook" border="0" id="Facebook"/> </a>

</div>
Many thanks.
Regards,
Ben

Author Paul
Lead Developer 
#2 | Posted: 5 Dec 2008 06:02 
I suppose you shall edit main_posts.html template, pasting this code somewhere after {$mainPostArea}.

You may enclose it in forum standard tables as well, like

<table class="tbTransparent">
<tr><td class="tbTransparentCell">[SOCIAL NETWORKING CODE COMES HERE]</td></tr>
</table>
And don't forget to copy those images like facebook.gif under forums root folder, or modify the code to refer to them from another folder.

Author Guest
~
#3 | Posted: 11 Dec 2008 10:06 
How could you get this to show up in the top right hand corner of the first post? That would be ideal!!!

Author Paul
Lead Developer 
#4 | Posted: 11 Dec 2008 10:47 
Guest:
How could you get this to show up in the top right hand corner of the first post?
This would be more difficult - you need to associate this code with some variable in bb_plugins.php, then make this variable appearing using parseMessage() function.

Author Guest
~
#5 | Posted: 4 Nov 2010 16:53 
What about a Social Bookmarking Plugin for MiniBB, where the Admin can choose and/or edit the Bookmarking Websites. It would be cool.

Author Paul
Lead Developer 
#6 | Posted: 5 Nov 2010 04:40 
Guest:
What about a Social Bookmarking Plugin for MiniBB, where the Admin can choose and/or edit the Bookmarking Websites. It would be cool.
Not sure I understood it.
Currently each such site has a code which you need to paste. Paste it at any place of miniBB templates you want. What else? What kind of choice for the admin do you mean?

Author Guest
~
#7 | Posted: 5 Nov 2010 15:59 
OK ^^, it was written little terrible. Sorry but my english is not very good. Look at the Smilie Addon where you can add/choise Smilies as one Example. I mean a Admin Panel were the Admin can choise or Add Bookmarkings Sites like Del.isco.us Facebook or Digg.it or whatever an this Sites added in the Forumpost as Icons. ^^

I hope this is a little bit better.

greetz

Author Guest
~
#8 | Posted: 6 Nov 2010 01:45 
Here is an better Example, then you can see what i mean ^^ www aakashweb com/wordpress-plugins/wp-socializer/. Look at the First Post, up right.

Author Guest
~
#9 | Posted: 6 Nov 2010 02:08 
or here www[dot]social-bookmark-script[dot]de ^^. Its a generator.

Author Guest
~
#10 | Posted: 6 Nov 2010 02:20 
Or this www[dot]addthis[dot]com <-- I like this ^^. How kann I implement this into miniBB at the Postview or finished Post. ^^. A miniBB Plugin is much easier ^^.

Author tom322
Active Member
#11 | Posted: 6 Nov 2010 10:00 
I tested a 'social bookmarking' link on three of my sites and it didn't seem to bring any results so I removed the spyware from two so far ;)

Author Paul
Lead Developer 
#12 | Posted: 8 Nov 2010 05:10 
I'm not sure I understood what do you mean under "choose smilies". Smilies are set up manually editing the file, as much as you could open templates/main_posts.html and paste any codes you want, at any place you want. Each site mentioned has such codes provided on their pages. For example: code for Twitter buttons - code for Facebook buttons.

All add-ons you mentioned, can't live on themselves - you shall edit a template to paste their output, anyway.

Then what for we would need kind of special output, if you could edit template right away and paste the code for bookmarks directly? What is difficult or not clear for you, what do you need this add-on for?

BTW I agree to tom322, nobody know what those codes are about, and we at miniBB do not really support something which comes from 3rd party sites. It has been passed just 10 years since the fashion was around putting counters or webrings on sites, now everybody puts Facebook or Twitter, like it would help them a lot to grow, in another 10 years there may be other websites which you could advertise for free, getting nothing instead. I'm afraid it's not our politics, and if we talk about kind of visual tools for admin, there would be much more important work regarding add-ons for modifying miniBB options, else spending time for such efforts which are not really worth it.

Actually, if there would be 100 requests like this, I would think about writing an add-on, but since there is currently only one anonymous person requesting this, I think we will skip at this point, sorry -but thanks for suggestion anyway, and if you need it for your personal forum, you are welcome to refer to our customers service.

Author Roman Sidorov
Guest
#13 | Posted: 22 Aug 2021 14:16 
Dear Paul, Tom, and other mini-BB developers,

Similarly to Guest, I'm looking for a method to place a Share to Facebook button to every post cell, allowing the user submitting any forum post to his Facebook wall.
You may have a look, how it was implemented at the forum litlife.club driven by their own forum engine. The button «Поделиться сообщением» (the third one from the left at the bottom of each post) opens the list of sharing buttons to different social networks.
Facebook provides a code configurator for such a button, but it requires a static URL, which is not the case for a post cell at a web forum.
What URL should I submit to the Facebook share button script to publish it in each forum post making it shareable, and where can I find it?
Thank you in advance for suggestions.

Yours, Roman Sidorov,
Strugatsky Brothers' forum admin.

Author Paul
Lead Developer 
#14 | Posted: 23 Aug 2021 16:59 
Roman Sidorov:
What URL should I submit to the Facebook share button script to publish it in each forum post making it shareable, and where can I find it?
Each post in miniBB has its own URL which could be shared, in the version 3.5 it is included by default and referenced to the script named msg.php. For the previous versions, this script has been supplied as the part of the «Advanced anchors» add-on, so for older miniBB, either you have to install this add-on to support msg.php, either refer to the old-style direct links, which is not recommended.

Locating this URL is easy — in the desktop browser, mouse over the link like shown on the screenshot below (I've took your message as an example) and then click the right mouse button for copying the link, or click and hold your finger on the mobile device on this link to copy it:

Link to the message in miniBB forum

The URL to the post is generated in templates/main_posts_cell.html, and when putting the codes of social media links, you should also put them in the same template and use this code.

In the older versions, it is like:

<a id="msg{$cols[6]}" href="#msg{$cols[6]}" class="txtSm" rel="nofollow">#{$anchor2}</a>

— and it's coded only for manual copying, for substituting in 3rd party codes you have to add the full topic's URL in the front of anchor.

But in the most recent miniBB version, it looks like this:

<a id="msg{$cols[6]}" href="{$main_url}/msg.php?id={$cols[6]}" class="txtSm" rel="nofollow">

— you could copy the URL in bold, and use it in the code for social sharing, which should be present in the same template.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 How to implement Social Bookmarking (Digg, Del.icio.us, Facebook) script in every thread?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑