Abstract views, PDF views and Download Stats Made Public 😶

Hi!

How did you add ALM?
Did you activate it in “System Plugins” → “Generic Plugins” as a journal manager?
Which version of OJS are you using?
I recommend searching for “ALM” in this forum or take this Where are the ALM plugin in OJS 2.4.7.1? as a starting point.

Greetings
Hermann

1 Like

Thank you, sorry for delay, I created a folder in the Generic Plugins, I placed the Plugin there, and then I activate it. That it.

We use OJS 2.4.8, and this is a fresh OJS installation

@Dilan_Rostam, what exactly are are you able to do in configuring the plugin, and what are you looking to do that you are not seeing?

Did you run the upgrade script after adding the plugin?

What’s the exact name of the folder you put ALM into?
It has to be plugins/generic/alm - lowercase alm!

What do you see if you open the abstract of an article?
It should look similar to the following screenshot (i.e. there should be a horizontal line followed by “Article Metrics” after the abstract):

I made this folder as plugins/generic/alm but it dd not work as I click on the setting for this plugin it gives me the URL as

http://aro.koyauniversity.org/manager/plugin/generic/almplugin/settings

so it looks for a folder as /plugin/generic/almplugin/

I have this now in a folder lower case as almplugin

please a sample Abstract here

http://aro.koyauniversity.org/article/view/ARO.10113

When I call for settings I get this error 500

`500 GET /manager/plugin/generic/almplugin/settings HTTP/1.0

AH01071: Got error ‘PHP message: PHP Fatal error: Call to undefined method AlmPlugin::getRequest() in /var/www/vhosts/koyauniversity.org/aro.koyauniversity.org/plugins/generic/almplugin/AlmPlugin.inc.php on line 104\n’`

Hi Dilan,

No, those URLs do not correspond to paths in the filesystem. Please install it in .../plugins/generic/alm.

This error message is related to the fact that you are using the wrong filesystem path but it is also … weird.
Where did you get the ALM-plugin code from?
The correct source is
https://github.com/pkp/ALM/tree/ojs-stable
and in AlmPlugin.inc.php from this source there is no call to AlmPlugin::getRequest() at line 104. So it looks like your installation is totally borked. Please try to reinstall it from scratch. See Where are the ALM plugin in OJS 2.4.7.1? - #5 by hermann

Greetings
Hermann

Thank you Hermann, I removed the old one and cleared all cache, then i created alm based on the instruction. I could access the setting now. but still URL reads …/almplagin/… please see the images,

