OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Public Folder Browser Plugin

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Public Folder Browser Plugin

Postby msaghaei » Mon Mar 29, 2010 12:07 pm

This plugin appends a link to the management pages of the journal management. Clicking on this link will display the contents of the journal public folder. This way journal manager will be able to manage the files and folders in the journal public folder. Its main use is for uploading accessory or public usage files such as style sheets and image files when you do not have direct server file ftp upload permission.
Extract the downloaded file into the generic folder to make the plugin appears in the Generic Plugin page. This plugin has no setting page. Just enable it to make the link appear in the management pages of the journal manger. It behaves exactly the same as the native file browser function of OJS, except for working on the public folder, not file folder.

Author: Mahmoud Saghaei
Software: OJS
Versions: 2.2+
Multilingual: yes

For information about finding and using the direct link to uploaded files in the journal public folder please refer to the following post:
http://pkp.sfu.ca/support/forum/viewtopic.php?f=9&t=5939&p=22689#p22689
Attachments
publicFolderBrowser.tar.gz
Public Folder Browser Plugin
(4.07 KiB) Downloaded 791 times
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Public Folder Browser Plugin

Postby linuxy » Mon Sep 06, 2010 8:20 am

Good job Mr. Mahmoud Saghaei. This is a wonderful plugin. Very useful. I'm still exploring OJS and I hope to learn a lot as fast as possible.
linuxy
 
Posts: 1
Joined: Mon Sep 06, 2010 7:08 am

Re: Public Folder Browser Plugin

Postby jeanh » Tue Dec 07, 2010 4:16 pm

I am using OJS version 2.3.1.2, and when I try to install this plugin I get the error message:

"Errors occurred processing this form:

* Version.xml not found in plugin directory"

Does this mean the plugin won't work with the OJS version yet?
jeanh
 
Posts: 2
Joined: Tue Dec 07, 2010 4:14 pm

Re: Public Folder Browser Plugin

Postby jmacgreg » Mon Dec 13, 2010 12:19 pm

Hi Jeanh,

That's correct -- this plugin has not yet been updated to work with OJS 2.3+; specifically, it doesn't have a version.xml file, which is now mandatory for plugins. You may be able to just copy a version.xml file from another plugin, and modify it to be specific for this one; try that, and let us know if you still encounter any problems.

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

Re: Public Folder Browser Plugin

Postby macdonaldc » Tue Jul 26, 2011 12:21 pm

I'm trying to install the "Public Folder Browser" Plugin, but I am getting the error message:

Errors occurred processing this form:

Plugin was not successfully copied. This may be a permissions problem. Please make sure that the web server is able to write to the plugins directory (including subdirectories) but don't forget to secure it again later.

I am running OJS version 2.3.4.0.

The reason I want this plugin, is so I can have public access to downloadable files, specifically a manuscript template and a reviewer evaluation form. Currently, I have these files in the "Files Browser" section, so only a user with JM access can download these files. I do not have site administrator access -- only JM access. What are my options?

Cheers,

Colin
macdonaldc
 
Posts: 10
Joined: Fri Jun 03, 2011 11:32 am

Re: Public Folder Browser Plugin

Postby msaghaei » Tue Jul 26, 2011 2:09 pm

Hi Colin

For new versions of OJS two extra steps are necessary to make the plugins functional:

1- a version.xml file in each generic plugin subdirectory. please download and place the attached version.xml file in the plugins/generic/publicFolderBrowser

2- Add a record to the version table in your ojs database. For instruction on how to do this please consult your site admin. you or your site admin may use the following SQL command to insert a new record for publicFolderBrowser plugin into the version table:
Code: Select all
INSERT INTO `versions` (`major`, `minor`, `revision`, `build`, `date_installed`, `current`, `product_type`, `product`, `product_class_name`, `lazy_load`, `sitewide`) VALUES (1, 0, 0, 0, '2011-07-27 01:03:08', 1, 'plugins.generic', 'publicFolderBrowser', 'PublicFolderBrowserPlugin', 1, 0)

After the above steps if you encountered again errors, please send the the exact error message together with version info of your OJS installation.

Thank you
Mahmoud
Attachments
version.xml
(517 Bytes) Downloaded 410 times
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Public Folder Browser Plugin

Postby asmecher » Tue Aug 02, 2011 8:38 am

Hi all,

Just an FYI -- instead of inserting the entry manually into the "versions" table as described above, you should be able to accomplish the same thing by invoking the upgrade script, i.e.:
Code: Select all
php tools/upgrade.php upgrade
(Be sure you aren't working on a broken, i.e. semi-upgraded version of OJS before you do this. If you aren't sure, it's probably best to create a back-up first, just in case.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8857
Joined: Wed Aug 10, 2005 12:56 pm

Re: Public Folder Browser Plugin

Postby ramon » Mon Sep 12, 2011 7:37 am

Hello all,

Isn't this plugin supposed to add a link to the 'public' folder?
I installed the plugin, by uncompressing, adding the version.xml file to the folder and running "php tools/upgrade.php upgrade" (which added the line in the DB as per the SQL above).
However, I only have the articles and issues folder available...
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Public Folder Browser Plugin

Postby msaghaei » Tue Sep 13, 2011 9:54 am

It should add "Public Folder Browser" as the last link in the Management Page of journal manager. Please double check the end of the list.
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Public Folder Browser Plugin

Postby ramon » Tue Sep 13, 2011 12:26 pm

Hello msaghaei,

Indeed it shows a new link and it works.
I got confused, even though the plugin was not translated to Portuguese.

Here's the translation, for anyone not willing/unable to use the Translator Plugin.
locale.xml
Public Folder Browser Plugin translation to Brazilian Portuguese.
(1.09 KiB) Downloaded 294 times
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Public Folder Browser Plugin

Postby ramon » Mon Sep 26, 2011 1:05 pm

Hello all,

How difficult to make this work in OCS??

I tried installing it in an OCS 2.3.3-1 and it threw this error:
Code: Select all
PHP Fatal error:  Call to undefined method Request::getJournal() in /home/ramon/congresso/enancib/plugins/generic/publicFolderBrowser/PublicFolderBrowserPlugin.inc.php on line 81


It seems there's a lot to modify in order to make it work.
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Public Folder Browser Plugin

Postby pecijackson » Mon Jan 30, 2012 8:56 pm

thanks for this plugin sir msaghei.

it didn't work at first ,
but after i try to fix the problems using solutions u've given, it helps me so much, easy to use. no setting's needed. so simple.
thank you very much :D
pecijackson
 
Posts: 1
Joined: Mon Jan 30, 2012 8:51 pm

Re: Public Folder Browser Plugin

Postby ramon » Tue Mar 13, 2012 10:14 am

Hello all,

Any chance this plugins gets ported to OCS any time soon??
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Public Folder Browser Plugin

Postby ramon » Mon Oct 08, 2012 12:28 pm

Hello all,

I'm trying to modify the code of this plugin so that it works on OCS.
However, I'm having trouble displaying the locale correctly.
Although the locale.xml files are there, it only displays the translation keys.
Code: Select all
##plugins.generic.publicfolderbrowser.displayName##
##plugins.generic.publicfolderbrowser.description##
Desabilitar  Atualizar plugin  Excluir plugin

I changed all references to the previous Translate function to match current version translation.
For example:
Code: Select all
function getDescription() {
  //return Locale::translate('plugins.generic.publicfolderbrowser.description');
  return __('plugins.generic.publicfolderbrowser.description');      
}   

I also added
Code: Select all
 $this->addLocaleData();   


Any tips on how to fix the translation?

The link is not displayed either in the conference management pages.
This one should be trickier, as I haven't found any reference that I can use....
This is what I've come up with, without luck..
Code: Select all
       /**
    * function callback name changed to match announcement plugin
    *
    **/
   function callbackAddLinks($hookName, $args) {
      if ($this->getEnabled()) {
         $templateManager =& $args[0];
         $currentConference =& $templateManager->get_template_vars('currentConference');
         $publicFolderBrowserEnabled = $currentConference ? $currentConference->getSetting('enablePublicFolderBrowser') : false;
         $params =& $args[0];
         $smarty =& $args[1];
         $output =& $args[2];
         $url = Request::url(null, null, 'publicFolder');
         $output = "<li>&#187; <a href='{$url}'>" . __("plugins.generic.publicfolderbrowser.linklabel") . "</a></li>";
         return false;
      }
   }


If there's any programmer with time, help is greatly appreciated...

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Feature request: public link to copy-and-paste

Postby mgregson » Sun Oct 14, 2012 8:40 pm

It would be really nice if the Public Folder Browser provided a public link for each file (e.g., /public/journals/1/example.pdf) that can be copied and pasted elsewhere. A good use case is additional guidelines for authors that may be uploaded and then linked from the Author Guidelines section. This feature would simplify the creation of publicly accessible links to documents. This is particularly important for journal staff with limited HTML/web skills. As it is currently, the person creating links needs to remember the URL format or copy it from elsewhere, e.g., existing links or separate documentation.

Cheers
Mark
mgregson
 
Posts: 14
Joined: Wed Jan 19, 2011 8:22 pm

Next

Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 1 guest