OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Customizing AddThis plugin

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Customizing AddThis plugin

Postby snermin » Sun Nov 21, 2010 10:03 am

Does anybody knows how to customize AddThis plugin. There is no documentation at all?
snermin
 
Posts: 12
Joined: Sat Dec 20, 2008 8:30 am

Re: Customizing AddThis plugin

Postby jmacgreg » Mon Nov 22, 2010 6:46 pm

Hi Snermin,

What do you want to do, exactly? Configuration documentation can be found here, but of course there's not much you can do there to customize the button except choose different themes. If you can give more detail on what you want to do I may be able to provide some suggestions. That said, the plugin should probably be upgraded to take advantage of improved functionality at http://www.addthis.com/.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Customizing AddThis plugin

Postby snermin » Thu Nov 25, 2010 3:51 am

Well, there are some advanced setting which are not described anywhere in the documentation. This is what I have referred to.
snermin
 
Posts: 12
Joined: Sat Dec 20, 2008 8:30 am

Re: Customizing AddThis plugin

Postby mbria » Tue Mar 15, 2011 3:41 am

Hi alec, et. al. :-)

We started testing OJS 2.3.4 today and we found the "addthis plugin". It's a really nice addition so congrats to you all for this new plugin (although we all know is not the most impressive improvement in 2.3.4)

The plugin works fine out of the box but our editors want to restrict the services and change the interface so looks like we need to "add a personalized Addthis code". The problem is that no text-box is shown to add this code.

Any clue about how to fix this?

Thanks for your help,

m.
mbria
 
Posts: 299
Joined: Wed Dec 14, 2005 4:15 am

Re: Customizing AddThis plugin

Postby jmacgreg » Thu Mar 17, 2011 8:47 pm

Hi Marc,

Glad you enjoy the plugin! (And if you would like a more comprehensive breakdown of what is new in the OJS 2.3 line, see this thread -- there are many new changes to be found in both OJS 2.3 and 2.3.3.)

Regarding the addthis code -- you may have to actually modify the template file that displays the addthis button. I'm not particularly familiar with configuring addThis, but you can find the code that does so in templates/article/footer.tpl. If you take a look and want some help deciphering what to do, let me know what you'd like changed.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Customizing AddThis plugin

Postby mbria » Tue Mar 22, 2011 4:23 am

Hi James,

Nice to hear about you. :-)

Regarding the addthis code -- you may have to actually modify the template file that displays the addthis button. I'm not particularly familiar with configuring addThis, but you can find the code that does so in templates/article/footer.tpl. If you take a look and want some help deciphering what to do, let me know what you'd like changed.


Humm... I was thinking in use AddThis plugin because looks easier (a cut&paste solution) than playing with templates, but if I need to change the footer, I will probably go with my own code.

AddThis is nice, but I need to remember it's SaaS and I prefer avoid dependences in my applications. :-)

I will post my code as soon as I finish it... just in case others need a similar approach.

Thanks a lot James for the explanation.

Cheers,

m.
mbria
 
Posts: 299
Joined: Wed Dec 14, 2005 4:15 am

Re: Customizing AddThis plugin

Postby mobr » Wed Jul 04, 2012 3:20 am

In the Reading Tools options and the sharing configuration of AddThis, you enter your username, but can you add a specific Profile ID somehow (the one you can create on AddThis.com) so it works with their analytics?
mobr
 
Posts: 5
Joined: Thu May 10, 2012 5:55 am

Re: Customizing AddThis plugin

Postby mbria » Wed Jul 04, 2012 3:39 am

I think you can't, but module is very clean so you can easily add this info "hardcoded" to the JS the module attaches to article's pages.
Take a look to the few files that compose the module and you will find how by your own.

Cheers,
m.
mbria
 
Posts: 299
Joined: Wed Dec 14, 2005 4:15 am

Re: Customizing AddThis plugin

Postby mobr » Wed Jul 04, 2012 4:10 am

mbria wrote:I think you can't, but module is very clean so you can easily add this info "hardcoded" to the JS the module attaches to article's pages.
Take a look to the few files that compose the module and you will find how by your own.

Cheers,
m.


Thanks for the reply, I will see if I have sufficient access to do so, as this is something that our library is hosting for us. It's a minor detail, but I would really like to have as much of an overview of how people are engaging with the content on our journal.

I was quite surprised that this wasn't a feature though, as the code is -almost- close to what it is supposed to be.

The code in the journal system, using the in-built configuration, gives you this code (beyond adding the graphical expression of a 'Share' or 'Bookmark' icon):

Code: Select all
<script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>


The code provided at AddThis.com is this code:

Code: Select all
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=PROFILE ID GOES HERE"></script>


The first line lets you measures when users copy your URL from their browser's address bar and share it with their friends - it's not near as important, but still useful.

Maybe this could be implemented in a future update?
mobr
 
Posts: 5
Joined: Thu May 10, 2012 5:55 am

Re: Customizing AddThis plugin

Postby mbria » Mon Jul 16, 2012 4:02 am

I didn't look into this very hard, but looks like AddThis changed their API and OJS plugin is now outdated.

I need to fix it, so I hope I will be back soon with more info and a solution. ;-)

Cheers,
m.
mbria
 
Posts: 299
Joined: Wed Dec 14, 2005 4:15 am

Re: Customizing AddThis plugin

Postby mbria » Mon Jul 16, 2012 5:27 am

I had an issue with AddThis plugin because of my cache. I clean up the cache and AddThis icons appear again.

Any case, I think mobr comments need to be taken in consideration and AddThis plugin need to be updated.

Cheers,
m.
mbria
 
Posts: 299
Joined: Wed Dec 14, 2005 4:15 am

Re: Customizing AddThis plugin

Postby csimser » Mon Jul 16, 2012 9:35 am

On a related note, we've implemented the AddThis plugin on several of our journals. We'd like to add the Analytics piece -
https://www.addthis.com/get/just-analytics

Has anyone done this? I'd like to direct our Systems Admin to do this and it would help if someone can explain 'where' that code is inserted? I assume these must be done for each of the journals we host.

Many thanks for your input.

Char
csimser
 
Posts: 9
Joined: Wed Sep 21, 2011 10:57 am
Location: Kansas State University


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 7 guests