Advertisement:

Author Topic: Share This Topic  (Read 247298 times)

Offline Suki

  • Developer
  • SMF Super Hero
  • *
  • Posts: 12,736
  • Kaizoku Jotei
    • Free SMF mods
Share This Topic
« on: September 06, 2009, 05:09:23 AM »
Share this Topic

Link to mod | Comments on this Mod

originally created by Arantor
further development by Suki

This mod needs php 5.2 or greater

License

 * This SMF modification is subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 
This mod uses the hoverIntent jQuery Plug-in http://cherne.net/brian/resources/jquery.hoverIntent.html


Introduction
This mod allows the admin to add one or more buttons to the bottom of a message to allow users to link the topic in social networking sites such as Twitter, Facebook and Google+.

For SMF 2.0.x only

Now support Facebook Like button, Google+, Tweet and Addthis script!

- Select which boards you DO NOT want to show the icons and the button.
- You can enable/disable every button and it will appear inside the first or every post of every topic using a nice jquery effect.
-Now there's no need to create a Facebook app!
-No theme edits, works with every theme!
-Select if you want to show the Addthis script to share an entire page with that service.


Supported Languages

o English/utf8
o British/utf8
o Spanish_es/utf8
o Spanish_latin/utf8

I welcome translations, please post it on the support post ;)


Installation

Simply install the package to install on the SMF Default Theme AND any other theme!

 
Changelog

Code: [Select]

[b]4.1.2[/b]
-Fixed issues with the Spanish_es/latin strings.
-Fixed the Addthis script showing on the profile editing pages.
-Moved the append after the call to parse_bbc() this should cover most of the problems with other mods.
-Added an option to separate the message from the buttons, just enter any number, the higher the number the larger will be the space between the message and the buttons.

[b]4.1.1[/b]
-Fixed bug on install, silly bug, I know I shouldn't use $boarddir... copy/paste things from old code is evil!
-Fixed bug on logic for showing the AddThis script.

[b]4.1[/b]
-Several bugs fixed
-Added the AddThis script for messages too.
-Added the forum name and the topic name in the twitter button
-Added a check to disable the jquery effect (Show the buttons all the time)
-Added an option to show the buttons above or below the messages.

[b]4.0[/b]
-Re-written code.
-Compatible with SMF 2.0.x
-Added the AddThis script to share common pages such as profile, board index and topics.
-Added a jquery effect to show the buttons by hovering the message.

[b]3.0[/b]
-Added support for SMF 2.0 only
-Added support for the google +1 button
-Fixed the "check all boxes" check on icons
-Revamp of the admin section.
-Fixed the "undefined index: view_newest_first"  error.
-Added JavaScript to show/hide the buttons/icons
-Dropped support for Simple Portal blocks

[b]2.8.2[/b]
-Fixed an issue with the "check all" option.
-Fixed a bug when the "show newer first" option was enable, thanks to HunterP for the report.
-Made the facebook like button height a little bit higher, before: 35, now 80, this will show the comment box and the avatars completely.



[b]2.8[/b]
-Fixed the Undefined errors in ShareThis.php file.
-Removed some file edits, less edits and more hooks means less headaches :)

[b]2.7[/b]
-Fixed height of the facebook button.
-Added support for orkut, web 2 pdf, linked in, bebo, diigio, fark, iwiw, mr wong and stylehive.
-New icons 16x16
-Added a class for easy manipulation by css of the icons class="share_icons"
-Moved the language strings on its own file.
-Removed some file edits, less edits means less headaches :)
-The mod now uses a new RC4 hook add_integration_function.


[b]2.6[/b]
-Fixed problem with multiple facebook like button.
-Fixed problem with displaying  icons and buttons on custom pages.
-Added support for SimplePortal news block and Article system.
-The mod now uses iframe for the facebook like button due to problems with SDK.
-Cleaner admin page.
-Added a "check all" option for the icons in admin.


[b]2.5.1[/b]
-fixed problem with master setting for enable/disable the icons


[b]2.5[/b]
-added support for Buzz button.
-complete rewrite.
-remove social networks no longer available.
-remove settings no longer needed.
-fixed problem with Spanish non utf8 language.
-minor bugs fixed.
-now you can include the icons and buttons on your news/articles of any portal.

[b]2.3[/b]
-added support for share multilple messages (show only on first message or all)
-moved the buttons above the text and the icons below

[b]2.2[/b]
-Added support for digg button and tweet button.
-Select the size of the 3 buttons
-Layout Style and Color scheme options fo the facebook like button
-Show faces or not on the facebook like button
-Better compatibility with themes.
-cleaner code.


[b]2.1[/b]
-Added support for meneame, print friendly and friend feed sites.
-Better compatibility with themes.
-cleaner code.


[b]2.0.1[/b]
-Added italian language.
-fixed a bug whe selected option "inside post at the end".
-cleaner code.

[b]2.0[/b]
- Cleaner install
- Select which boards you DO NOT want to show the icons
- 3 different ways to show the icons
- You can select the language for the button

[b]1.6[/b]
-Fixed some errors on 1.1.x install.

[b]1.5[/b]
-Added support for the Facebook like button.

[b]1.4[/b]
-Added support for 20 more social networks
-Smaller icons
-Added support for 2.0RC3


[b]1.3[/b]
Added support for the following sites:
-Google
-Yahoo
-Technorati
-Ma.gnolia
Added spanish language
Moved the icons above the title of the topic

