Loading...

Share This EE Plugin!

posted on Sun, December 10th, 2006

Three weeks ago I just stumbled over the Share This Wordpress plugin from Alex King, which I found very helpful and thought that it would be pretty nice to have in EE as well. So I just had a look at that code and wrote a plugin for EE based on the digg this plugin from Vik Rubenfeld. The plugin can be used in an "light" and in an "advanced" mode. The "light" mode is without any email functionality. If you have the tell-a-friend module installed you can use the plugin in the advanced mode, which enables the email tab in the layer. Expression Engine 1.5.2. is required in order to run that plugin.
For more instruction and the download read here.



Installation Instructions

  1. Unzip the zip file in your plugins directory.
  2. Add a link to the css and the js files in your global header to be available on all templates. Alternatively you can please the code of these three files in one of your existing templates.
  3. Place the plugin code within the {exp:weblog:entries} tag in your templates.


Parameter

entry_id
ID for the blog entry.

link_title
Title text for the Link to open up the layer. Default is "Share This!"

title
Title text for the syndication links. If no title is given it will be fetched from the database.

bodytext
Some services allow the submission of short abstracts. This paramater can be used to set the abstract, otherwise it will be fetched from database from the body field. All values will be cut after 255 characters.

url
The url parameter is used to set the url for the full text article or permalink. This parameter should be set, when the plugin is used on index pages, otherwise the index page url will be fetched from database.

orientation
This parameter allowes you to control where to display the layer [top|bottom].

exclude
By default all available syndication options will be displayed. This option allows you to exclude the options you don't like to have to be displayed. You can exclude multiple options in a comma separated list.
Option Overview:
delicious, digg, furl, netscape, yahoo, technorati, google, newsvine, blinklist reddit, blogmarks, magnolia, live, tailrank, mister wong, stumbleupon



Examples

Basic
{exp:share_this entry_id="{entry_id}" url="{title_permalink={my_journal_group}/comments}"}

Advanced
{exp:share_this entry_id="{entry_id}" title="{title}" url="{title_permalink={my_journal_group}/comments}" link_title="Share this!" bodytext="This is an article about plugins" orientation="top"}

Full
{exp:share_this url="{title_permalink={my_journal_group}/comments}" title="{title}" entry_id="{ entry_id}" orientation="top"}
{exp:email:tell_a_friend charset="utf-8" allow_html='n'}
tell-a-friend form
{/exp:email:tell_a_friend}
{/exp:share_this}



Download



Notes

Some people tried to include the Share This! Plugin within the index templates of their sites and wondered why the tell-a-friend form wasn't showing up at all. This is due to the fact, that all forms including the comment form are only available in the pages where the url_title or the entry_id is given.
Here is the answer I got from Derek Jones (after stupidly asking without searching the documentation for any help):

This information actually is in the documentation in quite a few places, referring either to having an entry_id or url_title in the URL, or needing to be placed on a “single-entry” templates, which it explains, are pages that are linked to with an entry_id or url_title in the URL.


 

Requirements

Expression Engine 1.5.2. is required in order to run that plugin.


 
 

Comments

1
Eric Cheng on
Jan 08, 2007

Lars -- which version(s) of EE does this work with?

2
Lars on
Jan 08, 2007

Hi Eric, it's working fine with version 1.5.2. It should be working with earlier version too, but I didn't have any other version installed to test it properly.

3
Shel Holtz on
Jan 29, 2007

Hi, Lars. I've tried to get this file on two computers, but both tell me the zip file is corrupted. Any chance you could re-upload it or send it to me? Thanks...

4
xxdesmus on
Feb 11, 2007

Wow, what an excellent plugin...I'll definitely give this a try! Thanks.

5
Keith on
Feb 22, 2007

Nice plugin, Lars. I sure haven't been able to get anything to show up in the mail tab, though. I must be missing something.

I've never used the Tell-a-Friend form before, so I'm probably doing something wrong. (obviously)

Appropriately, my captcha word is "couldn't"

6
Lars on
Feb 22, 2007

Hello Keith,

are you sure you got the tell-a-friend plugin installed? it's not in the free ee core package.

/lars

7
Keith on
Feb 22, 2007

I didn't have the tell-a-friend working properly at first, Lars, but I've corrected that and still can't get anything to show in the mail tab. Am I assuming correctly that I should be able to simply take what is in my tell-a-friend template and paste it just before the closing exp:share_this tag?

I guess I don't understand what to place between the exp:email:tell_a_friend tags.

8
Lars on
Feb 22, 2007

This is what I'm using:

{exp:email:tell_a_friend charset="utf-8" allow_html='n'}

<label for="from">Your Email: </label>
<input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" />

<label for="name">Your Name: </label>
<input type="text" id="name" name="name" size="40" maxlength="35" value="{member_name}" />

<label for="to">To: </label>
<input type="text" id="to" name="to" size="40" maxlength="35" />

{if captcha}
<label for="captcha">Captcha: </label>
<input type="text" name="captcha" value="" size="10" maxlength="20" style="width:100px;" />

<label> </label>
{captcha}
{/if}


<label for="submit"> </label>
<input id="submit" name="submit" type='submit' value='Submit Form' />

<input type="hidden" id="subject" name="subject" value="Interesting Post: {title}" />
<input type="hidden" id="message" name="message" value="{url_title_path="{my_journal_group}/comments"}" />

{/exp:email:tell_a_friend}

9
Les on
Mar 24, 2007

