Difference between revisions of "EdShareCollectionsInstallation"

From EPrints Documentation
Jump to: navigation, search
m (archives/ARCHIVEID/cfg/cfg.d/collections.pl)
m (add categories)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==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]].'''
+
EdShare on EPrints 3.2 is no longer available to download.
  
==Requirements==
 
The EdShare Collections plugin has been tested and confirmed to run on EPrints 3.1.3.
 
  
==Installation==
+
'''The latest version of the fully supported EdShare, running on EPrints 3.3, is only available from EPrints Services.'''
  
'''As with all package installations it is important to remember to backup your installation of EPrints before continuing.'''
 
  
===Extract Package===
+
Please visit http://www.eprints.org/uk/index.php/openeducation/ for further information or email K.Terrell@soton.ac.uk
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''.
+
[[Category:Obsolete]]
 
+
[[Category:EdShare]]
===Install CGI Scripts===
+
[[Category:Eprints3.2]]
Link the collections CGI scripts to the EPrints CGI directory:
 
 
 
ln -s /opt/eprints3/archives/ARCHIVEID/cgi/users/collectionselect/ /opt/eprints3/cgi/users
 
ln -s /opt/eprints3/archives/ARCHIVEID/cgi/users/bookmarks/ /opt/eprints3/cgi/users
 
 
 
===Patch Default Workflow===
 
Assuming that you have patch installed on you system then you need to run;
 
 
 
patch -p0 < default_collection_workflow.patch
 
 
 
'''This patch will only work if you have not yet modified your default workflow.''' If you have then you will need to add the following to your code inside the ''<flow>'' tags, this modification is what an unmodified default workflow should look like once changed;
 
 
 
<flow>
 
  <stage ref="type"/>
 
  <epc:choose>
 
    <epc:when test="type = 'collection'">
 
      <stage ref="collection"/>
 
    </epc:when>
 
    <epc:otherwise>
 
      <stage ref="files"/>
 
      <stage ref="core"/>
 
      <stage ref="subjects"/>
 
    </epc:otherwise>
 
  </epc:choose>
 
</flow>
 
 
 
Then at the work flow file still inside the ''<workflow>'' tags you need to add the following;
 
 
 
<stage name="collection">
 
  <component type="Field::Multi">
 
    <title><epc:phrase ref="Plugin/Collection:details_title"/></title>
 
    <field ref="title" required="yes" input_lookup_url="{$config{perl_url}}/users/lookup/title_duplicates" input_lookup_params="eprintid={eprintid}"/>
 
    <field ref="abstract"/>
 
  </component>
 
  <component type="Field::CollectionSelect">
 
    <field ref="relation"/>
 
  </component>
 
</stage>
 
 
 
===Edit Configuration Files===
 
 
 
====archive/ARCHIVEID/cfg/namedsets/eprint====
 
Add <code>collection</code> 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/eprint_validate.pl====
 
In the ''validate_eprint'' function look for the line <code>my @problems = ();</code> and after it add;
 
 
 
return( @problems ) if( $eprint->get_type eq 'collection' );
 
 
 
====archive/ARCHIVEID/cfg/cfg.d/eprint_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/citations/eprint/default.xml====
 
Assuming you haven't modified the default citation you want to look for the first ''<choose>'' block at the top of the citation. And add the following;
 
 
<choose>
 
  &lt;!-- Code ommitted for brevity --&gt; 
 
  <when test="type = 'collection'">
 
    <print expr="userid"/>
 
  </when>
 
  &lt;!-- Code ommitted for brevity --&gt;
 
</choose>
 
 
 
This will put the user citation for the user that created this collection at the front of the default EPrint citation.
 
 
 
====archives/ARCHIVEID/cfg/cfg.d/collection.pl====
 
'''OPTIONAL'''
 
 
 
The collections extension provides you with two control boxes that appear on your abstract pages, a bookmark controls box and collection membership box. The collection membership box will not render on the collections page. It is possible to disable these boxes or change where they appear on the page.
 
 
 
To disable either of the boxes look in this file for either of the following lines;
 
 
 
$c->{plugins}->{"Screen::EPrint::Box::BookmarkTools"}->{params}->{disable} = 0;
 
$c->{plugins}->{"Screen::EPrint::Box::CollectionMembership"}->{params}->{disable} = 0;
 
 
 
If you want to disable either of the boxes then you just need to set the value of this setting to 1 and then regenerate your abstract pages and now the boxes will appear or not according to your preferences.
 
 
 
You can also choose where on the page the boxes appear. Replace the 1000 with undef and the undef with 1000 for the position you want the box to appear. To hide the box use the method above to do so rather then declare all of the positions as undef.
 
 
 
$c->{plugins}->{"Screen::EPrint::Box::BookmarkTools"}->{appears}->{summary_top} = undef;
 
$c->{plugins}->{"Screen::EPrint::Box::BookmarkTools"}->{appears}->{summary_right} = 1000;
 
$c->{plugins}->{"Screen::EPrint::Box::BookmarkTools"}->{appears}->{summary_bottom} = undef;
 
$c->{plugins}->{"Screen::EPrint::Box::BookmarkTools"}->{appears}->{summary_left} = undef;
 
 
 
Again any changes will need to be followed by a regeneration of your abstract pages for them to be visible.
 
 
 
====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 <code>$c->{get_users_owned_eprints}</code> 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 [http://lslvm-mmr4.ecs.soton.ac.uk/ OneShare Bugtracker]. There is a project setup for OneShare collections called ''OneShare Packages >> Collections''.
 

Latest revision as of 00:25, 12 September 2018

EdShare on EPrints 3.2 is no longer available to download.


The latest version of the fully supported EdShare, running on EPrints 3.3, is only available from EPrints Services.


Please visit http://www.eprints.org/uk/index.php/openeducation/ for further information or email K.Terrell@soton.ac.uk