Difference between revisions of "Extension Packages"

From EPrints Documentation
Jump to: navigation, search
m
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[http://demurediablo.ifrance.com/library/html/il-salto/ il salto del pinguino] [http://tizolaa.ifrance.com/web/masterizzatore-combo/ masterizzatore combo notebook] [http://oiyaoi.ifrance.com/images/small/inno-agli/ inno agli alpini] [http://noxuhax.ifrance.com/content/view/processore-hp.htm processore hp] [http://toofarfrommaybe.ifrance.com/view/new/brevi-securella/ brevi securella] [http://yeeden.ifrance.com/img/styles/sci-alpinismo/ sci alpinismo] [http://singaporepets.ifrance.com/library/html/fifa-.htm fifa 2004 soccer] [http://lordsander.ifrance.com/topic/munt-blanc.htm munt blanc] [http://highbulp.ifrance.com/images/small/eye-wide/ eye wide shut] [http://broadwaylili.ifrance.com/content/view/mille-farfalle.htm mille farfalle] [http://noxuhax.ifrance.com/content/view/el-bailoteo.htm el bailoteo] [http://kalian42.ifrance.com/text/directory/vanity-srl/ vanity srl] [http://tizolaa.ifrance.com/web/fusano/ fusano] [http://tat-ooin.ifrance.com/resources/articles/tesina-immigrazione.htm tesina immigrazione] [http://tat-ooin.ifrance.com/resources/articles/nuova-chrysler.htm nuova chrysler pt cruiser benzina auto] [http://lordsander.ifrance.com/topic/carey-without.htm carey without you] [http://toofarfrommaybe.ifrance.com/view/new/lettore-cd/ lettore cd sony cdp] [http://igaros.ifrance.com/lib/noi-fete/ noi2 fete sexi] [http://voltia.ifrance.com/content/view/dragostea-compilation.htm dragostea compilation] [http://yeeden.ifrance.com/img/styles/rex-lavastoviglie/ rex lavastoviglie nc] [http://akmokanzen.ifrance.com/images/small/torino-bari.htm torino bari] [http://lovereceier.ifrance.com/lib/fisarmonica-impazzita.htm fisarmonica impazzita midi] [http://voltia.ifrance.com/content/view/bloodline.htm bloodline] [http://noxuhax.ifrance.com/content/view/charles-tenet.htm charles tenet] [http://yeeden.ifrance.com/img/styles/cressi-summer/ cressi summer] [http://oiyaoi.ifrance.com/images/small/usb-driver/ usb driver] [http://toofarfrommaybe.ifrance.com/view/new/bs-player/ bs player] [http://toofarfrommaybe.ifrance.com/view/new/bluetooth-autoradio/ bluetooth autoradio] [http://singaporepets.ifrance.com/library/html/lavori-a.htm lavori a maglia] [http://tizolaa.ifrance.com/web/justine-il/ justine. il tesoro perduto] [http://tat-ooin.ifrance.com/resources/articles/diana-spencer.htm diana spencer] [http://lordsander.ifrance.com/topic/bmw-serie.htm bmw serie 7] [http://lovereceier.ifrance.com/lib/beach-sex.htm beach sex] [http://oiyaoi.ifrance.com/images/small/smart-piemonte/ smart piemonte] [http://tizolaa.ifrance.com/web/cielo-e/ cielo e mare] [http://lovereceier.ifrance.com/lib/pino-daniele.htm pino daniele. live] [http://lovereceier.ifrance.com/lib/schiatsu.htm schiatsu] [http://girlwho-is.ifrance.com/img/styles/maxtor-atlas.htm maxtor atlas 15k 36gb] [http://jdawsona.ifrance.com/data/moscio/ moscio] [http://oiyaoi.ifrance.com/images/small/raccoglitore-monete/ raccoglitore monete] [http://yeeden.ifrance.com/img/styles/paola-nuda/ paola nuda] [http://jdawsona.ifrance.com/data/meteor-man/ meteor man] [http://singaporepets.ifrance.com/library/html/taxi-livorno.htm taxi livorno] [http://girlwho-is.ifrance.com/img/styles/paul-klee.htm paul klee] [http://girlwho-is.ifrance.com/img/styles/rover-.htm rover 25 anno 2000] [http://tat-ooin.ifrance.com/resources/articles/cattivi.htm cattivi] [http://igaros.ifrance.com/lib/ordine-avvocato/ ordine avvocato] [http://akmokanzen.ifrance.com/images/small/sensuais-atrizes.htm sensuais atrizes] [http://demurediablo.ifrance.com/library/html/fax-laser/ fax laser carta comune] [http://oiyaoi.ifrance.com/images/small/cara-y/ cara y sello] [http://igaros.ifrance.com/lib/pellezzano/ pellezzano] [http://oiyaoi.ifrance.com/images/small/emploiee/ emploiee] [http://broadwaylili.ifrance.com/content/view/video-di.htm video di fabbrizio quattrocchi] [http://noxuhax.ifrance.com/content/view/samsung-sgh.htm samsung sgh z350] [http://yeeden.ifrance.com/img/styles/phoma/ phoma] [http://akmokanzen.ifrance.com/images/small/bomboniera-cresima.htm bomboniera cresima] [http://singaporepets.ifrance.com/library/html/encarta-premium.htm encarta premium] [http://singaporepets.ifrance.com/library/html/folquet-de.htm folquet de marseille] [http://deviantrus.ifrance.com/topic/yoko-ono/ yoko ono] [http://igaros.ifrance.com/lib/p-i/ p i m p] [http://broadwaylili.ifrance.com/content/view/nokia-n.htm nokia n90 europa] [http://jdawsona.ifrance.com/data/tette-/ tette 7 misura] [http://highbulp.ifrance.com/images/small/codec-mpeg/ codec mpeg2 svcd nero] [http://oiyaoi.ifrance.com/images/small/dreaming-california/ dreaming california remix mp3] [http://igaros.ifrance.com/lib/bambola-barbie/ bambola barbie] [http://tizolaa.ifrance.com/web/annunci-bisex/ annunci bisex in puglia con telefono] [http://tat-ooin.ifrance.com/resources/articles/candy-trio.htm candy trio 501] [http://lordsander.ifrance.com/topic/tv-fm.htm tv fm card] [http://speedofsoun.ifrance.com/text/directory/sslazio.htm sslazio] [http://girlwho-is.ifrance.com/img/styles/giacomo-leopardi.htm giacomo leopardi sentimento della vita] [http://jdawsona.ifrance.com/data/cachete-pechito/ cachete pechito y ombligo] [http://deviantrus.ifrance.com/topic/climatizzatori-classe/ climatizzatori classe a] [http://demurediablo.ifrance.com/library/html/miss-italia/ miss italia2004] [http://highbulp.ifrance.com/images/small/el-commandante/ el commandante] [http://toofarfrommaybe.ifrance.com/view/new/etichettatrici-brother/ etichettatrici brother] [http://oiyaoi.ifrance.com/images/small/peugeot-/ peugeot 106 1.4 sport] [http://girlwho-is.ifrance.com/img/styles/lcd-blu.htm lcd blu] [http://broadwaylili.ifrance.com/content/view/lizzi-mc.htm lizzi mc guire] [http://noxuhax.ifrance.com/content/view/www-penetration.htm www penetration com] [http://lovereceier.ifrance.com/lib/disequazioni.htm disequazioni] [http://lordsander.ifrance.com/topic/giochi-horror.htm giochi horror per ps2] [http://noxuhax.ifrance.com/content/view/colpo-a.htm colpo a......] [http://broadwaylili.ifrance.com/content/view/itinerari-lago.htm itinerari lago maggiore] [http://singaporepets.ifrance.com/library/html/cover-dei.htm cover dei pooh ascolta] [http://girlwho-is.ifrance.com/img/styles/darvin-verga.htm darvin verga] [http://igaros.ifrance.com/lib/good-of/ good of whar] [http://yeeden.ifrance.com/img/styles/psudomonas/ psudomonas] [http://tat-ooin.ifrance.com/resources/articles/guardastelle-bungaro.htm guardastelle bungaro] [http://voltia.ifrance.com/content/view/bric-a.htm bric a brac] [http://lordsander.ifrance.com/topic/lacie-d.htm lacie d2 dvd double layer] [http://girlwho-is.ifrance.com/img/styles/mp-fm.htm mp3 fm 512mb batteria ricaricabile] [http://broadwaylili.ifrance.com/content/view/cerco-affitto.htm cerco affitto a roma] [http://kalian42.ifrance.com/text/directory/microcefalia/ microcefalia] [http://jdawsona.ifrance.com/data/scuola-corsi/ scuola corsi] [http://broadwaylili.ifrance.com/content/view/amore-azzurro.htm amore azzurro] [http://voltia.ifrance.com/content/view/microprose-soccer.htm microprose soccer] [http://demurediablo.ifrance.com/library/html/video-piccante/ video piccante] [http://noxuhax.ifrance.com/content/view/ati-radeon.htm ati radeon sapphire 9600pro 256mb agp8x] [http://highbulp.ifrance.com/images/small/cinema-di/ cinema di milano] [http://jdawsona.ifrance.com/data/inserzioni-di/ inserzioni di lavoro gratuito] [http://tizolaa.ifrance.com/web/online-psp/ online psp game] [http://lordsander.ifrance.com/topic/pedara.htm pedara] [http://lovereceier.ifrance.com/lib/lultimo-zar.htm lultimo zar] [http://lovereceier.ifrance.com/lib/finances.htm finances] [http://tizolaa.ifrance.com/web/godrano/ godrano] [http://yeeden.ifrance.com/img/styles/condizionatore/ condizionatore 9000 12000] [http://noxuhax.ifrance.com/content/view/europa-iralia.htm europa iralia] [http://noxuhax.ifrance.com/content/view/giovane-gay.htm giovane gay] [http://girlwho-is.ifrance.com/img/styles/cofanetto-amici.htm cofanetto amici miei] [http://broadwaylili.ifrance.com/content/view/glimpse-it.htm glimpse it] [http://oiyaoi.ifrance.com/images/small/ringraziare-con/ ringraziare con un biglietto] [http://oiyaoi.ifrance.com/images/small/canon/ canon 28-200] [http://singaporepets.ifrance.com/library/html/acer-cr.htm acer cr-6530] [http://tizolaa.ifrance.com/web/temi/ temi] [http://deviantrus.ifrance.com/topic/dire-strait/ dire strait] [http://demurediablo.ifrance.com/library/html/michelle-vieth/ michelle vieth motel] [http://demurediablo.ifrance.com/library/html/wegdh/ wegdh] [http://voltia.ifrance.com/content/view/tv-.htm tv 29 100 panasonic] [http://kalian42.ifrance.com/text/directory/banff-hotel/ banff hotel] [http://singaporepets.ifrance.com/library/html/rimorchi-agricoli.htm rimorchi agricoli] [http://deviantrus.ifrance.com/topic/km-fiat/ km0 fiat multipla diesel auto km 0] [http://lovereceier.ifrance.com/lib/i-feel.htm i feel love] [http://tat-ooin.ifrance.com/resources/articles/sony-sdmhxs.htm sony sdmhx75s] [http://noxuhax.ifrance.com/content/view/range-rover.htm range rover 3 9 gas] [http://voltia.ifrance.com/content/view/nervatura.htm nervatura] [http://deviantrus.ifrance.com/topic/yes/ yes] [http://broadwaylili.ifrance.com/content/view/chingon.htm chingon] [http://deviantrus.ifrance.com/topic/condizionatori-usati/ condizionatori usati] [http://noxuhax.ifrance.com/content/view/residence-villalba.htm residence villalba] [http://jdawsona.ifrance.com/data/vgt-td/ v9999gt td] [http://deviantrus.ifrance.com/topic/tender/ tender] [http://noxuhax.ifrance.com/content/view/bang-olufsen.htm bang olufsen hi fi] [http://oiyaoi.ifrance.com/images/small/sindrome-stendhal/ sindrome stendhal] [http://girlwho-is.ifrance.com/img/styles/poliziotti-a.htm poliziotti a domicilio] [http://toofarfrommaybe.ifrance.com/view/new/scadenza-rimborso/ scadenza rimborso debito] [http://toofarfrommaybe.ifrance.com/view/new/il-generale/ il generale non si arrende] [http://singaporepets.ifrance.com/library/html/que-es.htm que es la definicion] [http://tat-ooin.ifrance.com/resources/articles/storie-a.htm storie a tre] [http://akmokanzen.ifrance.com/images/small/foto-gay.htm foto gay gratis] [http://voltia.ifrance.com/content/view/bolle-bolle.htm bolle bolle] [http://voltia.ifrance.com/content/view/le-situazioni.htm le situazioni di lui e lei] [http://noxuhax.ifrance.com/content/view/finanziamento-guidonia.htm finanziamento guidonia] [http://tat-ooin.ifrance.com/resources/articles/inno-guardia.htm inno guardia di finanza] [http://jdawsona.ifrance.com/data/mouse-wireless/ mouse wireless ottico 5 tasti] [http://demurediablo.ifrance.com/library/html/excel-saga/ excel saga] [http://akmokanzen.ifrance.com/images/small/optio-.htm optio 750 z] [http://yeeden.ifrance.com/img/styles/architetura/ architetura] [http://demurediablo.ifrance.com/library/html/greiner/ greiner] [http://highbulp.ifrance.com/images/small/traghetti-caremar/ traghetti caremar] [http://jdawsona.ifrance.com/data/tablas-las/ tablas, las-] [http://girlwho-is.ifrance.com/img/styles/il-ragazzo.htm il ragazzo che sapeva volare] [http://jdawsona.ifrance.com/data/hotel-ad/ hotel ad assisi] [http://oiyaoi.ifrance.com/images/small/hotels-taormina/ hotels taormina] [http://lordsander.ifrance.com/topic/registratore-in.htm registratore in digitale mp3] [http://akmokanzen.ifrance.com/images/small/asolo.htm asolo] [http://girlwho-is.ifrance.com/img/styles/hd-esterno.htm hd esterno 250 gb] [http://tizolaa.ifrance.com/web/docce-solari/ docce solari e da giardino] [http://igaros.ifrance.com/lib/dds-sony/ dds sony] [http://tizolaa.ifrance.com/web/creative-megaworks/ creative megaworks 2 1 thx] [http://voltia.ifrance.com/content/view/trailer-new.htm trailer new york new york 77] [http://yeeden.ifrance.com/img/styles/giochi-for/ giochi for motorola a835] [http://tat-ooin.ifrance.com/resources/articles/fiamme-sulla.htm fiamme sulla sierra] [http://voltia.ifrance.com/content/view/lettori-mp.htm lettori mp3 irradio] [http://yeeden.ifrance.com/img/styles/najbolji-com/ najbolji com] [http://oiyaoi.ifrance.com/images/small/istruttore-fitness/ istruttore fitness] [http://tat-ooin.ifrance.com/resources/articles/a-colori.htm a3 colori] [http://jdawsona.ifrance.com/data/ricambi-cellulare/ ricambi cellulare nokia] [http://toofarfrommaybe.ifrance.com/view/new/digicom-michelangelo/ digicom michelangelo home 54] [http://jdawsona.ifrance.com/data/passerano-marmorito/ passerano marmorito] [http://highbulp.ifrance.com/images/small/mercedes-classe/ mercedes classe a lunga] [http://akmokanzen.ifrance.com/images/small/video-clip.htm video clip gradis] [http://lordsander.ifrance.com/topic/cd-madredeus.htm cd madredeus] [http://akmokanzen.ifrance.com/images/small/cover-berte.htm cover berte] [http://lovereceier.ifrance.com/lib/shake-zucchero.htm shake zucchero] [http://tizolaa.ifrance.com/web/perlis/ perlis] [http://lordsander.ifrance.com/topic/wwww-bustyadventures.htm wwww bustyadventures com] [http://highbulp.ifrance.com/images/small/max-luglio/ max luglio] [http://jdawsona.ifrance.com/data/home-page/ home page] [http://oiyaoi.ifrance.com/images/small/sagat/ sagat] [http://tizolaa.ifrance.com/web/come-organizzare/ come organizzare un matrimonio particola] [http://igaros.ifrance.com/lib/anal-matura/ anal matura] [http://kalian42.ifrance.com/text/directory/canzoni-d/ canzoni d estate] [http://jdawsona.ifrance.com/data/atlantis-isdn/ atlantis isdn pci] [http://speedofsoun.ifrance.com/text/directory/azincourt.htm azincourt] [http://girlwho-is.ifrance.com/img/styles/software-gestionale.htm software gestionale piccole azienda] [http://singaporepets.ifrance.com/library/html/transformes-energon.htm transformes energon] [http://deviantrus.ifrance.com/topic/tps-viaccess/ tps viaccess] [http://tizolaa.ifrance.com/web/ratchet-e/ ratchet e clank] [http://voltia.ifrance.com/content/view/galp-energia.htm galp energia] [http://tizolaa.ifrance.com/web/bello-brutto/ bello brutto e cattivo] [http://kalian42.ifrance.com/text/directory/x-files/ x files. stagione 4. vol. 04] [http://speedofsoun.ifrance.com/text/directory/bulgari-acqua.htm bulgari acqua] [http://demurediablo.ifrance.com/library/html/immagine-discoteca/ immagine discoteca] [http://toofarfrommaybe.ifrance.com/view/new/hacha/ hacha] [http://speedofsoun.ifrance.com/text/directory/ilusao-otica.htm ilusao otica] [http://highbulp.ifrance.com/images/small/la-figlia/ la figlia del mio capo] [http://kalian42.ifrance.com/text/directory/cats-sexy/ cats sexy] [http://oiyaoi.ifrance.com/images/small/porco-dio/ porco dio ladro] [http://tat-ooin.ifrance.com/resources/articles/martinson-harry.htm martinson, harry] [http://tat-ooin.ifrance.com/resources/articles/gelada.htm gelada]
+
[[Category:Contribute]]
An extension package is a .tgz file containing multiple files which adds a suite of functionality when unpacked in the /opt/eprint3 directory.
+
[[Category:Plugins]]
 +
An extension package is a .tgz file containing multiple files which adds a suite of functionality when unpacked in the /opt/eprint3/archives/ARCHIVE_ID/ directory.
  
 
An extension can be as simple as a plugin plus a css file or add a whole exciting suite of new features.
 
An extension can be as simple as a plugin plus a css file or add a whole exciting suite of new features.
Line 6: Line 7:
 
Things you might want to put into an eprints extension package:
 
Things you might want to put into an eprints extension package:
  
* Plugins: perl_lib/EPrints/Plugin/...
+
* Plugins: archives/ARCHIVE_ID/cfg/plugins/EPrints/Plugin/...
 
* Themes: lib/themes/...
 
* Themes: lib/themes/...
* scripts: bin/...
+
* scripts: archives/ARCHIVE_ID/bin/...
* CGI scripts: cgi/...
+
* CGI scripts: archives/ARCHIVE_ID/cgi/...
* autocompletion scripts: cgi/users/lookup/...
+
* autocompletion scripts: archives/ARCHIVE_ID/cgi/users/lookup/...
* phrase files for use by plugins or scripts: lib/lang/.../phrases/...
+
* phrase files for use by plugins or scripts: archives/ARCHIVE_ID/cfg/lang/.../phrases/...
* images, icons, javascript and css files to support your plugins or scripts: lib/static/...
+
* images, icons, javascript and css files to support your plugins or scripts: archives/ARCHIVE_ID/cfg/static/...
  
 
Other things you might want to include are...
 
Other things you might want to include are...
Line 18: Line 19:
 
* repository specific phrase files
 
* repository specific phrase files
 
* autocompletion data files
 
* autocompletion data files
...but these can't be installed directly as they must go in the repository specific directory: archives/ARCHIVEID/cfg/
 
If you have more than 2 files to go in the archive cfg dir you may consider including a second .tgz file to unpack in archives/ARCHIVEID/cfg/
 
  
 
The handy thing is that plugins are autoloaded, .xml files in the phrases directory are autoloaded and .pl files in the archive cfg.d are autoloaded. So if you want to give your plugin some config options, you could just give a .pl file to copy into the cfg.d/ dir looking something like.
 
The handy thing is that plugins are autoloaded, .xml files in the phrases directory are autoloaded and .pl files in the archive cfg.d are autoloaded. So if you want to give your plugin some config options, you could just give a .pl file to copy into the cfg.d/ dir looking something like.
Line 25: Line 24:
 
  $c->{extension}->{my_cool_extension}->{option_1} = 1;
 
  $c->{extension}->{my_cool_extension}->{option_1} = 1;
 
  $c->{extension}->{my_cool_extension}->{keep_alive} = "always";
 
  $c->{extension}->{my_cool_extension}->{keep_alive} = "always";
 +
 +
And access it in your code like:
 +
 +
$option_1 = $plugin->{reposityory}->conf( "extension", "my_cool_extension", "option_1" )
  
 
etc.
 
etc.
  
 
You could use a shorter path in the $c datastructure, but try and make sure it's distinct to your extension so clashes don't happen.
 
You could use a shorter path in the $c datastructure, but try and make sure it's distinct to your extension so clashes don't happen.
 +
 +
$c->{PreviewPlus_alignment} = "vertical";
 +
 +
and then
 +
 +
$option_1 = $plugin->{reposityory}->conf( "PreviewPlus_alignment" );

Latest revision as of 10:20, 11 February 2010

An extension package is a .tgz file containing multiple files which adds a suite of functionality when unpacked in the /opt/eprint3/archives/ARCHIVE_ID/ directory.

An extension can be as simple as a plugin plus a css file or add a whole exciting suite of new features.

Things you might want to put into an eprints extension package:

  • Plugins: archives/ARCHIVE_ID/cfg/plugins/EPrints/Plugin/...
  • Themes: lib/themes/...
  • scripts: archives/ARCHIVE_ID/bin/...
  • CGI scripts: archives/ARCHIVE_ID/cgi/...
  • autocompletion scripts: archives/ARCHIVE_ID/cgi/users/lookup/...
  • phrase files for use by plugins or scripts: archives/ARCHIVE_ID/cfg/lang/.../phrases/...
  • images, icons, javascript and css files to support your plugins or scripts: archives/ARCHIVE_ID/cfg/static/...

Other things you might want to include are...

  • configuration files
  • repository specific phrase files
  • autocompletion data files

The handy thing is that plugins are autoloaded, .xml files in the phrases directory are autoloaded and .pl files in the archive cfg.d are autoloaded. So if you want to give your plugin some config options, you could just give a .pl file to copy into the cfg.d/ dir looking something like.

$c->{extension}->{my_cool_extension}->{option_1} = 1;
$c->{extension}->{my_cool_extension}->{keep_alive} = "always";

And access it in your code like:

$option_1 = $plugin->{reposityory}->conf( "extension", "my_cool_extension", "option_1" )

etc.

You could use a shorter path in the $c datastructure, but try and make sure it's distinct to your extension so clashes don't happen.

$c->{PreviewPlus_alignment} = "vertical";

and then

$option_1 = $plugin->{reposityory}->conf( "PreviewPlus_alignment" );