Difference between revisions of "Sneep"

From EPrints Documentation
Jump to: navigation, search
(Downloading)
(Downloading)
Line 12: Line 12:
  
 
===Downloading===
 
===Downloading===
Make sure that you download the file at the following link, Sneep for EPrints 3.2. The file should be called sneep-3.2-VERSION.tar.gz, where VERSION is the version of SNEEP you have downloaded.
+
Make sure that you download the file at the following link, Sneep for EPrints 3.2. The file should be called sneep-3.2-VERSION.tar.gz, where ''VERSION'' is the version of SNEEP you have downloaded.
  
 
===Extracting===
 
===Extracting===

Revision as of 16:14, 4 January 2010

Overview

The SNEEP (Social Networking Extensions to EPrints) project originally written at the ULCC provides a commenting functionality. This package includes a new implementation of the plugin which is compatible with both EPrints 3.1 and 3.2 in an easily installable and refactored package.

The original SNEEP project can be found at http://sneep.ulcc.ac.uk/wiki/index.php/Main_Page

Installation

The preferred installation of this SNEEP system is on the EPrints 3.2 version. To check your version of EPrints, please visit http://yourrepository/cgi/counter.

Installing on EPrints 3.2

Downloading

Make sure that you download the file at the following link, Sneep for EPrints 3.2. The file should be called sneep-3.2-VERSION.tar.gz, where VERSION is the version of SNEEP you have downloaded.

Extracting

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 sneep-3.2-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.

Link CGI Scripts

Next you need to link the CGI scripts. This is done with the following commands;

ln -s /usr/share/eprints3/archives/ARCHIVEID/cgi/sneep /usr/share/eprints3/cgi/sneep
ln -s /usr/share/eprints3/archives/ARCHVIEID/cgi/users/sneep /usr/share/eprints3/cgi/users/sneep

You will need to replace /usr/share/eprints3 with your appropriate EPrints directory and change ARCHIVEID to the name of your archive.

Final Steps

Installing on EPrints 3.1

Downloading

Make sure that you download the file at the following link, Sneep for EPrints 3.1. The file should be called sneep-3.1-XXX.tar.gz, where XXX is the version of SNEEP you have downloaded.

Extracting

  • Extract the perl_lib folder from the downloaded file into the root of your eprints installation (usually /opt/eprints3 or /usr/share/eprints3).
  • Extract the files from the archives/ARCHIVEID folder in the downloaded file into your archives/ARCHIVEID folder, where ARCHIVEID is the name of your archive.

Link CGI Scripts

Next you need to link the CGI scripts. This is done with the following commands;

ln -s /usr/share/eprints3/archives/ARCHIVEID/cgi/sneep /usr/share/eprints3/cgi/sneep
ln -s /usr/share/eprints3/archives/ARCHVIEID/cgi/users/sneep /usr/share/eprints3/cgi/users/sneep

You will need to replace /usr/share/eprints3 with your appropriate EPrints directory and change ARCHIVEID to the name of your archive.

Core Modifications

perl_lib/EPrints/DataSet.pm

In this file locate the following section:

request => {
  sqlname => "request",
  class => "EPrints::DataObj::Request",
  import => 1,
  index => 1,
  datestamp => "datestamp",
},

Immediately after this block, add the following:

sneep => {
  sqlname => "sneep",
  class => "EPrints::DataObj::Sneep",
  index => 1,
},

Next find the following in the same file,

sub get_sql_dataset_ids
{
  return( qw/ import metafield cachemap message loginticket eprint user document saved_search subject history access request / );
}

At the end of the return line add sneep so that it resembles the following;

sub get_sql_dataset_ids
{
  return( qw/ import metafield cachemap message loginticket eprint user document saved_search subject history access request sneep / );
}

Sneep Counter

To install the sneep counter in the execute the following SQL statement on your database;

INSERT INTO counters SET countername='sneepid',counter=0;

Final Steps

Run the following commands to complete installation of the sneep extension;

bin/epadmin reload ARCHIVEID
bin/epadmin update_database_structure ARCHIVEID
bin/generate_static ARCHIVEID
bin/generate_abstracts ARCHIVEID

After doing this and restarting your webserver Sneep is now installed.