on the setting page there some requeriments. We do use DOI,but this one ask for PKP key, I create Personal account (BTW, this service will stop in Nov 2016 as they say), when I try to log in, in the URL (http://pkp-alm.lib.sfu.ca/users/auth/persona/callback) I get error message as

http://pkp-alm.lib.sfu.ca/users/auth/persona/callback

500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.

So how do I get this key now.



Hi Dilan,

That’s OK. As I said, these URL-paths are not necessarily directly connected to file-system paths!

You do not need such a key to display locally collected article metrics (abstract view counts and full-text view counts). See this https://webapp.uibk.ac.at/ojs2/index.php/ciss/article/view/40 for an example how that looks like.

You only need that key if you want e.g. to show “citations” of articles in social medias (twitter, facebook asf). But I think the whole infrastructure behind that is no longer supported/maintained by PKP. So you would have to set up the necessary services on your own servers - I reckon there are instructions available on how to do that.

Greetings
Hermann

Good, this make life much easier. How do I display the information as the link you have sent me please? Do I have to add the code manually?

No, no manually added code. Just enable the ALM plugin, leave everything unchanged (empty) in its configuration and you should see those metrics at the end of the abstract view of each article.

I checked many articles but I do not see anything yet , you can brows and see

http://aro.koyauniversity.org/article/view/ARO.10052

Hi Dilan,

I see, there are no metrics.
But there is this

View Counter: Abstract | xxx | and PDF | yyy |

which makes me think that you perchance edited your .../templates/article/article.tpl file!?
Mine is unchanged an ends in these four lines:

{call_hook name=“Templates::Article::MoreInfo”}
{include file=“article/comments.tpl”}

{include file=“article/footer.tpl”}

The important bit is {call_hook name="Templates::Article::MoreInfo"} as the ALM-plugin registered this very hook in order to display its metrics near the end of the article view…
If this is missing in your file can you add it?

Greetings
Hermann

Yes I used the instruction on this post from Jan 2016 to add those lines to the template and right at the end reads below, which I can see the line you are referring to

<div class="separator"></div>
<h6>View Counter: {translate key="article.abstract"} | {$article->getViews()} | and
{if $galleys}
        {foreach from=$galleys item=galley name=galleyList}
                {$galley->getGalleyLabel()} | {$galley->getViews()} |
        {/foreach}
{/if}</h6> 

{call_hook name="Templates::Article::MoreInfo"}

{include file="article/comments.tpl"}

{include file="article/footer.tpl"}

Hi Dilan,

ok, now I am starting to run out of options. :slight_smile:
First let’s check the basics:
What is the operating system on your server?
Which web-server software are you using?
Which version of PHP?
What are the access rights of ../plugins/generic/alm/ and its files/sub-folders?
Does your web-server have read access to all files and sub-directories?

Greetings
Hermann

Also, after installing the ALM plugin (or after changing the directory name) are you running the database upgrade process? For generic plugins, this upgrade process updates the versions table in the database. Take a look at the reference to the ALM plugiun there to ensure the record is sane.

This is what I get from our dedicated server

What is the operating system on your server? We have a dedicated server, running Debian 8.5
Which web-server software are you using? OS is Plesk 12.5
Which version of PHP? PHP version is 5.6.22, I can have this on 7.0.10 as well
What are the access rights of …/plugins/generic/alm/ and its files/sub-folders? it is 0755 (rwx r-x r-x)
Does your web-server have read access to all files and sub-directories? folders are 0775 and files are 0644

I hope this will help

I see that there is a web interface but I was not sure what I need to do as I need to update the DB only. I do not want to damage our live website. Is there any step by step screenshots somewhere on the web please? Life would be much easier if OJS use some of Drupal 8 experiences in Installation and update as well as hooking plugin.

Web

If you do not have the PHP CLI installed, you can also upgrade by running a
web-based script. To do so:

    - Edit config.inc.php and change "installed = On" to "installed = Off"
    - Open a web browser to your OJS site; you should be redirected to the
      installation and upgrade page
    - Select the "Upgrade" link and follow the on-screen instructions **_(DO THEY MEAN UPGRADING WHOLE WEBSITE OR JUST THE DB?)_**
    - Re-edit config.inc.php and change "installed = Off" back to
       "installed = On"

If you have access to the command line, you can upgrade the database non-intrusively. If you do not have access to the command line, you can run the database upgrade script from the web interface, but this will make your site briefly unavailable.

I strongly recommend copying your live website to a testing instance on a different webserver and performing any upgrades or new plugin installs there before rolling things out to your production website. This will also give you the benefit of seeing firsthand what the upgrade process looks like without affecting the production site.

If you installed the plugin through the web interface, the upgrade script has already run. If the information in the versions database table looks ok, you do not need to re-run the upgrade script. If you manually copy a generic plugin into the filesystem, you will need to run (or re-run) the upgrade script. This will evaluate the whole OJS code for any needed database changes, and will perform them. So, yes, this affects the whole site, but it will only make changes as-needed in the database.

If using the web based script to run the upgrade,

We have gone through a painful process to get the site to this stage and I do not want to jeopardise the live site.

But I have access to command-line of the server via putty application. If it is less problematic please give me the command line for Debian 8.5 platform and I will do it.

Thanks

The command line is documented in the UPGRADE doc:

This should be safe to run on a production server, but again, I would recommend creating a development copy if you are able. You can even do this on your production box, if it is the only one you have access to, by copying the database and files, with either a new folder in your current Apache host, or a new Apache virtualhost.