News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Share This Topic

Started by All Colours Sam, September 06, 2009, 05:09:23 AM

Previous topic - Next topic

All Colours Sam

I believe I'm going to withdraw the script as it is and will include it with the rest of the buttons,  however, I will add a way to easily use the mod on external pages, something like this:

$buttons = new ShareThis($url);
$buttons->CreateButtons();

where $url is obviously the url you want to share  or if empty use the current url in the browser and then use:

$buttons->CustomDisplay();

where you want the buttons to appear, may be a better alternative and will offer more flexibility me thinks.

I'm open to suggestions.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

busterone

I'm afraid I can't offer much in the coding side of it myself. I can barely follow an already written script, just enough to get a very basic understanding of what is going on, and to make some minor edits when needed.   ;)  Manually adding mods is no problem to me, but writing a script from scratch is beyond my ability. 

For my own use, I don't have any custom pages or actions that need public sharing, they are all for members, and some of them or for only certain members. I am sure there are many more admins that do have info on custom pages that they would like shared to increase their forum traffic though. 

All Colours Sam

I'm more after suggestions on how to implement the mod/what new features want to see rather than coding part ;)
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

busterone

Ok,  :)
Simple is best in my opinion. Leave the buttons on the post pages as they are, with the admin option as it is- first post or every post.
The share script under the menu is fine as is if you can easily include it with the board exclusions for the post buttons.
If that present too much of a potential issue, you could remove the script from under the main menu for pages altogether, and have it display in the same area that the post buttons do. Then give admins the choice to display either the script, the buttons, or both.

krash661

Quote from: Suki on January 14, 2012, 03:00:09 PM
This mod is marked as outdated, please use this one instead:

http://custom.simplemachines.org/mods/index.php?mod=2111

Suki, Thank you very much..I appreciate this massively..And so far it's working great.

I have a question,it's more of I dont understand kind of thing.
IN the image below it says,

 
Enable the AddThis script.
This will add the addthis script below the menu on the following pages:
-BoardIndex
-Profile
-Topic page.
the Addthis script will share the entire page rather than an specific part of the forum.

MY question is,what/where exactly is the menu? cause it's only showing at the top of my site on every page in the described list.
the image below is a screen shot of where it's located on my site.

luuuciano

Have you clicked on it?
It will show you several options to share that page...
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

npereira

I like this mod but I have an issue, I want to move the ShareThis button to another location, see attached screenshot...

It`s currently located bellow the main menu (I use the default theme). I want to move it right to the left of the reply button.

How can this be done?

krash661

Quote from: npereira on January 19, 2012, 08:29:12 AM
I like this mod but I have an issue, I want to move the ShareThis button to another location, see attached screenshot...

It`s currently located bellow the main menu (I use the default theme). I want to move it right to the left of the reply button.

How can this be done?

That is an interesting place for it. I like that idea. My issue is it's at the top of my site


All Colours Sam

@krash661   link to your site and tell me an exat position where you want the script to be placed.

@npereira  It's doable, only if you don't mind to have the button to appear 2 times, since the div that controls those buttons is actually displayed 2 times per page.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

npereira

Quote from: Suki on January 19, 2012, 03:38:04 PM
@npereira  It's doable, only if you don't mind to have the button to appear 2 times, since the div that controls those buttons is actually displayed 2 times per page.

Top and bottom correct?  if so, no i dont mind

All Colours Sam

Open Sources/ShareThis.php file

find:

jQuery(\'#header\').append(\'<a class="addthis_button"


replace with:

jQuery(\'.pagesection\').append(\'<a class="addthis_button"


Using css you can place the script in the exact place you want it to appear.


Please do note that this will reduce the button to only appear inside a topic page and will no longer will appear on other pages, for example, the profile page.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

luuuciano

Nice tips about how to "move it"... it would be cool to add it to the mod description, or something similar... so people will read and use it
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

krash661

Quote from: Suki on January 19, 2012, 03:38:04 PM
@krash661   link to your site and tell me an exat position where you want the script to be placed.

@npereira  It's doable, only if you don't mind to have the button to appear 2 times, since the div that controls those buttons is actually displayed 2 times per page.

Suki, I'm thinking that Npereria comments is a cool place for it on his attachment image.below the menu or both locations.But the below menu spot is good enough for me.
QuoteIt`s currently located bellow the main menu (I use the default theme). I want to move it right to the left of the reply button.

http://www.performancetradingconcepts.com/index.php

All Colours Sam

#1433
@Everyone   I made some changes, so far:

-Added the AddThis script for every message.
-Change the position for the general AddThis button.
-Added the board restrictions for the AddThis script.
-Added "via @forum_name" and the topic name in the twitter button.


You can download the new version at github:  https://github.com/MissAllSunday/Share-This-Topic   or use the attached zip,  any feedback is welcome.


@krash661   use this new version, it will relocate the AddThis script in the linktree section


Edit, removed the attachment, try the new version instead.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

luuuciano

Is it not an oficial version? will be?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

kattara

Quote from: Suki on January 14, 2012, 09:34:39 AM
Quote
EDIT:  Oh, it shows up only when you hover on your post... weird...  Am I doing something wrong?


Yes, is the intended behavior, I use the jquery.hoverIntent.minified.js to prevent the annoying default behavior that .hover() have.



Oh!  OK.  :)  Is there a way so I can have it show all the time?

luuuciano

Quote from: Suki on January 14, 2012, 09:34:39 AM
Quote
EDIT:  Oh, it shows up only when you hover on your post... weird...  Am I doing something wrong?

Yes, is the intended behavior, I use the jquery.hoverIntent.minified.js to prevent the annoying default behavior that .hover() have.

BTW, Which  is the difference between the hover and hoverIntent?

Finally, I think I liked that behavior... it output a cleaner forum/posts/content... and if you need the sharing button its easy to have them...
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

All Colours Sam

@kattara  I will probably add a check to disable the Jquery effect and show the buttons all the time.

@luuuciano   it will be an official version and about the difference between hover and hoverIntent: http://cherne.net/brian/resources/jquery.hoverIntent.html

Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

kattara

Quote from: Suki on January 20, 2012, 07:16:31 PM
@kattara  I will probably add a check to disable the Jquery effect and show the buttons all the time.


Oh, that would be awesome!  Thanks!!

busterone

Quick work indeed. 
I will check out the new version sometime tonight or in the morning.   :)

Advertisement: