Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-27 21:04:53

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

lam_addthis not working

Steve, just downloaded your new plugin from TXP Resources. It does not work for me like this:

<txp:lam_addthis user="myuser" type="bookmark" wraptag="div" class="socialwrap" />

If I change the type to feed it works, as in another page loads that goes to addthis.com

Also seems to affect my tru_tags just above. Full form:

<txp:tru_tags_if_has_tags>
<p>Filed under: <txp:tru_tags_from_article /></p>
</txp:tru_tags_if_has_tags>
<txp:lam_addthis user="myuser" type="bookmark" wraptag="div" class="socialwrap" />
<txp:body />

Offline

#2 2007-12-27 21:07:52

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

I spoke too soon about tru_tags. The admin of the site had changed the articles to remove the tags…

Offline

#3 2007-12-27 22:02:42

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_addthis not working

what does not work? the javascript popup hover-type effect? or the whole thing not show up?

Offline

#4 2007-12-27 22:36:05

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

Nothing shows up. 4.05.

Offline

#5 2007-12-27 23:09:06

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_addthis not working

hmm how odd…the plugin basically outputs exactly the code that addthis.com generates. try replacing the whole lam_addthis tag with this:

<div><script type='text/javascript'>
addthis_url='<txp:permlink />'; addthis_title='<txp:title />'; 
addthis_pub='your_username';</script>
<script src='http://s7.addthis.com/js/addthis_widget.php?v=12' type='text/javascript'>
</script></div>

and see if it works. the only difference is that in the plugin, i decode the permlink url in case people are using messy urls and thus a permlink with an ampersand wouldn’t get properly bookmarked.

Last edited by iblastoff (2007-12-27 23:09:25)

Offline

#6 2007-12-28 09:06:41

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

Yes, this does not work:

<txp:lam_addthis user="user" type="bookmark" wraptag="div" class="socialwrap" /> but your code above does work. By work I mean there is no JS – it simply opens the addthis.com page in the same window. There is no popup fancy script like in the example.

And this DOES work:

<txp:lam_addthis user="user" type="feed" wraptag="div" class="socialwrap" />

The only change is type=“feed”. Same thing happens as in your code example – opens the addthis.com page in the same window.

Offline

#7 2007-12-28 09:46:16

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_addthis not working

hmm..if that copy-pasted code doesn’t work (as in it SHOULD let you see the fancy dropdown js box) then something else is blocking it. that code is what is generated by addthis.com and is what you’re ‘supposed’ to be using (except with the added textpattern tags which shouldn’t affect the javascript functionality at all)

even still, try v0.2 to see if theres any change…(basically i added a few things to allow the code to validate as well as a check to see if a certain function exists blah blha blah!)

Last edited by iblastoff (2007-12-28 09:46:56)

Offline

#8 2007-12-28 10:09:37

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

Update. Using the following:

<txp:lam_addthis user="user" type="bookmark" wraptag="div" class="socialwrap" /> The fancy thing does work in FF and Camino, but not Opera or Safari. All latest versions on the Mac. I will download v2 to see if there is any difference…

Offline

#9 2007-12-28 10:11:39

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_addthis not working

jstubbs wrote:

Update. Using the following:

<txp:lam_addthis user="user" type="bookmark" wraptag="div" class="socialwrap" /> The fancy thing does work in FF and Camino, but not Opera or Safari. All latest versions on the Mac. I will download v2 to see if there is any difference…

hmm interesting you’re right! i guess i should have asked what browser you were using…even the generated code from addthis.com does not show up for me in safari either. maybe the addthis folks are aware of this or not but i’ll see if i can fix it myself…

edit: nevermind i looked at time.com (which uses the same widget) and their blogs addthis feature works just fine in safari. i’ll see what else is going on..

Last edited by iblastoff (2007-12-28 10:20:41)

Offline

#10 2007-12-28 10:14:05

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

So I hold off from downloading v2 for now then…BTW I am getting inspired to write a plugin by your recent efforts!

Offline

#11 2007-12-28 10:21:50

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_addthis not working

are you able to see the effect at nineorchids.com with safari?

and thanks! its easier than i thought. i know VERY little php/javascript but i find playing around with plugins helps the learning process as it gives me a purpose rather than going through tutorials for things of which i may not even have a use for.

Offline

#12 2007-12-28 10:26:41

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: lam_addthis not working

Yes I see the nineorchids.com effect fine on Safari. Must be something simple. Hope you find it! My New Year’s resolution – create a plugin ;-) I just have to think of one..

Offline

Board footer

Powered by FluxBB