MyBB Community Forums

Full Version: Social Share Thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Activate the Redirect option. Then old URL such as http://www.chrislowthian.co.uk/forums/sh...php?tid=17 will redirect to http://www.chrislowthian.co.uk/forums/Th...do-you-use

edit: Just checked it, and you have it enabled. Don't worry, you can use this code no problems.
OK Thanks will leave as it is, many thanks Smile
Another thing (sorry for being annoying)

Is there any way to carry over the Post Title to Twitter and Delicious?

For example twitter would tweet like:

Post Title Here - Post URL Here

and on Delicious it would just auto fill the Title Field.

Thanks in Advance Smile
As for Twitter, I know this works:

<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}"><img src="http://icons3.iconfinder.netdna-cdn.com/data/icons/web2/Icons/Twitter_24x24.png" alt="" /></a>

I'll do the same thing for other social networks once I get home.
OK here is the updated Social Share Code I am using.

The benefits of the code below are:
  • Fixed Missing ALT Tag on Twitter.
  • Pages open in New Window when buttons are clicked.
  • Post Titles are transfered to Twitter, Reddit and Delicious (only 3 that need it).
  • Web 2.0 Style Buttons hosted on Your Server.
  • Added StumbleUpon to the Bookmarks.
Instructions:
  • Download Icons from Here.
  • Upload the 6 24px x 24px Icons you need (Digg, Delicious, Reddit, Facebook, Twitter and StumbleUpon) to your server.
  • Edit the code below by editing each instance of "LINK TO SOCIAL ICON" with the correct link to the social image which you uploaded to your server.
  • Go to ACP >> Templates & Style >> Templates >> Theme your using >> Show Thread Templates >> showthread_ratethread and paste the code below everything. Save the changes.
  • Check everything is working by visiting a thread on your forum.
Demo of this Code Installed: Click Here

Code Needed:
<div style="margin-top: 6px; padding-right: 10px;" class="float_left">

<strong style="float: left; padding-right: 10px;">Share Post:</strong>

<a title="Digg" href="http://digg.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Digg" /></a>

<a title="Delicious" href="http://del.icio.us/post?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Delicious" /></a>

<a title="Reddit" href="http://reddit.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Reddit" /></a>

<a title="Facebook" href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Facebook" /></a>

<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Twitter" /></a>

<a title="StumbleUpon" href="http://www.stumbleupon.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="StumbleUpon" /></a>

</div>

I hope this helps, it's just another option compared to the code on the front page.

Any questions let me know Smile
(2010-06-15, 01:21 PM)Chrissy Poo Wrote: [ -> ]OK here is the updated Social Share Code I am using.

The benefits of the code below are:
  • Fixed Missing ALT Tag on Twitter.
  • Pages open in New Window when buttons are clicked.
  • Post Titles are transfered to Twitter, Reddit and Delicious (only 3 that need it).
  • Web 2.0 Style Buttons hosted on Your Server.
  • Added StumbleUpon to the Bookmarks.
Instructions:
  • Download Icons from Here.
  • Upload the 6 24px x 24px Icons you need (Digg, Delicious, Reddit, Facebook, Twitter and StumbleUpon) to your server.
  • Edit the code below by editing each instance of "LINK TO SOCIAL ICON" with the correct link to the social image which you uploaded to your server.
  • Go to ACP >> Templates & Style >> Templates >> Theme your using >> Show Thread Templates >> showthread_ratethread and paste the code below everything. Save the changes.
  • Check everything is working by visiting a thread on your forum.
Demo of this Code Installed: Click Here

Code Needed:
<div style="margin-top: 6px; padding-right: 10px;" class="float_left">

<strong style="float: left; padding-right: 10px;">Share Post:</strong>

<a title="Digg" href="http://digg.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Digg" /></a>

<a title="Delicious" href="http://del.icio.us/post?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Delicious" /></a>

<a title="Reddit" href="http://reddit.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Reddit" /></a>

<a title="Facebook" href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Facebook" /></a>

<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="Twitter" /></a>

<a title="StumbleUpon" href="http://www.stumbleupon.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="LINK TO SOCIAL ICON" alt="StumbleUpon" /></a>

</div>

I hope this helps, it's just another option compared to the code on the front page.

Any questions let me know Smile

Thank you for this, Sorry about not answering your questions, I've been a bit busy lately and haven't checked my posts in a while.
(2010-06-18, 06:55 PM)Damion Wrote: [ -> ]Thank you for this, Sorry about not answering your questions, I've been a bit busy lately and haven't checked my posts in a while.

No problems, you are more than welcome to update your first post with the code and features above Smile
(2010-06-18, 06:59 PM)Chrissy Poo Wrote: [ -> ]
(2010-06-18, 06:55 PM)Damion Wrote: [ -> ]Thank you for this, Sorry about not answering your questions, I've been a bit busy lately and haven't checked my posts in a while.

No problems, you are more than welcome to update your first post with the code and features above Smile

Thank you, I have done that.
Also if you wanted to add this into every post and not just the main for thread to be sent you could do this, i tested this and it is is working..

Find:
{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}

Replace:
{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&pid={$post['pid']}

Use it on my site, right under the ip logged. Gives other advantages to for mods like portals, you could essentially do the same thing for the news display on mods like proportal and make it sociable.
Hey
I read one of your threads in which you showed this link
http://demo.mybbthemes.co.uk/showthread.php?tid=10

The hover effect is amazing , can you guide me how that is possible?
Also are you really good with MyBB? I need help with something similar, an attachment parser which would parse a particular attachment and show it as the designed PHP parser.

PM me if you can help.
Thanks.
(2010-10-16, 01:02 PM)vids Wrote: [ -> ]Hey
I read one of your threads in which you showed this link
http://demo.mybbthemes.co.uk/showthread.php?tid=10

The hover effect is amazing , can you guide me how that is possible?
Also are you really good with MyBB? I need help with something similar, an attachment parser which would parse a particular attachment and show it as the designed PHP parser.

PM me if you can help.
Thanks.

Sure, That was a plugin i was working on though it only shares the thread and not the post due to the "#" messing with the links used. If you want the plugin i can send it to you.

I am pretty good with MyBB, But i have no idea what your saying Confused
Pages: 1 2 3 4 5 6