Recently we updated an OJS to the latest version OJS 2.4.7.1, and we could not find the ALM plugin that we used to activate in: Home > User > Journal Management > Plugin Management > Generic Plugins.
In the previous versions we have activated the ALM plugin to show the PDF and HTML downloads and it used to work smoothly.
Did you change the location of ALM in the user interface?
Could you tell us if you missed this plugin or where is it?
Weāve stopped distributing the ALM plugin with OJS for the moment. The service is in beta and isnāt especially reliable yet. Itās been moved into a separate repository: https://github.com/pkp/ALM/tree/ojs-stable
Regards,
Alec Smecher
Public Knowledge Project Team
Copy/Move all files and directories from the ALM (for the clone) or ALM-oj-stable (for the unpacked zip-file) directory to ā¦/plugins/generic/alm/ (note the lowercase āalmā!).
what I did was this:
Furtunately I still had access-log files of my web-server (Apache) for the time I had OJS 2.4.7.1 installed.
Those were in one file per week and compressed with gzip (logrotate does that for me).
As this webserver not only serves OJS I extracted just the lines concerning OJS article downloads. E.g.
I created one ojs_downloadsā¦ file for each original access_log-file. Then I copied those files to the usageStats/stage folder (inside the files_dir configured in config.inc.php) and ran
after changing to my OJS-installation directory.
Before you run that command please check that the Parse log files regex in the settings of the Usage Statistics plugin in Journal Management > Plugin Management > Generic Plugins
matches the format of your log-files. For āApache combinedā I used /^(?P<ip>\S+) \S+ \S+ \[(?P<date>.*?)\] "\S+ (?P<url>\S+).*?" (?P<returnCode>\S+) \S+ ".*?" "(?P<userAgent>.*?)"/
You may have to change that if your access-log is not from Apache or not in the ācombinedā format.
To check if the apache-logs where imported you can use this SQL-command: select load_id from metrics where load_id not like 'usage_events%';
which should output quite some rows with the names of the access-log files you had put into the usageStats/stage directory.
Note that there is an OJS native utility (tools/copyAccessFileLogTool.php) for the zgrep step. There are a copy of other URI paths that might be useful to harvest out of the old logs.
@ctgraham,
thanks for the hint, I did not know this tool exists!
I tried to use it but I think I found a problem. When I call it e.g. like this php tools/copyAccessLogFileTool.php /var/log/httpd/access_log-20160327.gz
I get this error-message: /bin/egrep: /path/to/ojs_files/usageStats/tmp/access_log-20160327: No such file or directory
As far as I can tell the problem is that such a compressed file gets decompressed using FileManager::decompressFile() using the original file path as argument but not the temporary file path! So the original file gets decompressed and the copied one stays compressed.
Changing $filePath to $tmpFilePath in that call fixes the problem:
--- tools/copyAccessLogFileTool.php.orig 2016-04-01 10:16:27.684302000 +0200
+++ tools/copyAccessLogFileTool.php 2016-04-01 10:36:23.536839000 +0200
@@ -178,7 +178,7 @@
if ($isCompressed) {
$fileMgr = new FileManager();
$errorMsg = null;
- if (!$fileMgr->decompressFile($filePath, $errorMsg)) {
+ if (!$fileMgr->decompressFile($tmpFilePath, $errorMsg)) {
printf($errorMsg . "\n");
exit(1);
}
OK, thanks, I thought so. But the file is not in pkp/pkp-lib but in pkp/ojs. So I created a pull reqeust in that one:
I could not open an issue as this is disabled for GitHub - pkp/ojs: Open Journal Systems (?) but maybe thatās not necessary for such a small change anyway?
We manage issues in the http://github.com/pkp/pkp-lib repository, which is a library shared by several of our applications, because issues are frequently cross-application. But not a big deal, Iāve assigned the PR to one of our developers.
Regards,
Alec Smecher
Public Knowledge Project Team
The former ALM service has been retired in favor of a plugin development based on a partnership with ImpactStory. I donāt believe this work will be ported back to OJS 2.x, however.
For 2.x, you might consider the Plum Analytics plugin to expose article level metrics on your article pages, if you use DOIs for your articles.
I have visited the page and I have read all the information. I want to show it below the abstract of each tittle but unable to do so yet.
The picture is given below if it is possible please suggest me the settings.