<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.ext-9.eprints-hosting.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dkane</id>
	<title>EPrints Documentation - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ext-9.eprints-hosting.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dkane"/>
	<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/Special:Contributions/Dkane"/>
	<updated>2026-05-09T03:47:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_write_plugins&amp;diff=11477</id>
		<title>How to write plugins</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_write_plugins&amp;diff=11477"/>
		<updated>2015-11-02T16:12:37Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* You will need */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugins]]&lt;br /&gt;
[[Category:Contribute]]&lt;br /&gt;
&lt;br /&gt;
== What is a Plugin? ==&lt;br /&gt;
&lt;br /&gt;
The plugin system for EPrints 3 has been developed to make it easy and share the most common extensions to the code without having to hack the core system (and causing yourself problems with upgrades etc.)&lt;br /&gt;
&lt;br /&gt;
Plugins are a way to make functionality easy to maintain and transfer. If you make any customizations to your repository other than metadata and appearence changes then you will probably want to write a plugin.&lt;br /&gt;
&lt;br /&gt;
== You will need ==&lt;br /&gt;
* A basic understanding of perl (don&#039;t be scared - its not hard and there are plenty of tutorials on the web)&lt;br /&gt;
&lt;br /&gt;
* An EPrints installation to play about on. A Virtual box with [[:Category:Installation|EPrints installed]] is ideal.&lt;br /&gt;
&lt;br /&gt;
* Information from the [[:Category:API|EPrints API]]&lt;br /&gt;
&lt;br /&gt;
* For some types of plugin you might also find some Javascript and CSS knowledge helpful.&lt;br /&gt;
&lt;br /&gt;
== Write a Plugin! ==&lt;br /&gt;
&lt;br /&gt;
When the system loads, it automatically loads all modules in the archives/ARCHIVE_ID/cfg/plugins/EPrints/Plugin/ directory, so for simple plugins you just drop them in that directory and you&#039;re done!&lt;br /&gt;
&lt;br /&gt;
When a plugin is loaded it has a registration method which is called which tells the core EPrints system what this plugin does. EPrints then makes it available as appropriate.&lt;br /&gt;
&lt;br /&gt;
Clever plugins can detect features they need and adapt to use the tools available, or disable themselves if they are missing required tools (rather than crash the system). Some specialised plugins are disabled in their default state and must be enabled in the repository configuration.&lt;br /&gt;
&lt;br /&gt;
Another cool thing is that plugins are Perl Objects, which means you can subclass them. Here&#039;s an real-world example: We have a research group which uses BibTeX but over the years standardised within the group on an extra field. This is not a valid bibtex field, but are essential to their working because they have ancient and essential scripts which depend on it. To handle this we can subclass the default BibTeX Export plugin and override a single method (the data mapping one). We then just call the original parent plugins mapping method to do all the heavy lifting, then just add our non-standard extra field. Total code required: less than one screen. Number of happy researchers: none (they are never satisfied), but number of researchers able to get their work done: lots. Don&#039;t believe me? [[BibTeX Extension Example|look here]]!&lt;br /&gt;
&lt;br /&gt;
* See also [[Extension Packages]] for how to add configuration and resource files to plugins.&lt;br /&gt;
&lt;br /&gt;
=== Types of Plugin ===&lt;br /&gt;
&lt;br /&gt;
There are a number of different kinds of plugin for EPrints. You can find a comprehensive list of [[Perl_lib/EPrints/Plugin/|types of plugins here]]. The most of common of those are... &lt;br /&gt;
&lt;br /&gt;
==== Export Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used to export the data in a variety of formats. A number of tutorials have been created to help you create your own export plugins:&lt;br /&gt;
&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsHello| Export Plugin Tutorial 1: &amp;quot;Hello, World!&amp;quot;]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsList| Export Plugin Tutorial 2: List handling]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsHTML| Export Plugin Tutorial 3: HTML]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsExcel| Export Plugin Tutorial 4: Excel]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsZip| Export Plugin Tutorial 5: Zip]]&lt;br /&gt;
&lt;br /&gt;
==== Import Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used to import data into a repository. They can take datafiles directly, or they can take an ID of a record that can be retrieved in a known way, or a URL of a file, or... whatever.&lt;br /&gt;
&lt;br /&gt;
These are a bit trickier to write than export plugins as parsing data is harder than just &amp;quot;print&amp;quot;ing it, but they are still reasonably straight forward. To get you started a small selection of tutorials has been written:&lt;br /&gt;
&lt;br /&gt;
* [[Contribute:_Plugins/ImportPluginsCSV| Import Plugin Tutorial 1: CSV]]&lt;br /&gt;
* [[Contribute:_Plugins/ImportPluginsAWS| Import Plugin Tutorial 2: Amazon Web Services]]&lt;br /&gt;
&lt;br /&gt;
==== Screen Plugin ====&lt;br /&gt;
&lt;br /&gt;
These handle (almost) all the user interface screens. Pages like &amp;quot;Review&amp;quot; and &amp;quot;Profile&amp;quot; are just built-in plugins. You can add your own very easily. &lt;br /&gt;
&lt;br /&gt;
Examples you could create...&lt;br /&gt;
* Birds Eye View - a view of various statistics on the database, all in one page.&lt;br /&gt;
* Spellchecking Tab - an additional tab in the item control page which checks the spelling on certain fields.&lt;br /&gt;
* Bulk Delete tool - a tool which takes a list of eprintid&#039;s and deletes them all in a fell swoop.&lt;br /&gt;
&lt;br /&gt;
Look at the existing Screen Plugins for an idea of how they work. They can be very simple.&lt;br /&gt;
&lt;br /&gt;
* [[How to make a Screen for the Admin Section]]&lt;br /&gt;
* [[How to make a Screen perform Actions]]&lt;br /&gt;
&lt;br /&gt;
==== Input Component Plugin ====&lt;br /&gt;
&lt;br /&gt;
These handle how the workflow components are rendered. Built in components include the default (one field) component, the multiple fields component, the upload component, the subject component (which does pretty things to a field of type &amp;quot;subject&amp;quot;) and the XHTML component. You can add your own or sub-class existing ones.&lt;br /&gt;
&lt;br /&gt;
==== Convert Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used for two things, currently.&lt;br /&gt;
&lt;br /&gt;
* Converting the full text of documents into utf-8 text for search indexing&lt;br /&gt;
* Converting images and pdfs into thumbnails and previews&lt;br /&gt;
&lt;br /&gt;
Some examples you could create:&lt;br /&gt;
&lt;br /&gt;
* RTF to utf-8 to allow rich text documents to be indexed.&lt;br /&gt;
* Powerpoint to Thumbnail to allow thumbnail and previews of powerpoint slides&lt;br /&gt;
* Video to Thumbnail/Preview to make a still preview of a video file.&lt;br /&gt;
&lt;br /&gt;
== What next ==&lt;br /&gt;
Try out some of the examples and see where you get to. If you hit problems you can always talk to EP-Tech. {{EPrintsTech}}.&lt;br /&gt;
&lt;br /&gt;
Go take a look at [[Extension Packages]] for a bit more about how you can make your plugins richer.&lt;br /&gt;
&lt;br /&gt;
Its probably a good a idea to look at [[Tips to write plugins|some tips]]. It will help you write better plugins.&lt;br /&gt;
&lt;br /&gt;
Probably the best place you can go is your own perl_lib/EPrints/Plugin directory and have a look at some of similar cases. Or to [http://files.eprints.org http://files.eprints.org] to take a look at other peoples plugins.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve written a plugin and you&#039;re happy with it the EPrints Team encourages you to share it with the EPrints community at [http://files.eprints.org http://files.eprints.org]. If nothing else its a good place to store your code for future use. You might even get some valuable feed back.&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_write_plugins&amp;diff=11476</id>
		<title>How to write plugins</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_write_plugins&amp;diff=11476"/>
		<updated>2015-11-02T16:06:12Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* You will need */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugins]]&lt;br /&gt;
