Add support for social network ORCID in personal
Add support for social network ORCID in personal
Requirements
Descriptive title for this enhancement
Too few social network , unable to add more social network
Actual behavior
In personal tab , we couldn't add more social network like Researchgate, QQ, github ...
Expected behavior
It seems more useful to be able to add more social network trough the interface
Benefits
By this way, we could add more social network
Link issues together to show that they're related. Learn more.
Activity
- Reporter
This is because for each social network there is a function to validate the info and to build the link to the profile. You can add support for other social networks by creating classes named socialHandler_networkName and inheriting socialHandler. Put them anywhere in FD tree and run fusiondirectory-setup --update-cache. Basic example would be:
<?php class socialHandler_github extends socialHandler { static function getName() { return _('Github'); } protected $baseurl = 'https://github.com'; }
We could try to add options for this in the config but that would be limited or take lots of options for each network.
Edited by Côme Chilliet - Côme Chilliet added 15m of time spent
added 15m of time spent
- bmortier changed the description
changed the description
- Author Reporter
OK finally It is simple.(I haven't enough knowledge to patch and submit)
So this the code for integrate ORCID : https://orcid.org to integrate into class_socialHandlers.inc file
class socialHandler_orcid extends socialHandler { static function getName() { return _('Orcid'); } protected $baseurl = 'https://orcid.org'; function linkify($value) { return $this->link($this->baseurl.'/'.$value, $value); } function validate($value) { if (!preg_match('/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}/',$value)){ throw new socialHandlerInvalidValueException(_('ORCID accounts must look like XXXX-XXXX-XXXX-XXXX with X is only number')); } return $value; } }
- bmortier added enhancement label
added enhancement label
- Côme Chilliet created branch
5733-there-is-more-than-5-social-network
created branch
5733-there-is-more-than-5-social-network
- Côme Chilliet mentioned in commit 0134b100
mentioned in commit 0134b100
- Côme Chilliet closed
closed
- Côme Chilliet added 30m of time spent at 2018-01-31
added 30m of time spent at 2018-01-31
- bmortier added PJ1802-0188 label
added PJ1802-0188 label
- Côme Chilliet changed title from there is more than 5 social network ... to Add support for social network ORCID in personal
changed title from there is more than 5 social network ... to Add support for social network ORCID in personal
- Author Reporter
there is an dedicated field now : edupersonorcid https://www.switch.ch/fr/aai/support/documents/attributes/edupersonorcid/index.html could your take care of it in supann2018 release ? check internet2 schema too ?
- bmortier changed milestone to %FusionDirectory 1.4
changed milestone to %FusionDirectory 1.4
- bmortier changed milestone to %FusionDirectory 1.3
changed milestone to %FusionDirectory 1.3
- bmortier added 5m of time spent at 2019-02-22
added 5m of time spent at 2019-02-22