[b]1.2[/b] - November 1, 2009
Added support for MySpace
Added support for 2.0 RC2
Added Arabic translation

[b]1.1[/b] - September 10, 2009
Added support for Twitter and StumbleUpon

[b]1.0[/b] - August 27, 2009
Initial release

« Last Edit: February 13, 2012, 07:35:47 PM by Suki »
Hand in glove
We can go wherever we please
And everything depends upon
How near you stand to me

And if the people stare
Then the people stare
Oh, I really don't know and I really don't care

Offline Afro

  • SMF Hero
  • ******
  • Posts: 1,850
  • Gender: Male
  • http://twitter.com/afrowall
    • AFROWALL COMMUNITY FORUM
Re: Share This Topic
« Reply #1 on: September 06, 2009, 06:28:18 AM »
good one

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #2 on: September 08, 2009, 12:19:35 PM »
Arantor , want to try this mod .. u think it will flow well on my theme ??

Also does it place to share buttons only on the first post ? and can i add more social networks, ie twitter ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #3 on: September 08, 2009, 12:37:43 PM »
I don't know your theme. But possibly not so well on 1.1 if you have a lot of them.

There is no facility to add others - unless I add them, though I did make it fairly easy to do so, so it's not a ton of work to add new ones.
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #4 on: September 08, 2009, 12:43:08 PM »
Using 1.1.10 You just help me with my theme ...  8)

http://shopinja.com/forum/index.php?topic=3490.msg15119;topicseen#msg15119

I'm guessing the share icons would end up before the ' author' bit..

I'd basically want just facebook and twitter ? should be able to swap out one for twitter right ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #5 on: September 08, 2009, 12:49:35 PM »
On the mod's own page is a set of screenshots, including one from 1.1.10 that shows where it goes.

And as per the mod page, it's configurable, meaning there is a list of sites that you can pick from - currently there are 4, not all of which have to be enabled at once.

Adding Twitter to the list shouldn't be a problem if someone can confirm what the link should be, and I can dig an icon out for it.
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #6 on: September 08, 2009, 01:01:26 PM »
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #7 on: September 08, 2009, 01:07:43 PM »
Not finding this in my themes Display.template

Code: [Select]
<td valign="middle" width="2%" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
</td>
<td width="13%"> ', $txt[29], '</td>
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #8 on: September 08, 2009, 01:19:44 PM »
Well, I'll add Twitter to a revised 1.1 version - but in the interim you'll have to modify the existing code.

Please can you attach your Display.template.php?
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #9 on: September 08, 2009, 01:25:48 PM »
Well, I'll add Twitter to a revised 1.1 version - but in the interim you'll have to modify the existing code.

Please can you attach your Display.template.php?

i would wait until you revise as i mainly need twitter :)

Also in a revision .. this might be a bit much to add, but if you could somehow show the amount of time it was shared on the various sites would be wicked  :P
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #10 on: September 08, 2009, 01:34:58 PM »
Well, it was supposed to be a quick little mod just to share. It would be possible to track though, just I'm not sure of the need for it.

I'll add it to the tracker though.
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #11 on: September 08, 2009, 01:37:55 PM »
Well, it was supposed to be a quick little mod just to share. It would be possible to track though, just I'm not sure of the need for it.
I'll add it to the tracker though.

kool, well tracking gives a sense of which topics are hot and being shared allot :)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #12 on: September 08, 2009, 01:43:57 PM »
It's on the to-do list. Cannot promise when it'll get done though.
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #13 on: September 08, 2009, 01:46:19 PM »
It's on the to-do list. Cannot promise when it'll get done though.

no prob.. the twitter revision will be soon enough though ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #14 on: September 08, 2009, 02:31:02 PM »
It'll be when it gets done - probably in the next day or so.
Damaged people are dangerous. We know we can survive.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #15 on: September 08, 2009, 02:44:13 PM »
alight cool, i asked to be notified ... :)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline Kcmartz

  • SMF Hero
  • ******
  • Posts: 4,296
Re: Share This Topic
« Reply #16 on: September 08, 2009, 03:55:57 PM »
what about on the EFSANE theme, my default, copied the folder "share" with the images and nothing happened after I selected all the checkboxes...

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #17 on: September 08, 2009, 04:18:03 PM »
Kcmartz: So you're using 1.1, with a custom theme's Display.template.php - did you make the edits to it to have it include the new code? It only hits the default theme normally, and can't readily modify custom themes.
Damaged people are dangerous. We know we can survive.

Offline Kcmartz

  • SMF Hero
  • ******
  • Posts: 4,296
Re: Share This Topic
« Reply #18 on: September 08, 2009, 04:19:29 PM »
it would be nice if it could thanks, ill tell you if it works (by editing this reply)

EDIT: can't find it in default template, what code to I add and where to the efsane theme? thanks again!
« Last Edit: September 08, 2009, 04:22:42 PM by Kcmartz »

Offline

  • SMF Friend
  • SMF Legend
  • *
  • Posts: 61,622
Re: Share This Topic
« Reply #19 on: September 08, 2009, 04:21:48 PM »
It's not possible to make it edit every single custom theme's Display.template.php, I can't make it work on code I've never seen before. Remember: a custom Display.template.php may be 1 character different or entirely different. I can't write a mod against code I cannot predict, meaning it can only apply to what *is* known.
Damaged people are dangerous. We know we can survive.