[[Category:Contribute]]&lt;br /&gt;
&lt;br /&gt;
== What is a Plugin? ==&lt;br /&gt;
&lt;br /&gt;
The plugin system for EPrints 3 has been developed to make it easy and share the most common extensions to the code without having to hack the core system (and causing yourself problems with upgrades etc.)&lt;br /&gt;
&lt;br /&gt;
Plugins are a way to make functionality easy to maintain and transfer. If you make any customizations to your repository other than metadata and appearence changes then you will probably want to write a plugin.&lt;br /&gt;
&lt;br /&gt;
== You will need ==&lt;br /&gt;
* A basic understanding of perl (don&#039;t be scared - its not hard and there&#039;s plenty of tutorials on the web)&lt;br /&gt;
&lt;br /&gt;
* An EPrints installation to play about on. A Virtual box with [[:Category:Installation|EPrints installed]] is ideal.&lt;br /&gt;
&lt;br /&gt;
* Information from the [[:Category:API|EPrints API]]&lt;br /&gt;
&lt;br /&gt;
* For some types of plugin you might also find some Javascript and CSS knowledge helpful.&lt;br /&gt;
&lt;br /&gt;
== Write a Plugin! ==&lt;br /&gt;
&lt;br /&gt;
When the system loads, it automatically loads all modules in the archives/ARCHIVE_ID/cfg/plugins/EPrints/Plugin/ directory, so for simple plugins you just drop them in that directory and you&#039;re done!&lt;br /&gt;
&lt;br /&gt;
When a plugin is loaded it has a registration method which is called which tells the core EPrints system what this plugin does. EPrints then makes it available as appropriate.&lt;br /&gt;
&lt;br /&gt;
Clever plugins can detect features they need and adapt to use the tools available, or disable themselves if they are missing required tools (rather than crash the system). Some specialised plugins are disabled in their default state and must be enabled in the repository configuration.&lt;br /&gt;
&lt;br /&gt;
Another cool thing is that plugins are Perl Objects, which means you can subclass them. Here&#039;s an real-world example: We have a research group which uses BibTeX but over the years standardised within the group on an extra field. This is not a valid bibtex field, but are essential to their working because they have ancient and essential scripts which depend on it. To handle this we can subclass the default BibTeX Export plugin and override a single method (the data mapping one). We then just call the original parent plugins mapping method to do all the heavy lifting, then just add our non-standard extra field. Total code required: less than one screen. Number of happy researchers: none (they are never satisfied), but number of researchers able to get their work done: lots. Don&#039;t believe me? [[BibTeX Extension Example|look here]]!&lt;br /&gt;
&lt;br /&gt;
* See also [[Extension Packages]] for how to add configuration and resource files to plugins.&lt;br /&gt;
&lt;br /&gt;
=== Types of Plugin ===&lt;br /&gt;
&lt;br /&gt;
There are a number of different kinds of plugin for EPrints. You can find a comprehensive list of [[Perl_lib/EPrints/Plugin/|types of plugins here]]. The most of common of those are... &lt;br /&gt;
&lt;br /&gt;
==== Export Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used to export the data in a variety of formats. A number of tutorials have been created to help you create your own export plugins:&lt;br /&gt;
&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsHello| Export Plugin Tutorial 1: &amp;quot;Hello, World!&amp;quot;]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsList| Export Plugin Tutorial 2: List handling]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsHTML| Export Plugin Tutorial 3: HTML]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsExcel| Export Plugin Tutorial 4: Excel]]&lt;br /&gt;
* [[Contribute:_Plugins/ExportPluginsZip| Export Plugin Tutorial 5: Zip]]&lt;br /&gt;
&lt;br /&gt;
==== Import Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used to import data into a repository. They can take datafiles directly, or they can take an ID of a record that can be retrieved in a known way, or a URL of a file, or... whatever.&lt;br /&gt;
&lt;br /&gt;
These are a bit trickier to write than export plugins as parsing data is harder than just &amp;quot;print&amp;quot;ing it, but they are still reasonably straight forward. To get you started a small selection of tutorials has been written:&lt;br /&gt;
&lt;br /&gt;
* [[Contribute:_Plugins/ImportPluginsCSV| Import Plugin Tutorial 1: CSV]]&lt;br /&gt;
* [[Contribute:_Plugins/ImportPluginsAWS| Import Plugin Tutorial 2: Amazon Web Services]]&lt;br /&gt;
&lt;br /&gt;
==== Screen Plugin ====&lt;br /&gt;
&lt;br /&gt;
These handle (almost) all the user interface screens. Pages like &amp;quot;Review&amp;quot; and &amp;quot;Profile&amp;quot; are just built-in plugins. You can add your own very easily. &lt;br /&gt;
&lt;br /&gt;
Examples you could create...&lt;br /&gt;
* Birds Eye View - a view of various statistics on the database, all in one page.&lt;br /&gt;
* Spellchecking Tab - an additional tab in the item control page which checks the spelling on certain fields.&lt;br /&gt;
* Bulk Delete tool - a tool which takes a list of eprintid&#039;s and deletes them all in a fell swoop.&lt;br /&gt;
&lt;br /&gt;
Look at the existing Screen Plugins for an idea of how they work. They can be very simple.&lt;br /&gt;
&lt;br /&gt;
* [[How to make a Screen for the Admin Section]]&lt;br /&gt;
* [[How to make a Screen perform Actions]]&lt;br /&gt;
&lt;br /&gt;
==== Input Component Plugin ====&lt;br /&gt;
&lt;br /&gt;
These handle how the workflow components are rendered. Built in components include the default (one field) component, the multiple fields component, the upload component, the subject component (which does pretty things to a field of type &amp;quot;subject&amp;quot;) and the XHTML component. You can add your own or sub-class existing ones.&lt;br /&gt;
&lt;br /&gt;
==== Convert Plugin ====&lt;br /&gt;
&lt;br /&gt;
These are used for two things, currently.&lt;br /&gt;
&lt;br /&gt;
* Converting the full text of documents into utf-8 text for search indexing&lt;br /&gt;
* Converting images and pdfs into thumbnails and previews&lt;br /&gt;
&lt;br /&gt;
Some examples you could create:&lt;br /&gt;
&lt;br /&gt;
* RTF to utf-8 to allow rich text documents to be indexed.&lt;br /&gt;
* Powerpoint to Thumbnail to allow thumbnail and previews of powerpoint slides&lt;br /&gt;
* Video to Thumbnail/Preview to make a still preview of a video file.&lt;br /&gt;
&lt;br /&gt;
== What next ==&lt;br /&gt;
Try out some of the examples and see where you get to. If you hit problems you can always talk to EP-Tech. {{EPrintsTech}}.&lt;br /&gt;
&lt;br /&gt;
Go take a look at [[Extension Packages]] for a bit more about how you can make your plugins richer.&lt;br /&gt;
&lt;br /&gt;
Its probably a good a idea to look at [[Tips to write plugins|some tips]]. It will help you write better plugins.&lt;br /&gt;
&lt;br /&gt;
Probably the best place you can go is your own perl_lib/EPrints/Plugin directory and have a look at some of similar cases. Or to [http://files.eprints.org http://files.eprints.org] to take a look at other peoples plugins.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve written a plugin and you&#039;re happy with it the EPrints Team encourages you to share it with the EPrints community at [http://files.eprints.org http://files.eprints.org]. If nothing else its a good place to store your code for future use. You might even get some valuable feed back.&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10664</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10664"/>
		<updated>2012-11-15T15:57:09Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Search by Email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Simple Search==&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
==Advanced Search==&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
=Search by Email=&lt;br /&gt;
Searching by email can be the best way to get publications by an individual. To add this functionality to the advanced search simply add this line:&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
&#039;&#039;creators_id&#039;&#039; is the database column name that contains the email address.&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10663</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10663"/>
		<updated>2012-11-15T15:55:57Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Advanced Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Simple Search==&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
==Advanced Search==&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
=Search by Email=&lt;br /&gt;
Searching by email can be the best way to get publications by an individual. To add this functionality to the advanced search simply add this line:&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10662</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10662"/>
		<updated>2012-11-15T15:54:08Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Advanced Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Simple Search==&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
==Advanced Search==&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10661</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10661"/>
		<updated>2012-11-15T15:54:00Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Simple Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Simple Search==&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
=Advanced Search=&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10660</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10660"/>
		<updated>2012-11-15T15:53:40Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Advanced Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Simple Search=&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
=Advanced Search=&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_id&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10659</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10659"/>
		<updated>2012-11-15T15:50:41Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Advanced Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Simple Search=&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
=Advanced Search=&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{advanced} ={&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 { meta_fields =&amp;gt; [ $EPrints::Utils::FULLTEXT ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;title&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;creators_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;abstract&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;keywords&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;subjects&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;divisions&amp;quot; ] },&lt;br /&gt;
 &lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;department&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;editors_name&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;ispublished&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;refereed&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;publication&amp;quot; ] },&lt;br /&gt;
                 { meta_fields =&amp;gt; [ &amp;quot;date&amp;quot; ] }&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/advsearch:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/advsearch:adv_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10658</id>
		<title>Search.pl</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Search.pl&amp;diff=10658"/>
		<updated>2012-11-15T15:49:38Z</updated>

		<summary type="html">&lt;p&gt;Dkane: Created page with &amp;#039;=Simple Search=    $c-&amp;gt;{search}-&amp;gt;{simple} = {          search_fields =&amp;gt; [                  {                          id =&amp;gt; &amp;quot;q&amp;quot;,                          meta_fields =&amp;gt; [        …&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Simple Search=&lt;br /&gt;
 &lt;br /&gt;
 $c-&amp;gt;{search}-&amp;gt;{simple} = {&lt;br /&gt;
         search_fields =&amp;gt; [&lt;br /&gt;
                 {&lt;br /&gt;
                         id =&amp;gt; &amp;quot;q&amp;quot;,&lt;br /&gt;
                         meta_fields =&amp;gt; [&lt;br /&gt;
                                 $EPrints::Utils::FULLTEXT,&lt;br /&gt;
                                 &amp;quot;title&amp;quot;,&lt;br /&gt;
                                 &amp;quot;abstract&amp;quot;,&lt;br /&gt;
                                 &amp;quot;creators_name&amp;quot;,&lt;br /&gt;
                                 &amp;quot;date&amp;quot;&lt;br /&gt;
                         ]&lt;br /&gt;
                 },&lt;br /&gt;
         ],&lt;br /&gt;
         preamble_phrase =&amp;gt; &amp;quot;cgi/search:preamble&amp;quot;,&lt;br /&gt;
         title_phrase =&amp;gt; &amp;quot;cgi/search:simple_search&amp;quot;,&lt;br /&gt;
         citation =&amp;gt; &amp;quot;result&amp;quot;,&lt;br /&gt;
         page_size =&amp;gt; 20,&lt;br /&gt;
         order_methods =&amp;gt; {&lt;br /&gt;
                 &amp;quot;byyear&amp;quot;         =&amp;gt; &amp;quot;-date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byyearoldest&amp;quot;   =&amp;gt; &amp;quot;date/creators_name/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;byname&amp;quot;         =&amp;gt; &amp;quot;creators_name/-date/title&amp;quot;,&lt;br /&gt;
                 &amp;quot;bytitle&amp;quot;        =&amp;gt; &amp;quot;title/creators_name/-date&amp;quot;&lt;br /&gt;
         },&lt;br /&gt;
         default_order =&amp;gt; &amp;quot;byyear&amp;quot;,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
=Advanced Search=&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10097</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10097"/>
		<updated>2011-11-15T13:43:59Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Eprints 3.3x Changes to Plugin Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==creation fo a new directory for theses==&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;br /&gt;
==Eprints 3.3x Changes to Plugin Module==&lt;br /&gt;
The plugins module has changed things a little bit.  So you have to now make an addition into the module itself.  &lt;br /&gt;
&lt;br /&gt;
in &#039;&#039;&#039;[eprints_root]/perl_lib/EPrints/Plugin/Search/Internal.pm&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/*)];&lt;br /&gt;
to&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/* thesis/* advthesis/* )];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You already should have simple, advanced, thesis, and advthesis (or whatever you call them) in &#039;&#039;&#039;[archive_root]/cfg/cfg.d/search.pl&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10096</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10096"/>
		<updated>2011-11-15T13:43:17Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Eprints 3.3x Changes to Plugin Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==creation fo a new directory for theses==&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;br /&gt;
==Eprints 3.3x Changes to Plugin Module==&lt;br /&gt;
The plugins module has changed things a little bit.  So you have to now make an addition into the module itself.  &lt;br /&gt;
&lt;br /&gt;
in &#039;&#039;&#039;[eprints_root]/perl_lib/EPrints/Plugin/Search/Internal.pm&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/*)];&lt;br /&gt;
to&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/* thesis/* advthesis/* )];&lt;br /&gt;
&lt;br /&gt;
You already should have simple, advanced, thesis, and advthesis (or whatever you call them) in &#039;&#039;&#039;[archive_root]/cfg/cfg.d/search.pl (simple, advanced, thesis, advthesis)&lt;br /&gt;
&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10095</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10095"/>
		<updated>2011-11-15T13:43:00Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Eprints 3.3x Changes to Plugin Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==creation fo a new directory for theses==&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;br /&gt;
==Eprints 3.3x Changes to Plugin Module==&lt;br /&gt;
The plugins module has changed things a little bit.  So you have to now make an addition into the module itself.  &lt;br /&gt;
&lt;br /&gt;
in &#039;&#039;&#039;[eprints_root]/perl_lib/EPrints/Plugin/Search/Internal.pm&#039;&#039;&#039; &lt;br /&gt;
change&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/*)];&lt;br /&gt;
to&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/* thesis/* advthesis/* )];&lt;br /&gt;
&lt;br /&gt;
You already should have simple, advanced, thesis, and advthesis (or whatever you call them) in &#039;&#039;&#039;[archive_root]/cfg/cfg.d/search.pl (simple, advanced, thesis, advthesis)&lt;br /&gt;
&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10094</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=10094"/>
		<updated>2011-11-15T13:42:24Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* creation fo a new directory for theses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==creation fo a new directory for theses==&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;br /&gt;
==Eprints 3.3x Changes to Plugin Module==&lt;br /&gt;
The plugins module has changed things a little bit.  So you have to now make an addition into the module itself.  &lt;br /&gt;
&lt;br /&gt;
in [eprints_root]/perl_lib/EPrints/Plugin/Search/Internal.pm &lt;br /&gt;
change&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/*)];&lt;br /&gt;
to&lt;br /&gt;
 $self-&amp;gt;{search} = [qw( simple/* advanced/* thesis/* advthesis/* )];&lt;br /&gt;
&lt;br /&gt;
You already should have simple, advanced, thesis, and advthesis (or whatever you call them) in [archive_root]/cfg/cfg.d/search.pl (simple, advanced, thesis, advthesis)&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Category:API&amp;diff=10093</id>
		<title>Category:API</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Category:API&amp;diff=10093"/>
		<updated>2011-11-05T12:08:19Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Principal Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
EPrints is written in the [http://www.perl.org/ Perl language]. Sometimes you may need to write your own Perl code using the EPrints Application Programming Interface (API).&lt;br /&gt;
&lt;br /&gt;
Reasons you may need to write your own EPrints code:&lt;br /&gt;
&lt;br /&gt;
* customising the way the eprints summary pages are rendered&lt;br /&gt;
* writing your own command-line script to control EPrints in some way&lt;br /&gt;
* writing a new CGI script (dynamic web page)&lt;br /&gt;
* writing a plugin&lt;br /&gt;
&lt;br /&gt;
== Key Sections ==&lt;br /&gt;
* [[Core API]] provides a basic introduction to using the EPrints API. &lt;br /&gt;
* [[StyleGuide]] gives guidance on how to code in a compatible style.&lt;br /&gt;
* [[Modules]] discusses the framework for Plugins you write for the community.&lt;br /&gt;
&lt;br /&gt;
==Principal Modules==&lt;br /&gt;
&lt;br /&gt;
This is a list of the principal modules in the EPrints API. These modules are the primary means of connecting to and manipulating objects in the repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[API:EPrints/Repository|EPrints::Repository]]===&lt;br /&gt;
&lt;br /&gt;
An Repository is a eprints archive with it&#039;s own website configuration and data. One install of the eprints software can run serveral seperate repositories. Sharing code but with totally different configurations. Before EPrints 2.4 this was known as EPrints::Archive. This was changed to avoid confusion with the eprint status of &amp;quot;archive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===[[API:EPrints/Database|EPrints::Database]]===&lt;br /&gt;
&lt;br /&gt;
The connection to the MySQL (or other database) back end. &#039;&#039;datasets&#039;&#039; are stored in the MySQL system, but you do not have to address it directly.&lt;br /&gt;
&lt;br /&gt;
===[[API:EPrints/DataSet|EPrints::DataSet]]===&lt;br /&gt;
&lt;br /&gt;
A dataset is a collection of &#039;&#039;items&#039;&#039; of the same type. It can be searched.&lt;br /&gt;
&lt;br /&gt;
Some datasets all have the same &amp;quot;config id&amp;quot;. The &amp;quot;config id&amp;quot; is used to get information about the dataset from the archive config - inbox, buffer, archive and deletion all have the same metadata fields and types.&lt;br /&gt;
&lt;br /&gt;
Core datasets are:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| DATASET ID &lt;br /&gt;
| COMMENT&lt;br /&gt;
|-&lt;br /&gt;
| eprint&lt;br /&gt;
| EPrint records are the core of the system.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Users registered with the system.&lt;br /&gt;
|-&lt;br /&gt;
| subject&lt;br /&gt;
| The subject tree.&lt;br /&gt;
|-               &lt;br /&gt;
| document&lt;br /&gt;
| Documents belonging to EPrints. Every document is part of an EPrint record.&lt;br /&gt;
|-&lt;br /&gt;
| subscription&lt;br /&gt;
| Subscriptions made by users. Every subscription is a part of a Subscription record.&lt;br /&gt;
|-&lt;br /&gt;
| history&lt;br /&gt;
| Stores actions performed on records.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In addtion to these datasets are four virtual datasets: inbox, buffer, archive and deletion. These act just like &amp;quot;eprint&amp;quot; except that they are filtered to only contain records with those status.&lt;br /&gt;
  &lt;br /&gt;
Note that prior to 2.4 the &amp;quot;eprint&amp;quot; dataset was virtual, rather than &amp;quot;inbox&amp;quot;, &amp;quot;buffer&amp;quot; etc. The History dataset was introduced in 2.4.&lt;br /&gt;
&lt;br /&gt;
===[[API:EPrints/MetaField|EPrints::MetaField]]===&lt;br /&gt;
&lt;br /&gt;
A single field in a dataset. Each dataset has a few &amp;quot;system&amp;quot; fields which eprints uses to manage the system and then any number of &#039;&#039;archive&#039;&#039; specific fields which you may configure.&lt;br /&gt;
&lt;br /&gt;
===[[API:EPrints/DataObj|EPrints::DataObj]]===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;super class&amp;quot; of &#039;&#039;subjects&#039;&#039;, &#039;&#039;users&#039;&#039;, &#039;&#039;eprints&#039;&#039; and &#039;&#039;documents&#039;&#039; etc. In the very core of the system these are all treated identically and much of the configuration and methods of these classes of &amp;quot;thing&amp;quot; are identical. We use the term &#039;&#039;item&#039;&#039; to speak about the general case.&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;type&#039;&#039;&#039; or &#039;&#039;&#039;user-type&#039;&#039;&#039; or &#039;&#039;&#039;eprint-type&#039;&#039;&#039; : &#039;&#039;users&#039;&#039;, &#039;&#039;eprints&#039;&#039; and &#039;&#039;documents&#039;&#039; all have a &amp;quot;type&amp;quot;. This controls how they are &amp;quot;cited&amp;quot; and also for &#039;&#039;users&#039;&#039; and &#039;&#039;eprints&#039;&#039; it controls what &#039;&#039;fields&#039;&#039; may be edited, and which are required.&lt;br /&gt;
&lt;br /&gt;
====[[API:EPrints/DataObj/Document|EPrints::DataObj::Document]]====&lt;br /&gt;
&lt;br /&gt;
A document is a single format of an &#039;&#039;eprint&#039;&#039;, eg. HTML, PDF, PS etc. It can contain more than one file, for example HTML may contain more than one html page + image files. The actual files are stored in the filesystem. Pre 2.4 this was known as EPrints::Document.&lt;br /&gt;
&lt;br /&gt;
====[[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]====&lt;br /&gt;
&lt;br /&gt;
An eprint is a record in the system which has one or more &#039;&#039;documents&#039;&#039; and some &#039;&#039;metadata&#039;&#039;. Usually, more than one &#039;&#039;document&#039;&#039; is to provide the same information in multiple formats, although this is not compulsory. Pre 2.4 this was known as EPrints::EPrint.&lt;br /&gt;
&lt;br /&gt;
====[[API:EPrints/DataObj/SavedSearch|EPrints::DataObj::SavedSearch]]====&lt;br /&gt;
&lt;br /&gt;
Some software refers to this concept as &amp;quot;alerts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A stored search which is performed every day/week/month and any new results are the mailed to the user who owns the subscription.&lt;br /&gt;
&lt;br /&gt;
This diagram does not show &amp;quot;Subscription&amp;quot;. Subscription is a subclass of DataObj (like EPrint, User etc.). A Subscription is associated with one User. A User is associated with 0..n Subscription&#039;s.&lt;br /&gt;
&lt;br /&gt;
====[[API:EPrints/DataObj/Subject|EPrints::DataObj::Subject]]====&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;subject&#039;&#039; has an id and a list of who it&#039;s parents are. There is a build in &#039;&#039;subject&#039;&#039; with the id &amp;quot;ROOT&amp;quot; to act as the top level. A subject can have more than one parent to allow you to create a rich lattice, rather than just a tree, but loops are not allowed.&lt;br /&gt;
&lt;br /&gt;
====[[API:EPrints/DataObj/User|EPrints::DataObj::User]]====&lt;br /&gt;
&lt;br /&gt;
A user registered with the system. (NOT necesarily the author of the &#039;&#039;eprints&#039;&#039; they deposit). Pre 2.4 this was known as EPrints::User&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=HTTPS2&amp;diff=10079</id>
		<title>HTTPS2</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=HTTPS2&amp;diff=10079"/>
		<updated>2011-10-20T19:34:52Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* Create Template for Secure Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Authentication]]&lt;br /&gt;
==Add HTTPS Settings==&lt;br /&gt;
&lt;br /&gt;
For each &amp;lt;tt&amp;gt;ARCHIVEID.xml&amp;lt;/tt&amp;gt; file, fill in the &amp;lt;tt&amp;gt;securehost&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;securepath&amp;lt;/tt&amp;gt; entries.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;archive id=&amp;quot;demo&amp;quot;&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    &amp;lt;securehost&amp;gt;secure.mydomain.com&amp;lt;/securehost&amp;gt;&lt;br /&gt;
    &amp;lt;securepath&amp;gt;/demo&amp;lt;/securepath&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
 &amp;lt;/archive&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;securehost&amp;lt;/tt&amp;gt; is vhosted on the same server as your EPrints archive(s).&lt;br /&gt;
&lt;br /&gt;
Secure requests will be of the form &amp;lt;tt&amp;gt;https://securehost/securepath&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;securepath&amp;lt;/tt&amp;gt; therefore differentiates requests from individual archives.&lt;br /&gt;
&lt;br /&gt;
==Generate Secure Config==&lt;br /&gt;
&lt;br /&gt;
 $ bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
As well as the usual apache configuration files, and depending on the version of EPrints, this will generate:&lt;br /&gt;
&lt;br /&gt;
* an &amp;lt;tt&amp;gt;auto-secure.conf&amp;lt;/tt&amp;gt; file in each archive&#039;s &amp;lt;tt&amp;gt;cfg&amp;lt;/tt&amp;gt; directory (2.3.13)&lt;br /&gt;
* an &amp;lt;tt&amp;gt;auto-your.secure.host.conf&amp;lt;/tt&amp;gt; file (for each secure host) in the main &amp;lt;tt&amp;gt;cfg&amp;lt;/tt&amp;gt; directory (2.3.11)&lt;br /&gt;
&lt;br /&gt;
==Set up Secure Host==&lt;br /&gt;
&lt;br /&gt;
Under Fedora Core 4, run:&lt;br /&gt;
&lt;br /&gt;
 $ yum install mod_ssl&lt;br /&gt;
&lt;br /&gt;
This sets up a test SSL server.&lt;br /&gt;
&lt;br /&gt;
===Certificates===&lt;br /&gt;
&lt;br /&gt;
For a production system, you would need to provide the relevant certificates and tweak the mod_ssl config accordingly - see: &lt;br /&gt;
&lt;br /&gt;
* [http://httpd.apache.org/docs/2.2/mod/mod_ssl.html Apache Module mod_ssl]&lt;br /&gt;
* [http://www.modssl.org/docs/2.8/ssl_faq.html mod_ssl FAQ]&lt;br /&gt;
&lt;br /&gt;
Create a &amp;lt;tt&amp;gt;server.key&amp;lt;/tt&amp;gt; on the EPrints server (remembering the passphrase you enter):&lt;br /&gt;
&lt;br /&gt;
 $ openssl genrsa -des3 -out server.key 1024&lt;br /&gt;
&lt;br /&gt;
Create a certificate request:&lt;br /&gt;
&lt;br /&gt;
 $ openssl req -new -key server.key -out server.csr&lt;br /&gt;
&lt;br /&gt;
The important thing when answering the questions is the CommonName: if ultimately the secure web address of your EPrints server is &amp;lt;tt&amp;gt;https://www.myeprints.com&amp;lt;/tt&amp;gt;, then the CommonName value to enter is exactly &amp;lt;tt&amp;gt;www.myeprints.com&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Send the &amp;lt;tt&amp;gt;server.csr&amp;lt;/tt&amp;gt; file to your Certificate Authority administrator, who should send you back a &amp;lt;tt&amp;gt;.cer&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Copy &amp;lt;tt&amp;gt;server.key&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;.cer&amp;lt;/tt&amp;gt; file to the following locations:&lt;br /&gt;
&lt;br /&gt;
 /etc/httpd/conf/ssl.key/server.key&lt;br /&gt;
 /etc/httpd/conf/ssl.crt/eprints.cer&lt;br /&gt;
&lt;br /&gt;
Modify &amp;lt;tt&amp;gt;/etc/httpd/conf.d/ssl.conf&amp;lt;/tt&amp;gt; accordingly:&lt;br /&gt;
&lt;br /&gt;
 SSLCertificateFile /etc/httpd/conf/ssl.crt/eprints.cer&lt;br /&gt;
 SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key&lt;br /&gt;
&lt;br /&gt;
===Include EPrints SSL config===&lt;br /&gt;
&lt;br /&gt;
Include each &amp;lt;tt&amp;gt;auto-secure.conf&amp;lt;/tt&amp;gt; file generated by EPrints inside the &amp;lt;tt&amp;gt;Virtualhost&amp;lt;/tt&amp;gt; directive.&lt;br /&gt;
&lt;br /&gt;
On FC4, edit &amp;lt;tt&amp;gt;/etc/httpd/conf.d/ssl.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;VirtualHost _default_:443&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    Include /opt/eprints2/archives/ARCHIVEID/cfg/auto-secure.conf # 2.3.13&lt;br /&gt;
    Include /opt/eprints2/cfg/auto-your.secure.host.conf # 2.3.11&lt;br /&gt;
    Include /opt/eprints3/archives/soton/var/auto-secure.conf # 3.0.0&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have set up SSL certificates, you will be asked to enter your passphrase when you restart apache. To override this, see [http://www.modssl.org/docs/2.8/ssl_faq.html#remove-passphrase How can I get rid of the pass-phrase dialog at Apache startup time?].&lt;br /&gt;
&lt;br /&gt;
==Create Template for Secure Pages==&lt;br /&gt;
&lt;br /&gt;
Make a copy of the default template in &amp;lt;tt&amp;gt;archives/ARCHIVEID/cfg/lang/en/templates/&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cp default.xml secure.xml&lt;br /&gt;
&lt;br /&gt;
In a multi-language archive, you would need to do this for each language-specific template (en = ENglish).&lt;br /&gt;
&lt;br /&gt;
It&#039;s a good idea to have a visual differentiation between secure and non-secure pages, e.g. edit &amp;lt;tt&amp;gt;secure.xml&amp;lt;/tt&amp;gt; and add &amp;quot;(SECURE)&amp;quot; to the title of the page.&lt;br /&gt;
&lt;br /&gt;
Some browsers will complain if images/CSS etc. embedded in a secure page are served by the non-secure host. To solve this modify the &amp;lt;tt&amp;gt;secure_urlpath&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;secure_url&amp;lt;/tt&amp;gt; entries in &amp;lt;tt&amp;gt;archives/ARCHIVEID/cfg/cfg.d/20_baseurls.pl&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $c-&amp;gt;{secure_urlpath} = &amp;quot;&amp;quot;;&lt;br /&gt;
 $c-&amp;gt;{secure_url} = &amp;quot;https://&amp;quot;.$c-&amp;gt;{securehost}.$c-&amp;gt;{securepath};&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;secure.xml&amp;lt;/tt&amp;gt; template replace image/CSS &amp;lt;tt&amp;gt;base_url&amp;lt;/tt&amp;gt;s with &amp;lt;tt&amp;gt;secure_url&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
BUG FIX: In bin/generate_static replace &amp;lt;tt&amp;gt;import url($base_url$1);&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;import url($1);&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
At the top of the page, replace the reference to &#039;&#039;&#039;/javascript/auto.js&#039;&#039;&#039; with &#039;&#039;&#039;/javascript/secure_auto.js&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
At the top of auto.js, there are the following 3 lines:&lt;br /&gt;
 var eprints_http_root = &amp;quot;http:\/\/myrepository.ac.uk&amp;quot;;&lt;br /&gt;
 var eprints_http_cgiroot = &amp;quot;http:\/\/myrepository.ac.uk\/cgi&amp;quot;;&lt;br /&gt;
 var eprints_oai_archive_id = &amp;quot;myrepository.ac.uk&amp;quot;;&lt;br /&gt;
... in secure_auto.js, these must start with &#039;https&#039; rather than just &#039;http&#039;.&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9473</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9473"/>
		<updated>2010-07-28T13:56:27Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;//set some variables here:&amp;lt;/span&amp;gt;&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# Time to live - one hour only.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#filename of cache - generated from unique id in T4 content management system.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;; # could be &#039;yes&#039; or &#039;no&#039;&lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# David Kane, Waterford Institute of Technology&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9472</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9472"/>
		<updated>2010-07-28T13:52:41Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;//set some variables here:&amp;lt;/span&amp;gt;&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# Time to live - one hour only.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#filename of cache - generated from unique id in T4 content management system.&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#David Kane, Waterford Institute of Technology Library&amp;lt;/span&amp;gt;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;; # could be &#039;yes&#039; or &#039;no&#039;&lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9471</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9471"/>
		<updated>2010-07-28T13:46:25Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* How to share EPrints with other web applications on the same server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==How to share EPrints with other web applications on the same server==&lt;br /&gt;
&lt;br /&gt;
In most cases, an EPrints installation will take over an entire virtual host but it is possible to use the same web server for EPrints and other web applications together under the same host or domain.  &lt;br /&gt;
&lt;br /&gt;
There are 3 ways of doing this: &lt;br /&gt;
 &lt;br /&gt;
  1. &#039;&#039;Set up &#039;&#039;&#039;eprints in a subdirectory&#039;&#039;&#039; of the EPrints server, leaving the root directory free for other things.&#039;&#039;  &lt;br /&gt;
     (This is straightforward and can be done through bin/epadmin mod_core [repoid], or during initial setup)&lt;br /&gt;
 &lt;br /&gt;
  2. &#039;&#039;Set up eprints in the root directory and &#039;&#039;&#039;make a subdirectory that is not controlled by EPrints&#039;&#039;&#039; &lt;br /&gt;
     (See: [[How to add a subdirectory that runs PHP scripts]] )&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  3. &#039;&#039;Set up &#039;&#039;&#039;eprints in a separate server and use Apache&#039;s ProxyPass&#039;&#039;&#039; directives to make it appear in your chosen server.&#039;&#039;&lt;br /&gt;
     (This Page!)&lt;br /&gt;
&lt;br /&gt;
This page takes you through the &#039;&#039;&#039;last&#039;&#039;&#039; of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you have a &#039;border&#039; server, perhaps administered by a security-conscious IT Services department.  They do &#039;&#039;&#039;not&#039;&#039;&#039; want you to install Mod_Perl on this machine so you have to consider a way around this.  &lt;br /&gt;
&lt;br /&gt;
What follows is a detailed explanation of how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9470</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9470"/>
		<updated>2010-07-28T13:45:35Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* How to share EPrints with other web applications on the same server) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==How to share EPrints with other web applications on the same server==&lt;br /&gt;
&lt;br /&gt;
In most cases, an EPrints installation will take over an entire virtual host but it is possible to use the same web server for EPrints and other web applications together.  &lt;br /&gt;
&lt;br /&gt;
There are 3 ways of getting EPrints to cohabit with other content/applications. &lt;br /&gt;
 &lt;br /&gt;
  1. &#039;&#039;Set up &#039;&#039;&#039;eprints in a subdirectory&#039;&#039;&#039; of the EPrints server, leaving the root directory free for other things.&#039;&#039;  &lt;br /&gt;
     (This is straightforward and can be done through bin/epadmin mod_core [repoid], or during initial setup)&lt;br /&gt;
 &lt;br /&gt;
  2. &#039;&#039;Set up eprints in the root directory and &#039;&#039;&#039;make a subdirectory that is not controlled by EPrints&#039;&#039;&#039; &lt;br /&gt;
     (See: [[How to add a subdirectory that runs PHP scripts]] )&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  3. &#039;&#039;Set up &#039;&#039;&#039;eprints in a separate server and use Apache&#039;s ProxyPass&#039;&#039;&#039; directives to make it appear in your chosen server.&#039;&#039;&lt;br /&gt;
     (This Page!)&lt;br /&gt;
&lt;br /&gt;
This page takes you through the &#039;&#039;&#039;last&#039;&#039;&#039; of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you have a &#039;border&#039; server, perhaps administered by a security-conscious IT Services department.  They do &#039;&#039;&#039;not&#039;&#039;&#039; want you to install Mod_Perl on this machine so you have to consider a way around this.  &lt;br /&gt;
&lt;br /&gt;
What follows is a detailed explanation of how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9469</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9469"/>
		<updated>2010-07-28T13:33:30Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==How to share EPrints with other web applications on the same server)==&lt;br /&gt;
&lt;br /&gt;
Perhaps you have ever wondered if it&#039;s possible to use the same web server for EPrints and other web applications.&lt;br /&gt;
&lt;br /&gt;
There are 3 ways of getting EPrints to cohabit with other content/applications. &lt;br /&gt;
 &lt;br /&gt;
  1. &#039;&#039;Set up eprints in a subdirectory of the EPrints server, leaving the root directory free for other things.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  2. &#039;&#039;Set up eprints in the root directory and make a subdirectory that is not controlled by EPrints (See: [[How to add a subdirectory that runs PHP scripts]] )&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  3. &#039;&#039;Set up eprints in a separate server and use Apache&#039;s ProxyPass directives to make it appear in your chosen server.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page takes you through the last of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you have a &#039;border&#039; server, perhaps administered by a security-conscious IT Services department.  They do &#039;&#039;&#039;not&#039;&#039;&#039; want you to install Mod_Perl on this machine so you have to consider a way around this.  &lt;br /&gt;
&lt;br /&gt;
What follows is a detailed explanation of how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9454</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9454"/>
		<updated>2010-07-26T20:04:52Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server)==&lt;br /&gt;
&lt;br /&gt;
Perhaps you have ever wondered if it&#039;s possible to use the same web server for EPrints and other web applications.&lt;br /&gt;
&lt;br /&gt;
There are 3 ways of getting EPrints to cohabit with other content/applications. &lt;br /&gt;
 &lt;br /&gt;
  1. &#039;&#039;Set up eprints in a subdirectory of the EPrints server, leaving the root directory free for other things.&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  2. &#039;&#039;Set up eprints in the root directory and make a subdirectory that is not controlled by EPrints (See: [[How to add a subdirectory that runs PHP scripts]] )&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
  3. &#039;&#039;Set up eprints in a separate server and use Apache&#039;s ProxyPass directives to make it appear in your chosen server.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page takes you through the last of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you have a &#039;border&#039; server, perhaps administered by a security-conscious IT Services department.  They do &#039;&#039;&#039;not&#039;&#039;&#039; want you to install Mod_Perl on this machine so you have to consider a way around this.  &lt;br /&gt;
&lt;br /&gt;
What follows is a detailed explanation of how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9453</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9453"/>
		<updated>2010-07-26T20:00:37Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server)==&lt;br /&gt;
&lt;br /&gt;
Perhaps you have ever wondered if it&#039;s possible to use the same web server for EPrints and other web applications.&lt;br /&gt;
&lt;br /&gt;
There are 3 ways of getting EPrints to cohabit with other content/applications. &lt;br /&gt;
*Set up eprints in a subdirectory of the EPrints server, leaving the root directory free for other things.&lt;br /&gt;
*Set up eprints in the root directory and make a subdirectory that is not controlled by EPrints (See: How to add a subdirectory that runs PHP scripts )&lt;br /&gt;
*Set up eprints in a separate server and use Apache&#039;s ProxyPass directives to make it appear in your chosen server.&lt;br /&gt;
&lt;br /&gt;
This page takes you through the last of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you have a &#039;border&#039; server, perhaps administered by a security-conscious IT Services department.  They do &#039;&#039;&#039;not&#039;&#039;&#039; want you to install Mod_Perl on this machine so you have to consider a way around this.  &lt;br /&gt;
&lt;br /&gt;
What follows is a detailed explanation of how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9452</id>
		<title>How to set up EPrints on virtual directories other than root</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_set_up_EPrints_on_virtual_directories_other_than_root&amp;diff=9452"/>
		<updated>2010-07-26T19:55:36Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
==EPrints setup under virtual directories other than / (or how to share EPrints with other web applications on the same server)==&lt;br /&gt;
&lt;br /&gt;
Perhaps you have ever wondered if it&#039;s possible to use the same web server for EPrints and other web applications.&lt;br /&gt;
&lt;br /&gt;
There are 3 ways of getting EPrints to cohabit with other content/applications.&lt;br /&gt;
*Set up eprints in a subdirectory of the EPrints server, leaving the root directory free for other things.&lt;br /&gt;
*Set up eprints in the root directory and make a subdirectory that is not controlled by EPrints (See: How to add a subdirectory that runs PHP scripts )&lt;br /&gt;
*Set up eprints in a separate server and use Apache&#039;s ProxyPass directives to make it appear in your chosen server.&lt;br /&gt;
&lt;br /&gt;
This page takes you through the last of these three options:&lt;br /&gt;
&lt;br /&gt;
In this scenario, you are faced faced with the fact that EPrints software requires, as for Apache configuration respects, that two important virtual directories (/ and /perl) are redirected to EPrints proprietary physical directories (/opt/eprints2/archives/archiveID/html/ and /opt/eprints2/cgi respectively, as stated in &#039;&#039;/opt/eprints2/archives/archiveID/cfg/auto-apache.conf&#039;&#039;). This condition makes impossible, in a first approach, to share EPrints web server with other applications than EPrints itself.&lt;br /&gt;
&lt;br /&gt;
However, this small document explains in detail how to overcome this limitation. It closely mimics the situation at Complutense University, Madrid, Spain.&lt;br /&gt;
&lt;br /&gt;
==Starting environment==&lt;br /&gt;
&lt;br /&gt;
We have at our disposal one corporative web server (http://server.name/) with the following setup, imposed by our computing services:&lt;br /&gt;
&lt;br /&gt;
* The main Apache listens to requests on HTTP port #80 and has not built-in mod_perl support.&lt;br /&gt;
* The main campus web site is located under http://server.name/.&lt;br /&gt;
* The secondary Apache listens to requests on HTTP port #8000 and has built-in mod_perl support. This is the one to be used for EPrints. We&#039;ll use port #8084.&lt;br /&gt;
* Both Apaches run under user nobody.&lt;br /&gt;
&lt;br /&gt;
In order for our customers to be able to acces EPrints service from the main campus web site, we&#039;ll configure Apache and EPrints so the software be accessible through http://server.name/eprints/.&lt;br /&gt;
&lt;br /&gt;
EPrints version used for this tests is 2.3.11.&lt;br /&gt;
&lt;br /&gt;
==Web server configuration steps==&lt;br /&gt;
&lt;br /&gt;
To be performed in the following order.&lt;br /&gt;
&lt;br /&gt;
* Main Apache configuration (campus web site)&lt;br /&gt;
&lt;br /&gt;
As for EPrints concerns, this Apache has to redirect all requests for http://server.name/eprints to the 8084 port of the secondary Apache with mod_perl. So its file &#039;&#039;httpd.conf&#039;&#039; needs to be modified like this:&lt;br /&gt;
&lt;br /&gt;
 ProxyPass /eprints http://server.name:8084&lt;br /&gt;
 ProxyPassReverse /eprints http://server.name:8084&lt;br /&gt;
&lt;br /&gt;
These lines have to be included at the end of the file, outside the virtual hosts sections (if any). Of course, replace server.name with your server name, as fixed in your DNS, and /eprints with the name of the virtual directory you&#039;d like to be used.&lt;br /&gt;
&lt;br /&gt;
* Secondary Apache configuration (EPrints one)&lt;br /&gt;
&lt;br /&gt;
It has to manage HTTP requests redirected from the main Apache to its 8084 port, so you have to define a virtual host for HTTP port #8084, as well as a default virtual host (required if you want to use virtual hosts; see Apache documentation). The &#039;&#039;httpd.conf&#039;&#039; file must be like this:&lt;br /&gt;
&lt;br /&gt;
 ### Section 1: Global Environment&lt;br /&gt;
 ...&lt;br /&gt;
 Listen 8000&lt;br /&gt;
 Listen 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 2: &#039;Main&#039; server configuration&lt;br /&gt;
 ...&lt;br /&gt;
 Port 8000&lt;br /&gt;
 Port 8084&lt;br /&gt;
 ...&lt;br /&gt;
 ### Section 3: Virtual Hosts&lt;br /&gt;
 NameVirtualHost *:8000&lt;br /&gt;
 &amp;lt;VirtualHost _default_:8000&amp;gt;&lt;br /&gt;
    ServerName server.name:8000&lt;br /&gt;
    DirectoryIndex index.php index.html index.htm&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &amp;lt;VirtualHost *:8084&amp;gt;&lt;br /&gt;
    ServerName server.name:8084&lt;br /&gt;
    DirectoryIndex index.html&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Include /opt/eprints2/cfg/apache.conf&lt;br /&gt;
&lt;br /&gt;
Please be aware that this configuration example is very simplistic. Virtual hosts sections can have lot of directives. We&#039;ve only reflected here the minimum required. Once again, you&#039;ll have to customize server.name.&lt;br /&gt;
&lt;br /&gt;
==EPrints installation==&lt;br /&gt;
&lt;br /&gt;
The most time consuming task is to find the appropriate parameters to be used during EPrints installation and initial archive creation. After several tests, this are the keys for success, following the steps from official EPrints documentation (http://software.eprints.org/docs/php/installation.php), and modified when needed. The whole process is run under user nobody (the owner of Apache).&lt;br /&gt;
&lt;br /&gt;
* Unpack the eprints tar.gz file:&lt;br /&gt;
&lt;br /&gt;
 % gunzip eprints-2.something.tar.gz&lt;br /&gt;
 % tar xf eprints-2.something.tar&lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;configure&amp;quot; script:&lt;br /&gt;
&lt;br /&gt;
 % cd eprints-2.something&lt;br /&gt;
 % ./configure --with-user=nobody --with-group=nobody --with-apache=1&lt;br /&gt;
&lt;br /&gt;
It is very important that you do not specify the parameter --with-virtualhost. EPrints doesn&#039;t need it, and so you won&#039;t have to take care of certain additional configuration files. The parameter --with-apache=1 is employed here because our Apache releases are 1.x.&lt;br /&gt;
&lt;br /&gt;
* Run install.pl:&lt;br /&gt;
&lt;br /&gt;
 % ./install.pl&lt;br /&gt;
&lt;br /&gt;
==EPrints configuration==&lt;br /&gt;
&lt;br /&gt;
* Creating the archive&lt;br /&gt;
&lt;br /&gt;
From EPrints directory (/opt/eprints2 by default) run &#039;&#039;bin/configure_archive&#039;&#039;. The answers to the questions asked by this script are:&lt;br /&gt;
&lt;br /&gt;
 Archive ID? archiveID&lt;br /&gt;
 Hostname? server.name&lt;br /&gt;
 Webserver Port [80]? 8084&lt;br /&gt;
 Alias (enter # when done) [#] ? #&lt;br /&gt;
 Administrator Email? ******&lt;br /&gt;
 Archive Name? ******&lt;br /&gt;
 Database Name [bucm] ? eprints.database&lt;br /&gt;
 MySQL Host [localhost] ? mysql.server.name&lt;br /&gt;
 MySQL Port (# for no setting) [#] ? #&lt;br /&gt;
 MySQL Socket (# for no setting) [#] ? #&lt;br /&gt;
 Database User [bucm] ? ******&lt;br /&gt;
 Database Password ? ******&lt;br /&gt;
 Create database ?eprints.database? [yes] ? yes&lt;br /&gt;
 MySQL Root Password ? *******&lt;br /&gt;
 Create config files [no] ? yes&lt;br /&gt;
 Hit return to continue [] ? &lt;br /&gt;
&lt;br /&gt;
You have to use your own values for the fileds replaced by ****** and for archiveID, server.name, eprints.database, mysql.server.name.&lt;br /&gt;
&lt;br /&gt;
* Configuration files modifications&lt;br /&gt;
&lt;br /&gt;
We have to change certain EPrints configuration files so all the software processes to be run in the future correctly implement the base URL we want to deploy (http://server.name/eprints). The changes required are commenting code lines and including new ones, as you can see below:&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/archives/archiveID/cfg/ArchiveConfig.pm, section &amp;quot;Server of static HTML + images, including port&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Server of static HTML + images, including port&lt;br /&gt;
 # $c-&amp;gt;{base_url} = &amp;quot;http://$c-&amp;gt;{host}&amp;quot;;&lt;br /&gt;
 # if( $c-&amp;gt;{port} != 80 )-]&lt;br /&gt;
 # {&lt;br /&gt;
 #     # Not SSL port 443 friendly&lt;br /&gt;
 #     $c-&amp;gt;{base_url}.= &amp;quot;:&amp;quot;.$c-&amp;gt;{port};&lt;br /&gt;
 # }&lt;br /&gt;
 # $c-&amp;gt;{base_url} .= $c-&amp;gt;{urlpath};&lt;br /&gt;
 $c-&amp;gt;{base_url} = &amp;quot;http://server.name/eprints&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/perl_lib/EPrints/Session.pm, subroutine get_uri&lt;br /&gt;
&lt;br /&gt;
 # sub get_uri&lt;br /&gt;
 # {&lt;br /&gt;
 #     my( $self ) = @_;&lt;br /&gt;
 #     return( $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri );&lt;br /&gt;
 # }&lt;br /&gt;
 sub get_uri  {&lt;br /&gt;
    my( $self ) = @_;&lt;br /&gt;
    my $uri= $self-&amp;gt;{&amp;quot;request&amp;quot;}-&amp;gt;uri;&lt;br /&gt;
    if( $uri =~ m+^/+ &amp;amp;&amp;amp; $uri !~ m+/eprints+i ){&lt;br /&gt;
        $uri = &amp;quot;/eprints&amp;quot; . $uri;&lt;br /&gt;
    }&lt;br /&gt;
    return $uri;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
/opt/eprints2/cgi/users/home, section &amp;quot;Render page&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # my $changeuserpath = &amp;quot;/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
 my $changeuserpath = &amp;quot;/eprints/change_user/&amp;quot;.($user-&amp;gt;get_value( &amp;quot;username&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE&#039;&#039;: Though EPrints will be used under http://server.name/eprints instead of http://server.name, there is no need for modifying urlpath parameter inside &#039;&#039;/opt/eprints2/archives/archiveID.xml&#039;&#039; file (the corresponding line must remain as &amp;lt;tt&amp;gt;&amp;lt;urlpath&amp;gt;&amp;lt;/urlpath&amp;gt;&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* The remaining steps are those we all now, without changes from official EPrints documentation. From EPrints directory (/opt/eprints2 by default), run:&lt;br /&gt;
&lt;br /&gt;
 % bin/create_tables archiveID&lt;br /&gt;
 % bin/import_subjects archiveID&lt;br /&gt;
 % bin/generate_static archiveID&lt;br /&gt;
 % bin/create_user archiveID USERID EMAIL admin PASSWORD&lt;br /&gt;
 % bin/generate_views archiveID&lt;br /&gt;
 % bin/generate_apacheconf&lt;br /&gt;
&lt;br /&gt;
And do not forget to add the usual periodical tasks to the crontab of the user under which EPrints runs (nobody in our example): &#039;&#039;generate_views&#039;&#039;, &#039;&#039;generate_abstracts&#039;&#039;, &#039;&#039;send_subscriptions&#039;&#039; (daily, weekly and monthly), &#039;&#039;indexer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Web server restart==&lt;br /&gt;
&lt;br /&gt;
Of course, once all changes are done, you have to restart the affected Apache servers (main Apache and secondary Apache), stopping and starting their daemons (do not use the &#039;&#039;apachectl&#039;&#039; restart command).&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9153</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9153"/>
		<updated>2010-04-16T12:37:08Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;//set some variables here:&amp;lt;/span&amp;gt;&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# Time to live - one hour only.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#filename of cache - generated from unique id in T4 content management system.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;; # could be &#039;yes&#039; or &#039;no&#039;&lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9152</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9152"/>
		<updated>2010-04-16T12:34:44Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;//set some variables here:&amp;lt;/span&amp;gt;&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# Time to live - one hour only.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#filename of cache - generated from unique id in T4 content management system.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $with_summaries = &#039;yes&#039;; or $with_summaries = &#039;no&#039;;&amp;amp;gt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9151</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9151"/>
		<updated>2010-04-16T12:34:11Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;//set some variables here:&amp;lt;/span&amp;gt;&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# Time to live - one hour only.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;#filename of cache - generated from unique id in T4 content management system.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&amp;lt;/span&amp;gt;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: green; font-weight: bold&amp;quot;&amp;gt;# $with_summaries = &#039;yes&#039;; or $with_summaries = &#039;no&#039;;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9150</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9150"/>
		<updated>2010-04-16T12:17:28Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 # All items in Terminal4&#039;s cms have an anchor - we like break it apart to get the Unique id, to name the cache file.&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 # Time to live - one hour only.&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 #filename of cache - generated from unique id in T4 content management system.&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 # $max_items = 30; // this is set in EPrints as well, will not exceed Eprints&#039; own internal limit.&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 # $with_summaries = &#039;yes&#039;; or $with_summaries = &#039;no&#039;;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9149</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9149"/>
		<updated>2010-04-16T12:11:43Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
If you want to turn any search into a dynamically generated list of references with a link back to the EPrints page, then use this.  This solution uses PHP.  So, you will need PHP enabled on the server.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dependency:&#039;&#039;&#039; This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Original Context:&#039;&#039;&#039; It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be used with almost no modification.&lt;br /&gt;
&lt;br /&gt;
The code implements local caching of the generated HTML in a text file which is never more than an hour old, unless there is a problem with the server whereupon the last good cached version is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9148</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9148"/>
		<updated>2010-04-16T12:02:29Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&lt;br /&gt;
This code depends on [http://magpierss.sourceforge.net/ MagpieRSS].  It was developed for use in a [http://www.terminalfour.com/ Terminal4 &#039;SiteManager&#039;] template, but can be easily modified for other uses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/[path to]/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9147</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9147"/>
		<updated>2010-04-16T11:59:39Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;amp;lt;/a&amp;gt;&amp;amp;lt;/span&amp;gt;\n\t\t&amp;amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;amp;lt;br/&amp;gt;\n\t\t&amp;amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9146</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9146"/>
		<updated>2010-04-16T11:58:30Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&amp;quot;/^\.?/&amp;quot;);&lt;br /&gt;
 		$replace = array(&amp;quot; &amp;quot;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9145</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9145"/>
		<updated>2010-04-16T11:45:08Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
 	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
 	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 	fwrite($fh, $news_feed);&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
 	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
 	$size = filesize($f);&lt;br /&gt;
 	$data = fread($fh, $size);&lt;br /&gt;
 	print $data;&lt;br /&gt;
 	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
 	if($rss = fetch_rss($feed)){&lt;br /&gt;
 		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
 		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
 		$replace = array(&#039;&#039;);&lt;br /&gt;
 		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 			foreach ($items as $item ){&lt;br /&gt;
 				if($count &amp;lt; $max_items){&lt;br /&gt;
 					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
 					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
 						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
 						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					}&lt;br /&gt;
 					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
 					$count += 1;&lt;br /&gt;
 				}&lt;br /&gt;
 			}&lt;br /&gt;
 		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
 		echo $news_feed;&lt;br /&gt;
 		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
 		fwrite($fh, $news_feed);&lt;br /&gt;
 		fclose($fh);&lt;br /&gt;
 	}else{&lt;br /&gt;
 		getFromCache($filename);&lt;br /&gt;
 	}&lt;br /&gt;
 }else{&lt;br /&gt;
 	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9144</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9144"/>
		<updated>2010-04-16T11:44:14Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
 //set some variables here:&lt;br /&gt;
 $anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
 $TTL = 3600;&lt;br /&gt;
 $feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
 $uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
 $filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
 $max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
 $with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $age = 0;&lt;br /&gt;
 if(file_exists($filename)){&lt;br /&gt;
	$age = time() - filemtime($filename); &lt;br /&gt;
 }else{&lt;br /&gt;
	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
	fwrite($fh, $news_feed);&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
	$age = $TTL;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 function getFromCache($f){	&lt;br /&gt;
	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
	$size = filesize($f);&lt;br /&gt;
	$data = fread($fh, $size);&lt;br /&gt;
	print $data;&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if($age &amp;gt;= $TTL){ &lt;br /&gt;
	if($rss = fetch_rss($feed)){&lt;br /&gt;
		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
		$replace = array(&#039;&#039;);&lt;br /&gt;
		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
			foreach ($items as $item ){&lt;br /&gt;
				if($count &amp;lt; $max_items){&lt;br /&gt;
					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$count += 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
		echo $news_feed;&lt;br /&gt;
		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
		fwrite($fh, $news_feed);&lt;br /&gt;
		fclose($fh);&lt;br /&gt;
	}else{&lt;br /&gt;
		getFromCache($filename);&lt;br /&gt;
	}&lt;br /&gt;
 }else{&lt;br /&gt;
	getFromCache($filename);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9143</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9143"/>
		<updated>2010-04-16T11:42:55Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
//set some variables here:&lt;br /&gt;
$anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
$TTL = 3600;&lt;br /&gt;
$feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
$uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
$filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
$max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
$with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$age = 0;&lt;br /&gt;
if(file_exists($filename)){&lt;br /&gt;
	$age = time() - filemtime($filename); &lt;br /&gt;
}else{&lt;br /&gt;
	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
	fwrite($fh, $news_feed);&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
	$age = $TTL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getFromCache($f){	&lt;br /&gt;
	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
	$size = filesize($f);&lt;br /&gt;
	$data = fread($fh, $size);&lt;br /&gt;
	print $data;&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if($age &amp;gt;= $TTL){ &lt;br /&gt;
	if($rss = fetch_rss($feed)){&lt;br /&gt;
		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
		$replace = array(&#039;&#039;);&lt;br /&gt;
		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
			foreach ($items as $item ){&lt;br /&gt;
				if($count &amp;lt; $max_items){&lt;br /&gt;
					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$count += 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
		echo $news_feed;&lt;br /&gt;
		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
		fwrite($fh, $news_feed);&lt;br /&gt;
		fclose($fh);&lt;br /&gt;
	}else{&lt;br /&gt;
		getFromCache($filename);&lt;br /&gt;
	}&lt;br /&gt;
}else{&lt;br /&gt;
	getFromCache($filename);&lt;br /&gt;
}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9142</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9142"/>
		<updated>2010-04-16T11:42:24Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
//set some variables here:&lt;br /&gt;
$anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
$TTL = 3600;&lt;br /&gt;
$feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
$uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
$filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
$max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
$with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$age = 0;&lt;br /&gt;
if(file_exists($filename)){&lt;br /&gt;
	$age = time() - filemtime($filename); &lt;br /&gt;
}else{&lt;br /&gt;
	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
	fwrite($fh, $news_feed);&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
	$age = $TTL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getFromCache($f){	&lt;br /&gt;
	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
	$size = filesize($f);&lt;br /&gt;
	$data = fread($fh, $size);&lt;br /&gt;
	print $data;&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if($age &amp;gt;= $TTL){ &lt;br /&gt;
	if($rss = fetch_rss($feed)){&lt;br /&gt;
		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
		$replace = array(&#039;&#039;);&lt;br /&gt;
		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
			foreach ($items as $item ){&lt;br /&gt;
				if($count &amp;lt; $max_items){&lt;br /&gt;
					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$count += 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
		echo $news_feed;&lt;br /&gt;
		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
		fwrite($fh, $news_feed);&lt;br /&gt;
		fclose($fh);&lt;br /&gt;
	}else{&lt;br /&gt;
		getFromCache($filename);&lt;br /&gt;
	}&lt;br /&gt;
}else{&lt;br /&gt;
	getFromCache($filename);&lt;br /&gt;
}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9141</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9141"/>
		<updated>2010-04-16T11:41:52Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* RSS into HTML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
&lt;br /&gt;
//set some variables here:&lt;br /&gt;
$anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
$TTL = 3600;&lt;br /&gt;
$feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
$uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
$filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
$max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
$with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$age = 0;&lt;br /&gt;
if(file_exists($filename)){&lt;br /&gt;
	$age = time() - filemtime($filename); &lt;br /&gt;
}else{&lt;br /&gt;
	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
	fwrite($fh, $news_feed);&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
	$age = $TTL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getFromCache($f){	&lt;br /&gt;
	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
	$size = filesize($f);&lt;br /&gt;
	$data = fread($fh, $size);&lt;br /&gt;
	print $data;&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if($age &amp;gt;= $TTL){ &lt;br /&gt;
	if($rss = fetch_rss($feed)){&lt;br /&gt;
		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
		$replace = array(&#039;&#039;);&lt;br /&gt;
		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
			foreach ($items as $item ){&lt;br /&gt;
				if($count &amp;lt; $max_items){&lt;br /&gt;
					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$count += 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
		echo $news_feed;&lt;br /&gt;
		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
		fwrite($fh, $news_feed);&lt;br /&gt;
		fclose($fh);&lt;br /&gt;
	}else{&lt;br /&gt;
		getFromCache($filename);&lt;br /&gt;
	}&lt;br /&gt;
}else{&lt;br /&gt;
	getFromCache($filename);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9140</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9140"/>
		<updated>2010-04-16T11:38:46Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Website Integration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
===RSS into HTML===&lt;br /&gt;
Using PHP:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
require_once(&#039;D:/website/output/library/facebookapps/witlibrary/magpierss/rss_fetch.inc&#039;);&lt;br /&gt;
&lt;br /&gt;
//set some variables here:&lt;br /&gt;
$anchor = &#039;&amp;lt;t4 type=&amp;quot;meta&amp;quot; meta=&amp;quot;html_anchor&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
$TTL = 3600;&lt;br /&gt;
$feed = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;RSS_Feed_URL&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
$uniqueID = explode(&amp;quot;\&amp;quot;&amp;quot;, $anchor);&lt;br /&gt;
$filename = &amp;quot;./&amp;quot; . str_replace(&#039;.&#039;, &#039;-&#039;, $uniqueID[1]) . &amp;quot;.txt&amp;quot;;&lt;br /&gt;
$max_items = &amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;MaxNumberToShow&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;;&lt;br /&gt;
$with_summaries = &#039;&amp;lt;t4 type=&amp;quot;content&amp;quot; name=&amp;quot;ShowSummary&amp;quot; output=&amp;quot;normal&amp;quot; modifiers=&amp;quot;&amp;quot;  /&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$age = 0;&lt;br /&gt;
if(file_exists($filename)){&lt;br /&gt;
	$age = time() - filemtime($filename); &lt;br /&gt;
}else{&lt;br /&gt;
	$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
	fwrite($fh, $news_feed);&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
	$age = $TTL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getFromCache($f){	&lt;br /&gt;
	$fh = fopen($f, &amp;quot;r&amp;quot;);&lt;br /&gt;
	$size = filesize($f);&lt;br /&gt;
	$data = fread($fh, $size);&lt;br /&gt;
	print $data;&lt;br /&gt;
	fclose($fh);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if($age &amp;gt;= $TTL){ &lt;br /&gt;
	if($rss = fetch_rss($feed)){&lt;br /&gt;
		$items = array_slice($rss-&amp;gt;items, 0);&lt;br /&gt;
		$find = array(&#039;/^\.?/&#039;);&lt;br /&gt;
		$replace = array(&#039;&#039;);&lt;br /&gt;
		$news_feed = &amp;quot;&amp;lt;ul class=\&amp;quot;rss_list\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
			foreach ($items as $item ){&lt;br /&gt;
				if($count &amp;lt; $max_items){&lt;br /&gt;
					$news_feed .= &amp;quot;\t&amp;lt;li class=\&amp;quot;rss_item\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_title\&amp;quot;&amp;gt;&amp;lt;a href=\&amp;quot;&amp;quot; . $item[&#039;link&#039;] . &amp;quot;\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;quot;;&lt;br /&gt;
					$news_feed .= $item[&#039;title&#039;] . &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;\n\t\t&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
					if($with_summaries == &#039;yes&#039;){&lt;br /&gt;
						$news_feed .= &amp;quot;\t\t&amp;lt;span class=\&amp;quot;rss_summary\&amp;quot;&amp;gt;\n\t\t\t&amp;quot;;&lt;br /&gt;
						$news_feed .= str_replace(($item[&#039;title&#039;] . &amp;quot;.&amp;quot;), &amp;quot;&amp;quot;, htmlentities($item[&#039;summary&#039;])) . &amp;quot;&amp;lt;br/&amp;gt;\n\t\t&amp;lt;/span&amp;gt;\n&amp;quot;;&lt;br /&gt;
					}&lt;br /&gt;
					$news_feed .= &amp;quot;\t\t&amp;lt;br /&amp;gt;\n\t&amp;lt;/li&amp;gt;\n&amp;quot;;&lt;br /&gt;
					$count += 1;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		$news_feed .= &amp;quot;&amp;lt;/ul&amp;gt;\n\n&amp;quot;;&lt;br /&gt;
		echo $news_feed;&lt;br /&gt;
		$fh = fopen($filename, &amp;quot;w&amp;quot;);&lt;br /&gt;
		fwrite($fh, $news_feed);&lt;br /&gt;
		fclose($fh);&lt;br /&gt;
	}else{&lt;br /&gt;
		getFromCache($filename);&lt;br /&gt;
	}&lt;br /&gt;
}else{&lt;br /&gt;
	getFromCache($filename);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9139</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9139"/>
		<updated>2010-04-16T11:35:51Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Make the password controled parts of the site use HTTPS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controlled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9138</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9138"/>
		<updated>2010-04-16T11:35:14Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Make the latest additions to your archive appear on your main website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Website Integration==&lt;br /&gt;
===Make the latest additions to your archive appear on your main website===&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9137</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9137"/>
		<updated>2010-04-16T11:33:58Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Remove an eprint type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
===Remove an eprint type===&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Make the latest additions to your archive appear on your main website==&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9136</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9136"/>
		<updated>2010-04-16T11:33:44Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Add a new eprint type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: EPrint types==&lt;br /&gt;
===Add a new eprint type===&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Remove an eprint type==&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Make the latest additions to your archive appear on your main website==&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9135</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9135"/>
		<updated>2010-04-16T11:32:58Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Remove a Field */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
===HOW TO: Remove a Field===&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new eprint type==&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Remove an eprint type==&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Make the latest additions to your archive appear on your main website==&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9134</id>
		<title>How to</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to&amp;diff=9134"/>
		<updated>2010-04-16T11:32:44Z</updated>

		<summary type="html">&lt;p&gt;Dkane: /* HOW TO: Add a New Field */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==HOW TO: Set up a Complex Custom View==&lt;br /&gt;
Simple instructions are in the ArchiveConfig.pm section.&lt;br /&gt;
&lt;br /&gt;
Example situation: On my main website www.foobars.ac.uk I have a page per research project, of which we have hundreds. Each project has a short unique id code, eg. &amp;quot;manticore&amp;quot;. I have a field in my eprints archive (eprints.foobars.ac.uk) which is configured:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name=&amp;gt;&amp;quot;projectcodes&amp;quot;, type=&amp;gt;&amp;quot;text&amp;quot;, multiple=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I add the following browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a page http://eprints.foobars.ac.uk/views/by_project/manticore.html with a list of all papers in that project, we can link to that URL!&lt;br /&gt;
&lt;br /&gt;
===Making the Field link to the Browse Page===&lt;br /&gt;
If you want a subject to link the subject browse page of that value, add the &#039;&#039;&#039;browse_link&#039;&#039;&#039; property to the field (and regenerate the abstracts if you want).&lt;br /&gt;
&lt;br /&gt;
If you remove the browse view you should remove the browse_link or it will be a broken link.&lt;br /&gt;
&lt;br /&gt;
Values rendered inside citations which are used to link to the main record will not link into the browse view for obvious reasons.&lt;br /&gt;
&lt;br /&gt;
===Including a view in another page===&lt;br /&gt;
If you change that to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate a view which is NOT listed on the /view/ page and it will not skip making the .html file and make a .include file per value. This will only contain the &amp;quot;count&amp;quot; of items and the XHTML of their citations. This can be used as part of a page on the http://www.foobaars.ac.uk/ site; either by using php and capturing it on-the-fly using &amp;lt;tt&amp;gt;readfile&amp;lt;/tt&amp;gt; or scripting it with perl or NFS exporting the filesystem onto the main server (or just doing it all on one computer) and using server side includes to place it in a page.&lt;br /&gt;
&lt;br /&gt;
===Customising the way each item is cited===&lt;br /&gt;
I want to list the project papers in a strict format in a table with 4 columns: title, author(s), year and an icon which links to the document abstract page...&lt;br /&gt;
&lt;br /&gt;
I add some &#039;&#039;more&#039;&#039; options to the browse view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_project&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;projectcodes&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, nolink=&amp;gt;1, nohtml=&amp;gt;1, include=&amp;gt;1,&lt;br /&gt;
 nocount=&amp;gt;1, citation=&amp;gt;&amp;quot;project_table&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now I add a new citation to the citations config file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;project_table&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;title;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;authors;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;amp;year;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;img &lt;br /&gt;
 src=&amp;quot;http://www.foobars.ac.uk/images/paperlink.png&amp;quot; alt=&amp;quot;view&amp;quot; width=&amp;quot;32&amp;quot; &lt;br /&gt;
 height=&amp;quot;64&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/ep:citation&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
That should generate for the manticore project, in the &amp;quot;.include&amp;quot; file (I&#039;ve cut the contents of the &amp;quot;img&amp;quot; tag for readability:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Making Stuff&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Guy, A.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2001&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a &lt;br /&gt;
 href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000923/&amp;quot;&amp;gt;&amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Eating Food&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Herring, Walter and Chips, Bob&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
 2000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;http://eprints.foobar.ac.uk/archive/00000445/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;img ... /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===A &amp;quot;CV&amp;quot; page - a list of all of Alices records===&lt;br /&gt;
This is where the authors and editors field having an ID comes in handy.&lt;br /&gt;
&lt;br /&gt;
Say we use local username to identify people in the &amp;quot;Person ID&amp;quot; fields, we can now set up a view:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { id=&amp;gt;&amp;quot;by_person&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;authors.id/editors.id&amp;quot;, &lt;br /&gt;
 order=&amp;gt;&amp;quot;-year/title&amp;quot;, noindex=&amp;gt;1, include=&amp;gt;1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This will generate both .html pages and .include pages. An member of your organisation can get a list of their records either by linking to &amp;lt;tt&amp;gt;/views/by_person/alice.html&amp;lt;/tt&amp;gt; (where alice is their username) or by snarfing the URL &amp;lt;tt&amp;gt;/views/by_person/alice.include&amp;lt;/tt&amp;gt; into his own homepage.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Fields==&lt;br /&gt;
===Add a new Field&lt;br /&gt;
This convers adding a new field to a new system, not a live system. It is possible to add a new field to a live system but invloves SQL hacking.&lt;br /&gt;
&lt;br /&gt;
In this example we add a new &amp;quot;set&amp;quot; field called &amp;quot;local&amp;quot; which will have 3 options &amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot; and &amp;quot;partial&amp;quot; - this will indicate if the item in question was produced in our organisation or not.&lt;br /&gt;
&lt;br /&gt;
; Add the Field to ArchiveMetafieldConfig.pm : Add the field to the appropriate part of ArchiveMetafieldConfig.pm (the &amp;quot;eprint&amp;quot; section in our example)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 { name =&amp;gt; &amp;quot;local&amp;quot;, type =&amp;gt; &amp;quot;set&amp;quot;, input_rows =&amp;gt; 1, &lt;br /&gt;
    options =&amp;gt; [ &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;partial&amp;quot; ] }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
input_rows being set to one will make it appear as a pull-down menu.&lt;br /&gt;
; Add the Field to metadata-types.xml : If you want the user to be able to edit this field for any or all types of eprint/user then you need to add it to each appropriate type in metadata-types.xml (this can be changed on a live system without any serious consequencies).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;field name=&amp;quot;local&amp;quot; required=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
; Add the Field Information to the Archive Phrase File(s) : Normally we just need to add fieldname and fieldhelp, but this is an option field so we need to add names for each option. If we run the archive in more than one language then we add this to each phrase file (but in the appropriate language).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldname_local&amp;quot;&amp;gt;Produced Locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldhelp_local&amp;quot;&amp;gt;Please indicate if this item was &lt;br /&gt;
produces in the foo organisation, or not.&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_yes&amp;quot;&amp;gt;produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_no&amp;quot;&amp;gt;not produced locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;eprint_fieldopt_local_partial&amp;quot;&amp;gt;only partially produced &lt;br /&gt;
locally&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other things you may wish to change after adding a new field====&lt;br /&gt;
; Add it to the citations file : This is optional, only do this if you want it to appear in the citated forms.&lt;br /&gt;
In our example case we only want this to appear when citing technical reports, so we change that entry to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:citation type=&amp;quot;eprint_techreport&amp;quot;&amp;gt;&amp;lt;ep:linkhere&amp;gt;&amp;lt;span &lt;br /&gt;
 class=&amp;quot;citation&amp;quot;&amp;gt;&amp;amp;authors; &amp;lt;ep:ifset name=&amp;quot;year&amp;quot;&amp;gt;(&amp;amp;year;) &lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;amp;title;. Technical Report&amp;lt;ep:ifset name=&amp;quot;reportno&amp;quot;&amp;gt; &lt;br /&gt;
 &amp;amp;reportno;&amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;department&amp;quot;&amp;gt;, &amp;amp;department;&lt;br /&gt;
 &amp;lt;/ep:ifset&amp;gt;&amp;lt;ep:ifset name=&amp;quot;institution&amp;quot;&amp;gt;, &amp;amp;institution;&amp;lt;/ep:ifset&amp;gt;. &lt;br /&gt;
 &amp;amp;local;.&amp;lt;/span&amp;gt;&amp;lt;/ep:linkhere&amp;gt;&amp;lt;/ep:citation&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
All we&#039;ve done is add &amp;lt;tt&amp;gt;&amp;amp;local;.&amp;lt;/tt&amp;gt; to the end. It&#039;s not inside &amp;lt;tt&amp;gt; &amp;lt;ep:ifset name=&amp;quot;local&amp;quot;&amp;gt; &amp;lt;/tt&amp;gt; as it is a required field and will (should) always be set.&lt;br /&gt;
; Add it to the the Abstract (or View-User) page. : This is also optional. If you want it to appear on the web page for this item then edit ArchiveRenderConfig.pm and select the appropriate function, either eprint_render or user_render.&lt;br /&gt;
In our example we only want to mention items if an item was not produced locally. We&#039;ll add it below the documents and above the abstract...&lt;br /&gt;
Single language example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      # don&#039;t need to &amp;quot;my $p&amp;quot; as it&#039;s done earlier.&lt;br /&gt;
      $p = $session-&amp;gt;make_element( &amp;quot;p&amp;quot; );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;This item was &amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $p-&amp;gt;appendChild( $session-&amp;gt;make_text( &amp;quot;.&amp;quot; ) );&lt;br /&gt;
&lt;br /&gt;
      # Append our new paragraph to the page.&lt;br /&gt;
      $page-&amp;gt;appendChild( $p );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Multiple-language example:&lt;br /&gt;
If you want to make it handle more than language then we&#039;ll need to use the archive phrase file - we would add something like this to each languages file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;ep:phrase ref=&amp;quot;page:itemnotlocal&amp;quot;&amp;gt;&amp;lt;p&amp;gt;This item was &amp;lt;pin ref=&amp;quot;status&amp;quot; /&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/ep:phrase&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
And to the ArchiveRenderConfig.pm file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 if( $eprint-&amp;gt;get_value( &amp;quot;local&amp;quot; ) ne &amp;quot;yes&amp;quot; )&lt;br /&gt;
 {&lt;br /&gt;
      my $localmsg = $session-&amp;gt;html_phrase(&lt;br /&gt;
             &amp;quot;page:itemnotlocal&amp;quot;,&lt;br /&gt;
             status=&amp;gt;$eprint-&amp;gt;render_value( &amp;quot;local&amp;quot; ) );&lt;br /&gt;
      $page-&amp;gt;appendChild( $localmsg );&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You may prefer to use this method even if you are only using a single language.&lt;br /&gt;
; Add extra Validation Routines : If you need to validate this field in a special way, add code into ArchiveValidateConfig.pm&lt;br /&gt;
; Add it to the OAI metadata (eprints only) : If this field can be rendered into Dublin Core (or other metadata formats you are using) then add it to the appropriate place in the ArchiveOAIConfig.pm file.&lt;br /&gt;
; Add a browse view (eprints only) : If you want to be able to browse this values items. See elsewhere in the docs for how to do this.&lt;br /&gt;
&lt;br /&gt;
If you add a field you will need to run erase_archive and create_tables before you will see a change. EPrints will fail to run if you change the fields and do rebuild the tables.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Remove a Field==&lt;br /&gt;
The quick answer is to say &amp;quot;the opposite of adding one&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
; Remove the Field to metadata-types.xml : Removing it from here will mean that nobody can enter values for that field. Which is possibly enough, and means you can put it back later.&lt;br /&gt;
; Remove the Field to ArchiveMetafieldConfig.pm : This will remove it from the database ( and require a rebuild as with adding a field ).&lt;br /&gt;
; Remove it from the phrase file(s) : This is optional, unused phrases are just ignored.&lt;br /&gt;
; Remove it from the citations file : If it&#039;s used there.&lt;br /&gt;
; Remove it from the the Abstract (or View-User) page. : If it&#039;s used there.&lt;br /&gt;
; Remove extra Validation Routines : In the unlikely event you added some validation which looks at this field.&lt;br /&gt;
; Remove it from the OAI metadata (eprints only) : If it&#039;s being used. Fields used to generate the default dublincore are: title, authors, subjects, abstract, year and month. It also uses &amp;quot;type&amp;quot; which is a system field so you can&#039;t remove it!&lt;br /&gt;
; Remove it from browse views (eprints only) : If it&#039;s used there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new eprint type==&lt;br /&gt;
Add the eprint type to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. Some fields should probably be &amp;quot;required&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add the name of the type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this type to the citations file.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Remove an eprint type==&lt;br /&gt;
Remove it from metadata-types.xml&lt;br /&gt;
&lt;br /&gt;
You can remove it from the phrase file &amp;amp; citations but it won&#039;t hurt to leave it there.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a new document type==&lt;br /&gt;
Add it to &#039;&#039;&#039;metadata-types.xml&#039;&#039;&#039;. This does not need any fields.&lt;br /&gt;
&lt;br /&gt;
Add the name of the document type to the phrase file.&lt;br /&gt;
&lt;br /&gt;
Add a citation for this document to the citations file.&lt;br /&gt;
&lt;br /&gt;
If you want this to be one of the must-have-one-of document types then add it&#039;s id to the list in ArchiveConfig.pm&lt;br /&gt;
&lt;br /&gt;
If you want to do something &amp;quot;clever&amp;quot; on the abstract page then edit the ArchiveRenderConfig.pm file. If you don&#039;t then it will use the citiation you created to render it in the list, as with PDF, HTML etc.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add a Discussion Forum for Each EPrint==&lt;br /&gt;
The UK Open University (open.ac.uk) have set up a service which allows you to create a discussion for every EPrint in your archive.&lt;br /&gt;
&lt;br /&gt;
The really easy way to do this is to use their discussion server. If you want to run your own d3e server the software is available from http://d3e.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
===Using d3eprints.open.ac.uk===&lt;br /&gt;
Just add the following code to the ArchiveRenderConfig.pm file just before the &amp;lt;tt&amp;gt;if( $has_multiple_versions )&amp;lt;/tt&amp;gt; bit.&lt;br /&gt;
&lt;br /&gt;
Please note that this code is not internationalised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        #####################################&lt;br /&gt;
        # Begin D3Eprints links&lt;br /&gt;
&lt;br /&gt;
        my $ol = $session-&amp;gt;make_element( &amp;quot;ol&amp;quot; );&lt;br /&gt;
        my $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/disc.php?url=&amp;quot;.$eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;View public discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $li = $session-&amp;gt;make_element( &amp;quot;li&amp;quot; );&lt;br /&gt;
        $a = $session-&amp;gt;render_link(&lt;br /&gt;
                EPrints::Utils::url_escape(&lt;br /&gt;
                        &amp;quot;http://d3eprints.open.ac.uk/private/disc.php?url=&amp;quot;.&lt;br /&gt;
                                $eprint-&amp;gt;get_url ),&lt;br /&gt;
                &amp;quot;_top&amp;quot; );&lt;br /&gt;
        $a-&amp;gt;appendChild( $session-&amp;gt;make_text(&lt;br /&gt;
                &amp;quot;Create private discussion of this document&amp;quot; ) );&lt;br /&gt;
        $li-&amp;gt;appendChild( $a );&lt;br /&gt;
        $ol-&amp;gt;appendChild( $li );&lt;br /&gt;
&lt;br /&gt;
        $table-&amp;gt;appendChild( _render_row(&lt;br /&gt;
                $session,&lt;br /&gt;
                $session-&amp;gt;make_text( &amp;quot;D3Eprints discussion&amp;quot; ),&lt;br /&gt;
                $ol ) );&lt;br /&gt;
&lt;br /&gt;
        # End of D3Eprints links&lt;br /&gt;
        #####################################&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==HOW TO: Make the latest additions to your archive appear on your main website==&lt;br /&gt;
The contents of the &amp;quot;latest&amp;quot; page - /perl/latest - can be included via a cron tab using wget and a server side include or using something like PHP&#039;s command to do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 readfile( &amp;quot;http://eprints.foo.org/perl/latest?mainonly=yes&amp;quot; );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;quot;mainonly=yes&amp;quot; flag is a hack which supresses the template of any eprints page in the /perl/ area so that it can be included, but it is most useful for &amp;quot;latest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have a script which imports 1000 records in one night then latest isn&#039;t currently bright enough to truncate the list so your homepage could get kinda messy.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Add full text searching==&lt;br /&gt;
EPrints does not support this natively but there are several options.&lt;br /&gt;
&lt;br /&gt;
===htdig, or similar software===&lt;br /&gt;
There is plenty of software which will provide a full text search of a website. To add non-eprints cgi scripts to your site create a directory in the cgi dir:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 mkdir /opt/eprints2/cgi/local&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
and place your scripts in there, they will have URLs under &amp;lt;tt&amp;gt;http://yoursite.com/perl/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an external search engine===&lt;br /&gt;
This is very easy, but will only index public documents. Any search engine will work, but Google is a good choice. Google provide a site-search service which allows you to register with them and then have a form which searches your site using google and adds your logo and colourscheme to the results.&lt;br /&gt;
&lt;br /&gt;
A really easy solution is to just make a form which links to our &amp;quot;google_site&amp;quot; script which just adds &amp;quot;site:yoursite.com&amp;quot; to the google request to limit the search results. The HTML for this would be something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;form action=&amp;quot;/perl/google_site&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;p&amp;gt;Use Google to search this site:&lt;br /&gt;
 &amp;lt;input name=&amp;quot;q&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;go&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For other search engines; see their documentation for how to make a form to search only your site.&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the referencetext field link to the items referenced==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Make the password controled parts of the site use HTTPS==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;br /&gt;
&lt;br /&gt;
==HOW TO: Customise the way the the search results are formatted==&lt;br /&gt;
This should have been in the 2.2 docs but I didn&#039;t have time. Check the latest version of the documentation at software.eprints.org, if it&#039;s not there then bug me at support@eprints.org&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=9133</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=9133"/>
		<updated>2010-04-16T11:30:53Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
==creation fo a new directory for theses==&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=9132</id>
		<title>How to create a separate, searchable &#039;collection&#039; (for eTheses)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_create_a_separate,_searchable_%27collection%27_(for_eTheses)&amp;diff=9132"/>
		<updated>2010-04-16T11:28:40Z</updated>

		<summary type="html">&lt;p&gt;Dkane: Created page with &amp;#039;Category:Howto =creation fo a new directory for theses= The approach was to create new views and searches that filtered out the theses currently listed in our eprints reposit…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
=creation fo a new directory for theses=&lt;br /&gt;
The approach was to create new views and searches that filtered out the theses currently listed in our eprints repository and created a subfolder in the website that accessed this rather than creating a new repository just for etheses. &lt;br /&gt;
&lt;br /&gt;
Here is a basic explanation: &lt;br /&gt;
&lt;br /&gt;
To add new views, we modified the browse_views configuration in /cfg/cfg.d/views.pl to add the following lines: &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/type&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/year&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;year&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 }, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/subject&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;subjects&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1}, &lt;br /&gt;
 {id=&amp;gt;&amp;quot;theses/department&amp;quot;, allow_null=&amp;gt;0, fields=&amp;gt;&amp;quot;department&amp;quot;, subheadings=&amp;gt;&amp;quot;thesistype&amp;quot;, order=&amp;gt;&amp;quot;title/authors&amp;quot;, noindex=&amp;gt;0, nolink=&amp;gt;1, heading_level=&amp;gt;2, hideempty=&amp;gt;1 } &lt;br /&gt;
&#039;&#039;Note:&#039;&#039; We added the nolink option to each view so that these new views wouldn&#039;t be linked from the standard view page of the repository.&lt;br /&gt;
&lt;br /&gt;
Then to add the new searches, we duplicated the configuration for the simple and advanced searches in &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/cfg.d/search.pl&#039;&#039;, renaming them thesis and advthesis and added the following option to their configuration. &lt;br /&gt;
 filters =&amp;gt; [ { meta_fields =&amp;gt; [ &amp;quot;type&amp;quot; ], value =&amp;gt; &amp;quot;thesis&amp;quot; }] &lt;br /&gt;
We then added a new subfolder etheses in &#039;&#039;static/en/&#039;&#039; and in it created an index page for our etheses section that linked to our new views and searches.&lt;br /&gt;
&lt;br /&gt;
For a consistent look we also created an &#039;&#039;static/en/etheses/view/&#039;&#039; folder and added an index that mimicked the look of the autogenerated view index of the eprints repository, except linking to our etheses views.&lt;br /&gt;
&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/index.xpage&#039;&#039; , which is the main home page of the repository&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/static/etheses/index.xpage&#039;&#039; , which is the main home page of the etheses directory&lt;br /&gt;
*Had to modify &#039;&#039;/usr/share/eprints3/archives/witeprints/cfg/lang/en/templates/default.xml&#039;&#039;, which is the main template to include links to the etheses directory on the side menu&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_add_a_subdirectory_that_runs_PHP_scripts&amp;diff=9131</id>
		<title>How to add a subdirectory that runs PHP scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_add_a_subdirectory_that_runs_PHP_scripts&amp;diff=9131"/>
		<updated>2010-04-16T11:24:14Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Howto]]&lt;br /&gt;