Just wanted to say this is an excellent plugin as I've just gotten it up and running on my site.

I do have a question: What would it take for me to add in Stumble Upon as an option to the choices? A lot of my readers use that service and I see that the original WordPress plugin has it, but not the EE version. I'd love to be able to add that in.

10
Lars on
Mar 24, 2007

Hi Les, I've just added the StumbleUpon to the plugin and updated the zip package. So the easiest is to reinstall the plugin.

11
Les on
Mar 24, 2007

Coolness, thanks big time!

12
Les on
Mar 24, 2007

Just downloaded the zip file and it appears to not have the updates. Just FYI.

13
Lars on
Mar 24, 2007

les - maybe you've been to fast ;-). I made some more changes and upload took some more time.

14
Chad Everett on
Apr 27, 2007

Hi Lars -

Great plugin, works well. Thanks!

I have the tell-a-friend working on the individual page fine, but on the index page that form doesn't seem to come up in the window. Any idea why this would be the case?

15
Lars on
Apr 27, 2007

Hey Chad,

I received some email about this issue and finally found the time to update the documentation.
The point is that EE is only capable of displaying forms within single entry pages. Therefore it isn't possible to add the tell-a-friend functionality into the index pages, unfortunately. It would need to hack a the email functionality into the plugin, but I'm not sure if this is a good idea for a plugin.

16
Chad Everett on
Apr 27, 2007

Hi Lars -

No worries. I can make that work. Thanks for the quick response, and thanks again for the plugin!

17
Michiel on
Jun 29, 2007

hey nice plugin...tried to do it real quick...but didnt work quite...well. i will look further into it

(seems like it doesnt wanna accept: bodytext nor link_title)


will post some updates on how i am doing (maybe ill contact you heh if i dont figure it out)

thanks for the plugin !

18
Skyler on
Nov 07, 2007

Hey Lars! Thanks for the plugin. I have some of it working, but whenever I click on "Share This!" nothing happens. If I play with the style sheet and remove the "display:none" rule, I can see the box that should show up. I think there's a problem somewhere with the JS. Any ideas how to fix this? The code I'm using is:

{exp:share_this entry_id="{entry_id}" title="{title}" url="{title_permalink="learning_center/aablog"}" link_title="{link_title}" bodytext="{bodytext}" orientation="top"}

Thanks!

19
Lars on
Dec 05, 2007

Hy Skyler, there was a bug in the JS file of the zip. I've just updated the zip. It should be working now..

20
Shannon Warren on
Mar 12, 2008

Where is the global header file located? I am new to EE.

21
Lars on
Mar 12, 2008

With global header I mean a separate template that you include in all your templates. In most cases this header template includes the html header and maybe your global navigation. Therefore it is advisable to put the links to the css and js files within such a header file in order to have it included in every page.

22
Adam George on
Apr 30, 2008

Hi Lars

I was wondering if you have thought about migrating the Share This plugin to use jQuery now that EE2.0 is going to be using jQuery as standard?

Cheers
- Ad

23
Lars on
Apr 30, 2008

If I have a 2.0 installation I will look how to migrate the plugin to jQuery, but not right at the moment...

24
.(JavaScript must be enabled to view this email address) on
Nov 30, 2008

Lars,
Nice plugin, thanks.
I can't get your js to work on my page. I'm almost positive that it's prototype not working within EE.
Do you have any ideas I could try?

25
SEO Test!!! on
Dec 26, 2008

it’s a nice plugin, i just can’t wait to try out in my website. thanks!

26
Alison Binney on
Apr 04, 2009

Hi Lars.
I have just installed your plugin on EE 1.6.7 and the social web part works fine but I get a blank Email Form. I did some research on the EE forums and found one thread with a mention of this, but no result or solution. It is a neat plugin and need to get this email part visible asap. I have tried z-index in the css ... but no obvious success. Have a quick answer ? Thanks heaps for the foresight on this.

27
Lars on
Apr 10, 2009

Hey Alison,

do you have the Email module installed. This is normally not only included in the free version of ExpressionEngine.

/lars

28
Alison Binney on
Apr 10, 2009

Hi Lars,
Thank you for your reply. I have already the Email module for EE installed ??
Alison

29
Infomist Services on
Apr 14, 2009

it is a nice plugin. Thnaks

30
Shawny on
Jun 23, 2009

Yes, i agree. Great Plugin, thx.

31
Trockenfutter on
Jul 25, 2009

thanks big time!

32
Welpen Hundefutter on
Aug 03, 2009

Thank you, very helpful

33
Minn Kota Terrova on
Sep 24, 2009

Hi Lars, its a good plugin.Thank you

34
Andeas on
Oct 03, 2009

many Tanks

35
haarentfernung on
Oct 04, 2009

Hi Lars, thank you for this graet work.

36
.(JavaScript must be enabled to view this email address) on
Oct 14, 2009

Is there really no facebook or twitter?

37
Lars on
Oct 23, 2009

Hi Edward,

yes, unfortunately I havent had the time for updating the plugin for a while. I might find some time soon.

ciao Lars

38
Armin on
Dec 14, 2009

useful plugin, thanks for information

39
kachelofen als kamin on
Jul 25, 2010

Hi Lars,
thanks for the plugin.
Have been looking for something like this for a while now.

Would also like to see facebook, wtih your plugin.

thx

40
kaminöfen on
Jul 29, 2010

thanks for a great plugin

 
 

Leave a Comment

Commenting is not available in this weblog entry.