This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is an example single item API response, using the Image_Payload in this repo as a starting point. | |
* | |
* It merges how IIIf files and manifests are handled. | |
* | |
* It also includes simplified variations of the element names from XML. I think they align closely | |
* enough with the XML version to be recognizable without losing semantics, at least for what CERES | |
* needs. | |
* | |
* Elements below query and result are optional, unless otherwise noted (or if I don't get an HTTP 200 response, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* First passes as possible API query and response structures | |
* for various Northeastern Library DH projects | |
* | |
* | |
* | |
*/ | |
// Work / Item data | |
// /item/{id} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I've seen code for building WP blocks with JS like this | |
( function( blocks, editor, i18n, element) { | |
var el = element.createElement; | |
var __ = i18n.__; | |
var RichText = editor.RichText; | |
// do block things | |
}( | |
window.wp.blocks, | |
window.wp.editor, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Save all this to wherever (copy-paste from the Raw code should work), the open it in a browser. | |
If there are problems, I'll move it to a real GitHub repo for issue reporting. | |
(It's had minimal testing) | |
--> | |
<html> | |
<head> | |
<script type='text/javascript'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": "http://iiif.io/api/presentation/2/context.json", | |
"@id": "https://data.ucd.ie/api/img/manifests/ivrla:7173", | |
"rendering": { | |
"@id": "https://digital.ucd.ie/get/ivrla:7173/content", | |
"format": "application/pdf", | |
"label": "Download as PDF" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EmbargoAclAssertion implements Zend_Acl_Assert_Interface | |
{ | |
public function assert( | |
Zend_Acl $acl, | |
Zend_Acl_Role_Interface $role = null, | |
Zend_Acl_Resource_Interface $resource = null, | |
$privilege = null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet | |
xmlns:a="http://www.loc.gov/standards/alto/ns-v2#" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
version="1.0" | |
> | |
<xsl:output method="text"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="/"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo metadata('collection', array('Dublin Core', 'Description')); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_plugin_hook('define_acl', 'deny_contributors_define_acl'); | |
function deny_contributors_define_acl($args) | |
{ | |
$acl = $args['acl']; | |
$acl->deny('contributor','Collections', array('add', 'delete-confirm', 'editSelf', | |
'deleteSelf', 'showSelfNotPublic')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RequiredMetadataPlugin extends Omeka_Plugin_AbstractPlugin | |
{ | |
protected $_hooks = array('before_save_item'); | |
protected $_filters = array( | |
'itemTitleLengthValidator' => array('Validate', 'Item', 'Dublin Core', 'Title'), | |
); | |
public function hookBeforeSaveItem($args) |
NewerOlder