Difference between revisions of "EPrints Ingredients"

From EPrints Documentation
Jump to: navigation, search
m (typo correction: added your -> added to your)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
EPrints Ingredients were added in EPrints 3.4 as a means of providing complex functionality that was not suited to being provided by [https://bazaar.eprints.org Bazaar] plugins with their one-click install.  This is because certain functionality (e.g. [[Coversheets]]) requires both EPrints and non-EPrints dependencies and complex configuration to be useful.
+
EPrints Ingredients were added in EPrints 3.4 as a means of providing complex functionality that was not suited to being provided by [https://bazaar.eprints.org Bazaar] plugins with their one-click install.  This is because certain functionality (e.g. [[Coversheets]]) requires both EPrints and non-EPrints dependencies and complex configuration to be useful. Any ingredient can define configuration under <code>$c->{deps}</code> to define another ingredient it is dependent upon.  The following states the <code>richtext</code> ingredient is dependent on the <code>jquery</code> ingredient, so the latter needs to be included in the <code>inc</code> file for the flavour (e.g. <code>EPRINTS_PATH/flavours/pub_lib/inc</code>):
 +
 +
$c->{deps}->{"ingredients/richtext"} = [ "ingredients/jquery" ];
  
 
EPrints Zero includes the ''bazaar'' ingredient by default and it is enabled in the publication flavour's '''inc''' file.  From EPrints 3.4.3, a ''jquery'' ingredient is included to package a known version of [https://jquery.com/ jQuery].  This is not enabled in the publication flavour's '''inc''' file, as it only need be enabled if you intend to use jQuery within your repository for specific branding requirements.   
 
EPrints Zero includes the ''bazaar'' ingredient by default and it is enabled in the publication flavour's '''inc''' file.  From EPrints 3.4.3, a ''jquery'' ingredient is included to package a known version of [https://jquery.com/ jQuery].  This is not enabled in the publication flavour's '''inc''' file, as it only need be enabled if you intend to use jQuery within your repository for specific branding requirements.   
  
From 3.4.4 a ''prototypejs'' ingredient is included, which is also enabled in the publication flavour's '''inc'''.  This must be added to your repository's flavour's '''inc''' file if you are upgrading from an earlier version of EPrints 3.4, as it includes the Prototype and Scriptaculous JavaScript libraries underlying EPrints' JavaScript API.  The reason for the moving to an ingredient is so that in future EPrints' JavaScript API need be tied to a specific JavaScript library but also to simplify copyright and licensing as this files are not subject to EPrints copyright and license statements.
+
From 3.4.4 a ''prototypejs'' ingredient is included, which is also enabled in the publication flavour's '''inc'''.  This must be added to your repository's flavour's '''inc''' file if you are upgrading from an earlier version of EPrints 3.4, as it includes the Prototype and Scriptaculous JavaScript libraries underlying EPrints' JavaScript API.  The reason for the moving to an ingredient is so that in future EPrints' JavaScript API needn't be tied to a specific JavaScript library and also to simplify copyright and licensing as these files are not subject to EPrints' copyright and license statements.
 +
 
  
 
[[Category:Customisation]]
 
[[Category:Customisation]]

Latest revision as of 14:46, 19 July 2024

EPrints Ingredients were added in EPrints 3.4 as a means of providing complex functionality that was not suited to being provided by Bazaar plugins with their one-click install. This is because certain functionality (e.g. Coversheets) requires both EPrints and non-EPrints dependencies and complex configuration to be useful. Any ingredient can define configuration under $c->{deps} to define another ingredient it is dependent upon. The following states the richtext ingredient is dependent on the jquery ingredient, so the latter needs to be included in the inc file for the flavour (e.g. EPRINTS_PATH/flavours/pub_lib/inc):

$c->{deps}->{"ingredients/richtext"} = [ "ingredients/jquery" ];

EPrints Zero includes the bazaar ingredient by default and it is enabled in the publication flavour's inc file. From EPrints 3.4.3, a jquery ingredient is included to package a known version of jQuery. This is not enabled in the publication flavour's inc file, as it only need be enabled if you intend to use jQuery within your repository for specific branding requirements.

From 3.4.4 a prototypejs ingredient is included, which is also enabled in the publication flavour's inc. This must be added to your repository's flavour's inc file if you are upgrading from an earlier version of EPrints 3.4, as it includes the Prototype and Scriptaculous JavaScript libraries underlying EPrints' JavaScript API. The reason for the moving to an ingredient is so that in future EPrints' JavaScript API needn't be tied to a specific JavaScript library and also to simplify copyright and licensing as these files are not subject to EPrints' copyright and license statements.