In this example, we are adding a &#039;blog&#039; directory, perhaps to host wordpress.&lt;br /&gt;
&lt;br /&gt;
===Edit [eprint install dir]/archives/[archive]/cfg/cfg.d/[[urls.pl]]===&lt;br /&gt;
Amend this line to include the directory you want to make an exception for.  &lt;br /&gt;
&lt;br /&gt;
Here we are adding the directory /blog/ to the array.&lt;br /&gt;
 $c-&amp;gt;{[[rewrite_exceptions]]} = [ &#039;/cgi/&#039;, &#039;/archive/&#039;, &#039;&#039;&#039;&#039;/blog/&#039;&#039;&#039;&#039;];&lt;br /&gt;
&lt;br /&gt;
Save and close.&lt;br /&gt;
&lt;br /&gt;
===Edit: [eprint install dir]/archives/[archive]/cfg/[[apachevhost.conf]]===&lt;br /&gt;
&lt;br /&gt;
And add the following.&lt;br /&gt;
&lt;br /&gt;
   Alias /blog/ /path/to/blog/&lt;br /&gt;
   &amp;lt;Location &amp;quot;/blog&amp;quot;&amp;gt;&lt;br /&gt;
      AddHandler php5-script php&lt;br /&gt;
      DirectoryIndex index.php&lt;br /&gt;
   &amp;lt;/Location&amp;gt; &lt;br /&gt;
   &amp;lt;Directory /path/to/blog&amp;gt;&lt;br /&gt;
      Order allow,deny&lt;br /&gt;
      Allow from all&lt;br /&gt;
   &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart Apache===&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/apache2 force-reload&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Category:Howto&amp;diff=9129</id>
		<title>Category:Howto</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Category:Howto&amp;diff=9129"/>
		<updated>2010-04-16T11:06:08Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When you install EPrints there are a handful of tasks you will probably have to do for every repository your create. This section is designed to give each of those tasks a focal point. The documents found here are tutorial explainations of how to perform common tasks in EPrints. They are not designed to be comprehensive but they should give you a favour of the sort of things that can be done. If you supliment the information here with the material in the [[:Category:EPrints_3_Reference]] the you should find you are able to achieve most of your goals. &lt;br /&gt;
&lt;br /&gt;
If you run into any trouble you can always ask EP-Tech. {{EPrintsTech}} If you find one of the How-tos has a mistake or is out of date please feel free to add corrections that made it work for you.&lt;br /&gt;
&lt;br /&gt;
If you end up doing something which is not yet documented here feel free to make an page explaining what you did and how you did it. Commonly you will not have time in your day to day work to write a whole How-to so instead why not try adding a &#039;&#039;&#039;&amp;quot;[[:Category:Snippets|snippet]]&amp;quot;&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
[[Template:Register|Here you can register for an eprints.org account]] to edit the wiki.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
* [[LDAP]]&lt;br /&gt;
** slightly more complex [[LDAP user login.pl]] example with account auto-creation&lt;br /&gt;
* [[Removing User Registration]]&lt;br /&gt;
* [[CAS|How to use a CAS server to authenticate users in eprints]]&lt;br /&gt;
* [[Secure login|Light weight secure login]]&lt;br /&gt;
&lt;br /&gt;
== Eprints config (global) ==&lt;br /&gt;
&lt;br /&gt;
* [[setting up email]]&lt;br /&gt;
&lt;br /&gt;
== Eprints archive config ==&lt;br /&gt;
&lt;br /&gt;
* [[How to Create Cover Images in EPrints 3]]&lt;br /&gt;
* [[HOW TO: Add a New Field|How to add a New Field]]&lt;br /&gt;
* [[Add a parallel authentication routine]]. This is a real-world example, which alters the user table, over-rides the default methods for fields, and makes changes to the way a user is authenticated]]&lt;br /&gt;
* [[Adding a Field to a Live Repository]]&lt;br /&gt;
* [[How to add an Auto-Completer to a non-workflow page]]&lt;br /&gt;
* [[How to add the structure of an organisation]]&lt;br /&gt;
* [[How to add a subdirectory that runs PHP scripts]]&lt;br /&gt;
* [[How to create a separate, searchable &#039;collection&#039; (for eTheses)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Migration and Importing ==&lt;br /&gt;
&lt;br /&gt;
* [[Importing from Endnote]]&lt;br /&gt;
* [[How to import users from another archive and keep their passwords]]&lt;br /&gt;
&lt;br /&gt;
== Development Environment ==&lt;br /&gt;
&lt;br /&gt;
* [[EclipseEpicPerlDebug|How to set up EPrints in Eclipse using EPIC and the Perl Debugger]]&lt;br /&gt;
&lt;br /&gt;
== User Interface ==&lt;br /&gt;
&lt;br /&gt;
* [[Web Interface Style and Images]]&lt;br /&gt;
* [[GUI Submission with no Documents]]&lt;br /&gt;
* [[Browse By Person]]&lt;br /&gt;
* [[Adding a link to the Front Page]]&lt;br /&gt;
* [[Contact and Information Pages]]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=User:Dkane&amp;diff=8672</id>
		<title>User:Dkane</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=User:Dkane&amp;diff=8672"/>
		<updated>2010-02-18T23:36:41Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===David Kane===&lt;br /&gt;
Systems Librarian&lt;br /&gt;
[http://repository.wit.ie/ Waterford Institute of Technology Libraries]&lt;br /&gt;
Ireland&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=User:Dkane&amp;diff=8671</id>
		<title>User:Dkane</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=User:Dkane&amp;diff=8671"/>
		<updated>2010-02-18T23:36:22Z</updated>

		<summary type="html">&lt;p&gt;Dkane: Created page with &amp;#039;=David Kane= Systems Librarian [http://repository.wit.ie/ Waterford Institute of Technology Libraries] Ireland&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=David Kane=&lt;br /&gt;
Systems Librarian&lt;br /&gt;
[http://repository.wit.ie/ Waterford Institute of Technology Libraries]&lt;br /&gt;
Ireland&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_add_a_subdirectory_that_runs_PHP_scripts&amp;diff=8670</id>
		<title>How to add a subdirectory that runs PHP scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=How_to_add_a_subdirectory_that_runs_PHP_scripts&amp;diff=8670"/>
		<updated>2010-02-18T23:30:37Z</updated>

		<summary type="html">&lt;p&gt;Dkane: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this example, we are adding a &#039;blog&#039; directory, perhaps to host wordpress.&lt;br /&gt;
&lt;br /&gt;
===Edit [eprint install dir]/archives/[archive]/cfg/cfg.d/[[urls.pl]]===&lt;br /&gt;
Amend this line to include the directory you want to make an exception for.  &lt;br /&gt;
&lt;br /&gt;
Here we are adding the directory /blog/ to the array.&lt;br /&gt;
 $c-&amp;gt;{[[rewrite_exceptions]]} = [ &#039;/cgi/&#039;, &#039;/archive/&#039;, &#039;&#039;&#039;&#039;/blog/&#039;&#039;&#039;&#039;];&lt;br /&gt;
&lt;br /&gt;
Save and close.&lt;br /&gt;
&lt;br /&gt;
===Edit: [eprint install dir]/archives/[archive]/cfg/[[apachevhost.conf]]===&lt;br /&gt;
&lt;br /&gt;
And add the following.&lt;br /&gt;
&lt;br /&gt;
   Alias /blog/ /path/to/blog/&lt;br /&gt;
   &amp;lt;Location &amp;quot;/blog&amp;quot;&amp;gt;&lt;br /&gt;
      AddHandler php5-script php&lt;br /&gt;
      DirectoryIndex index.php&lt;br /&gt;
   &amp;lt;/Location&amp;gt; &lt;br /&gt;
   &amp;lt;Directory /path/to/blog&amp;gt;&lt;br /&gt;
      Order allow,deny&lt;br /&gt;
      Allow from all&lt;br /&gt;
   &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart Apache===&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/apache2 force-reload&lt;/div&gt;</summary>
		<author><name>Dkane</name></author>
	</entry>
</feed>