Difference between revisions of "EdShareCollectionsInstallation"
(→archives/ARCHIVEID/cfg/cfg.d/z_bookmarks.pl) |
|||
Line 53: | Line 53: | ||
Obviously you can change <code>$page</code> to be whatever element you want to put the bookmark manager into. | Obviously you can change <code>$page</code> to be whatever element you want to put the bookmark manager into. | ||
− | ====archives/ARCHIVEID/cfg/cfg.d/z_bookmarks.pl==== | + | =====archives/ARCHIVEID/cfg/cfg.d/z_bookmarks.pl===== |
'''OPTIONAL''' | '''OPTIONAL''' | ||
Revision as of 01:03, 4 December 2009
Contents
Introduction
The collections plugin is part of EdShare suite. It is based on code developed in EdShare and LanguageBox. The goal of this project is to produce a package that allows the easy installation of the collections functionality on a vanilla EPrints installation.
For more details about this plugin see EdShareCollections.
Requirements
The EdShare Collections plugin has been tested and confirmed to run on EPrints 3.1.3.
Installation
As with all package installations it is important to remember to backup your installation of EPrints before continuing.
Extract Package
The package should be extracted in the appropriate archive directory of your EPrints installation. Run the following commands replacing ARCHIVEID with the name of the archive you want the collections on, and replace VERSION with the appropriate version number based on the package you have downloaded;
cd /opt/eprints3/archives/ARCHIVEID tar -xzf collections-VERSION.tar.gz
These commands assume that you installed EPrints to /opt/eprints3 substitute this for something else if you installed it elsewhere. Users of the Ubuntu version of EPrints will find that it is installed by default at /usr/share/eprints3.
Install CGI Scripts
Link the collections CGI scripts to the EPrints CGI directory:
ln -s /opt/eprints3/archives/ARCHIVEID/cgi/collectionselect/ /opt/eprints3/cgi/ ln -s /opt/eprints3/archives/ARCHIVEID/cgi/bookmarks/ /opt/eprints3/cgi/
Patch Default Workflow
Assuming that you have patch installed on you system then you need to run;
patch -i default_collection_workflow.patch
Edit Configuration Files
archive/ARCHIVEID/cfg/namedsets/eprint
Add collection
to the types for eprint list. The position it is in this list will be the position it will appear when choosing a type in the new item workflow.
archive/ARCHIVEID/cfg/cfg.d/eprints_warnings.pl
You will need to add an exception here to stop warnings appearing for users when they deposit a collection. A warning will appear because no files have been loaded for the collection but this is fine. If you have not edited this file before look for the following line;
if( @docs == 0 )
Replace it with the following;
if( $eprint->get_type ne 'collection' && @docs == 0 )
This should stop the warning from appearing.
archives/ARCHIVEID/cfg/cfg.d/eprint_render.pl
Somewhere on your abstract page you will want to add the bookmark manager. This includes all of the appropriate JavaScript and HTML to render a control for bookmarks. To add the bookmark manager add the following code;
$page->appendChild( EPrints::Plugin::Bookmarks::render_bookmark_manager( $session, $eprint ) );
Obviously you can change $page
to be whatever element you want to put the bookmark manager into.
archives/ARCHIVEID/cfg/cfg.d/z_bookmarks.pl
OPTIONAL
This step is not actually required as part of the installation but it is important that you take note of it since there may be some undesired results when using the plugin.
The bookmarks plugin defines $c->{get_users_owned_eprints}
in the z_bookmarks.pl file. If you are installing the plugin on a vanilla install of EPrints then there should not be a problem. But if you have installed other plugins, or implemented this function yourself then you will need to modify the function and comment this function out in z_bookmarks.pl.
archives/ARCHIVEID/cfg/cfg.d/collection_render.pl
OPTIONAL
It is possible to customize the layout of the collection pages by modifying the collection_render function located in archives/ARCHIVEID/cfg/cfg.d/collection_render.pl. This function is very similar to the eprint_render function except that certain fields in the EPrint object will not be set. Refer to the default function for more details.
Restart Web Server
Once you have completed all of these previous steps, you will need to restart your web server in the usual fashion.
Bugs
Please report all bugs to the OneShare Bugtracker. There is a project setup for OneShare collections called OneShare Packages >> Collections.