OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Uploading into public forder by journal managers

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.

Uploading into public forder by journal managers

Postby msaghaei » Wed Feb 06, 2008 11:39 pm

Hi Alec

Currently journal managers are able to browse / upload the journal files related to submissions. But they can not see the content of public folder of their journals. It may be necessary for the journal managers to have browse / upload functions for this folder to do some journal maintenance tasks like uploading images referenced in the stylesheets. Currently the only way to upload the files into their public folder (e.g. public/journals/journals_id) is to use ftp upload or to write an script for this purpose. For security reason I think the best way is to extend the ojs functionality to cover this. I like to know how can we incorporate this functionality into journal manager's file browser interface.

Regards,

Mahmoud
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Uploading into public forder by journal managers

Postby msaghaei » Fri Feb 08, 2008 12:35 am

A site-width approach is to add a directive to config.inc.php in the [files] section to tell the File Browser function which one to brwose:
Code: Select all
; Set to public_files_dir to browse the public folder, or to files_dir to browse files folder
file_browser = files_dir


Then modify the function getRealFilesDir in pages/manager/FilesHandler.inc.php to:
Code: Select all
   function getRealFilesDir($currentDir) {
      $journal = &Request::getJournal();
      $file_browser = Config::getVar('files', 'file_browser');
      return Config::getVar('files', $file_browser) . '/journals/' . $journal->getJournalId() .'/' . $currentDir;
   }


This is simple, but all journals in an installation will be affected.

Regards,
Mahmoud
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: Uploading into public forder by journal managers

Postby msaghaei » Fri Feb 08, 2008 3:27 am

A per-journal approach is also possible.

To make it a selectable feature by manager, we should 1) insert a (setting_name, setting_value) pair into the journal_settings table, 2) adding required entries in classes/manager/form/setup/JournalSetupStepXForm.inc.php and templates/manager/setup/stepX.tpl to address the setting in the DB, and finally 3) modifying the getRealFilesDir() function to decide which folder must be browsed depending on the journal setting. This may need adding some message keys in locale.xml file.

This way the journal manager has access to both public and files folder. This needs frequent setting changes if the manager wants to browse both folders frequently.

But I am looking for a per-request approach, such as having two links in management pages one for 'File Browser' and another for 'Public File Browser'

Regards,
Mahmoud
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests