coldtrick / publications
This plugin provides functionality for users to share their publications
Fund package maintenance!
ColdTrick
www.paypal.me/ColdTrick
Requires
- composer/installers: ^1.0.8
Requires (Dev)
- coldtrick/sniffs: dev-master
This package is auto-updated.
Last update: 2020-11-07 22:45:20 UTC
README
This plugin provides functionality for users to share their publications.
Upgraded for 1.8 by ColdTrick IT Solutions
Custom publication types
It's possible to add a custom set of inputs to a publication. This can be done by eighter extending/overwriting the existing types or by registering a new type.
Registering a new custom type
The plugin hook register:types
, publications
allows you to add a new custom type. The new type will be listed on the form with the language key
publications:type:<your new type>
if defined (otherwise it's just the new name).
Inputs for your custom type
If you've registered a new type and the user selects it, the view publications/publication/edit/<your new type>
will be called.
When editing an existing publication the view gets the publication in $vars['entity']
.
Input validation
In the save action a plugin hook input_validation:<your new type>
, publications
will be triggered. If you return false
the user
will be send back to the add/edit form. In order to help the user with what went wrong, please use register_error()
Input saving
If you name your input fields data[somename]
this will automaticly be saved with the publication under $entity->somename
.
If for some reason your data can't be set in this way (or you wish to manipulate the data) an event save:data
, publications
will be triggered
for which the third variable will contain the current publication.
Output your data
When the publication is viewed you can add your custom data by providing a view publications/publication/view/<your new type>
. This view needs to
output table rows in a two (2) column table.
Todo
- Improve bibtex import/export actions
- Reenable invite functionality
- Scan language file for unused or duplicate entries
- sticky form for publication/add
- combine add and edit action into one action
Original Credits
- This plugin is created as part of Geochronos, a CANARIE and Cybera Inc funded Network Enabled Platform (NEP) project.
- This plugin reused and repurpose base code from the Blog, Invitefriends and Embed Elgg Core plugins and the BibTexParse library