OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Download Counter

OJS development discussion, enhancement requests, third-party patches and plug-ins.

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

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Download Counter

Postby bflores02 » Mon Jan 11, 2010 12:25 pm

Hello,

I'm a complete newbie regarding OJS. I have intermediate knowledge and experience with HTML and PHP.

A friend of mine has asked me for help to add a download counter for every publication that is available on PDF format on their OJS website.

For example:

http://www.gmjei.com/journal/index.php/ ... ue/current

Every hyperlink labeled "PDF" on that page, has to have an individual counter and download statistics must be viewable to the public user. There are hundreds of PDF publications in the site in other pages (other months, for example).

Is there any plug-in available for this functionality? If not, I can develop a PHP application to count the number of downloads, but I wouldn't know where to add it in the OJS source files and how to make my program differentiate one PDF from another since I don't have any experience with the OJS structure.

I would really appreciate your help on this matter.

:)
bflores02
 
Posts: 1
Joined: Mon Jan 11, 2010 12:16 pm

Re: Download Counter

Postby jmacgreg » Thu Jan 14, 2010 4:13 pm

Hi bflores02,

You can take a look at the COUNTER plugin, which is shipped with OJS by default -- that gives the number of full-text views per journal per month, but it doesn't break the count down per article. There are also two other plugins that might be of use, although they aren't currently packaged with OJS so you'd have to install them: the Views report (viewtopic.php?f=28&t=4259), and the Popular Articles plugin (viewtopic.php?f=28&t=4297).

Invididual galley view counts are tracked, but currently only displayed to authorized users (eg. Editors can see per-galley view counts from a submission's Editing page, in the Layout section, tracked in the galley table under Views; and authors can see the number of times their article has been viewed in their Submission Archives page, next to every published article). You could always try adapting the code from those templates (or from the above plugins) to where you want the counts displayed. Let us know if you need any pointers on where to look.

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

Re: Download Counter

Postby ushasharma84 » Tue May 25, 2010 3:39 am

hi
Instaed of displaying most popular article on the sidebar I want to give a link TOP 10 ARTICLE on journals home page which when clicked will list top 10 articles. Can u plz help me regarding this.
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: Download Counter

Postby jmacgreg » Wed May 26, 2010 10:58 am

Hi ushasharma84,

It isn't currently possible to display block plugins anywhere beside the sidebar, but you may be able to replicate that functionality by looking at the block plugin code and adding it to the relevant template/class/page files.

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

Re: Download Counter

Postby ushasharma84 » Tue Aug 17, 2010 10:27 pm

hi
I want to know which template I need to edit to dispaly pdf count with each article publicly on table of content of article page. Can you give me any pointer on where to look?
Thanks in advance
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: Download Counter

Postby jmacgreg » Fri Aug 20, 2010 7:52 am

Hi ushasharma84,

You'll want to look in templates/issue.

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

Re: Download Counter

Postby ushasharma84 » Thu Aug 26, 2010 4:27 am

hi
i m not very much familiar with smarty. While manipulaing the code to display the views in article content page , I am getting this error Call to a member function getGalleys() on a non-object in C:\wamp\www\ojs-2.3.2-1\cache\t_compile\%%2C^2C1^2C1F000D%%issue.tpl.php on line 115. Can u give me some pointer on how to resolve it?
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: Download Counter

Postby jmacgreg » Mon Aug 30, 2010 1:34 pm

Hi ushasharma84,

That error is pointing to a cache file. Try clearing your cache to see if the problem persists.

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

Re: Download Counter

Postby ushasharma84 » Wed Sep 01, 2010 12:17 am

Hi
I have cleared cache but problem is still there. Problem is in /templates/issue file in which I have called getGalleys() member function.But dont have enough idea how to resolve that.
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: Download Counter

Postby Garant » Wed Feb 06, 2013 5:58 am

Hello gentlemen!
A lot of time has passed since the first question.
Does something has changed since that time?
Looking through the forum I found out that some people has developed their own PDF view/download counters which are showed to all users.
Does this plugins are included in OJS package or nobody has shared them?
Thank you very much!
P.S. I'm running the 2.3.8.0 version.
Garant
 
Posts: 192
Joined: Wed May 30, 2012 8:53 am

Re: Download Counter

Postby alirezaaa » Sun Mar 31, 2013 10:52 pm

Hello Garant,
I've shared this post which might help you.
http://pkp.sfu.ca/support/forum/viewtopic.php?f=9&t=9668&p=38056#p38056
Best,
Ali
alirezaaa
 
Posts: 26
Joined: Sat Jul 09, 2011 9:54 am

Re: Download Counter

Postby Garant » Mon Apr 01, 2013 12:01 am

alirezaaa wrote:Hello Garant,
I've shared this post which might help you.
http://pkp.sfu.ca/support/forum/viewtopic.php?f=9&t=9668&p=38056#p38056
Best,
Ali

Hello, alirezaaa !
Thank you very much for your post!
I'll check it out!
Garant
 
Posts: 192
Joined: Wed May 30, 2012 8:53 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest