/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { $libUrl = absolute_url('plugins/MultimediaDisplay/libraries/mediaelement/build/'); $libUrl = str_replace('admin/', '', $libUrl); queue_js_url($libUrl . 'mediaelement-and-player.min.js'); queue_css_url($libUrl . 'mediaelementplayer.css'); }
public function hookExhibitBuilderPageHead($args) { if (array_key_exists('mosaic', $args['layouts'])) { queue_js_url(url('/plugins/Mosaic/highslide/highslide-full.js')); queue_css_url(url('/plugins/Mosaic/highslide/highslide.css')); queue_js_string("\$ = jQuery"); $graphicsDir = url('/plugins/Mosaic/highslide/graphics/'); queue_js_string("\n jQuery(document).ready(function() {\n hs.graphicsDir ='{$graphicsDir}';\n })\n "); } }
/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { if (is_array($params['url'])) { $liburl = absolute_url('/plugins/MultimediaDisplay/libraries/bookreader/', '', array(), true); $liburl = str_replace('admin/', '', $liburl); queue_js_url('http://www.archive.org/bookreader/jquery-ui-1.8.5.custom.min.js'); queue_js_url('http://www.archive.org/bookreader/dragscrollable.js'); queue_js_url('http://www.archive.org/bookreader/jquery.colorbox-min.js'); queue_js_url('http://www.archive.org/bookreader/jquery.ui.ipad.js'); queue_js_url('http://www.archive.org/bookreader/jquery.bt.min.js'); queue_js_url($liburl . 'BookReader.js'); } }
/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { $liburl = absolute_url('/plugins/MultimediaDisplay/libraries/pdf/', '', array(), true); $liburl = str_replace('admin/', '', $liburl); queue_js_url($liburl . 'src/shared/util.js'); queue_js_url($liburl . 'src/display/api.js'); queue_js_url($liburl . 'src/display/metadata.js'); queue_js_url($liburl . 'src/display/canvas.js'); queue_js_url($liburl . 'src/display/webgl.js'); queue_js_url($liburl . 'src/display/pattern_helper.js'); queue_js_url($liburl . 'src/display/font_loader.js'); queue_js_url($liburl . 'src/display/annotation_helper.js'); queue_js_string('PDFJS.workerSrc = \'' . $liburl . 'src/worker_loader.js\';'); queue_js_string('pdfFile = \'' . $params['url'][0]['url'] . '\';'); queue_js_url($liburl . 'displayPDF.js'); }
public function hookInitialize() { $db = get_db(); // get all the settings in the system $sql = "SELECT e.id, IF(length(item_type.name), 'Item Type Metadata', set.name) AS set_name, e.name, e.description, e.order, s.*\n FROM `{$db->Elements}` e\n INNER JOIN {$db->prefix}element_administration_settings s ON s.id = e.id\n INNER JOIN `{$db->ElementSets}` `set` ON set.id = e.element_set_id\n LEFT JOIN {$db->prefix}item_types_elements type_element ON type_element.element_id = e.id\n LEFT JOIN {$db->prefix}item_types item_type ON item_type.id = type_element.item_type_id"; $result = $db->query($sql); // add a per-element filter for every element that has a setting defined by this plugin while ($setting = $result->fetchObject()) { $this->_settings[$setting->id][$setting->collection_id] = $setting; add_filter(array('ElementForm', 'Item', $setting->set_name, $setting->name), array($this, 'addAdminFormSettings')); add_filter(array('ElementInput', 'Item', $setting->set_name, $setting->name), array($this, 'addAdminInputSettings')); } // if this is the admin edit form // add some javascript so client-side events (e.g. selecting a collection) // trigger the correct settings from the plugin if (strpos($_SERVER['REQUEST_URI'], '/admin/items/') !== FALSE) { queue_js_string('if (!Omeka) {var Omeka = {};}Omeka.element_administration = ' . json_encode($this->_settings) . ';'); queue_js_url(url('plugins/ElementAdministration/views/admin/javascripts/items.js')); } }
// Builds query string appended to requests for Bootstrap CSS. $theme_query = http_build_query(array('brand-primary' => '#ff7300', 'headings-font-family' => "Georgia,'Times New Roman',serif"), '', '&'); // Defines style settings for the theme. $theme_style = array('logo' => array('header' => '<img width="300" height="124" class="logo-header"' . ' src="' . img('logo/ccam.png') . '"' . ' alt="' . __('Cochrane Cunningham Archive & Museum') . '">', 'navbar' => false, 'footer' => '<img width="190" height="50" class="logo-footer"' . ' src="https://lib.bgsu.edu/assets/img/ul-white.svg"' . ' alt="' . __('BGSU University Libraries') . '">'), 'home' => array('header' => false, 'navbar' => false, 'footer' => false), 'search' => false, 'navbar' => true, 'footer' => true, 'item' => array('browse' => array('sort' => array('Dublin Core,Title' => __('Title'), 'added' => __('Date Added')), 'picture' => true, 'elements' => false, 'description' => true, 'tags' => __('Tags:')), 'show' => array('pictures' => __('Files'), 'elements' => true, 'files' => false, 'collection' => false, 'tags' => __('Tags'), 'citation' => __('Citation')))); // Make changes to theme if displayed as part of a collection or exhibit. if (!empty($exhibit)) { // Change home to exhibit homepage. $theme_style['home']['header'] = record_url($exhibit); // Change navigation to top pages of the exhibit. $theme_style['navbar'] = __DIR__ . '/../nav/exhibit-pages.php'; } elseif (!empty($collection)) { // Change home to collection homepage. $theme_style['home']['header'] = record_url($collection); // Change navbar to link to ways of viewing collection. $theme_style['navbar'] = __DIR__ . '/../nav/items.php'; // Change page search to search across collection. $theme_style['search'] = array('collection' => $collection->id); } // Load Bootstrap and Bootstrap theme files with appropriate variables. queue_css_url('https://lib.bgsu.edu/assets/theme/bootstrap.css?' . $theme_query); queue_css_url('https://lib.bgsu.edu/assets/theme/bootstrap-theme.css?' . $theme_query); // Load main CSS file for the theme. queue_css_file('theme'); // Load CSS file for this style. queue_css_file('style/ccam'); // Load Javascript files for Bootstrap and the theme. queue_js_url('https://lib.bgsu.edu/assets/js/bootstrap.js'); queue_js_file('theme'); // Return style information. return $theme_style;
?> " sizes="16x16" /> <!-- Stylesheets --> <?php queue_css_file('main'); queue_css_file('lib/bootstrap.min'); queue_css_file('lib/slick'); queue_css_file('lib/lightGallery'); queue_css_file('font-awesome/css/font-awesome.min'); echo head_css(); ?> <!-- Scripts --> <?php queue_js_url('http://code.jquery.com/jquery-1.11.0.min.js'); queue_js_file('lib/bootstrap.min'); queue_js_file('lib/slick.min'); queue_js_file('lib/lightGallery.min'); queue_js_file('app'); echo head_js(); ?> <style> header { <?php if (get_theme_option('Theme: Background')) { ?> background-image: url('<?php echo url('/'); ?>
/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { $libUrl = absolute_url('plugins/MultimediaDisplay/libraries/openseadragon/'); $libUrl = str_replace('admin/', '', $libUrl); queue_js_url($libUrl . 'openseadragon.min.js'); }
/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { $liburl = absolute_url('/plugins/MultimediaDisplay/libraries/mirador/'); $liburl = str_replace('admin/', '', $liburl); queue_js_url($liburl . 'mirador.js'); }
?> <?php echo auto_discovery_link_tags(); ?> <?php fire_plugin_hook('public_head', array('view' => $this)); ?> <?php queue_css_url('https://lib.bgsu.edu/assets/css/font-awesome.css'); queue_css_url('https://lib.bgsu.edu/assets/css/photoswipe.css'); queue_css_url('https://lib.bgsu.edu/assets/css/photoswipe/default-skin.css'); queue_js_url('https://lib.bgsu.edu/assets/js/photoswipe.js'); queue_js_url('https://lib.bgsu.edu/assets/js/photoswipe-ui-default.js'); queue_js_url('https://lib.bgsu.edu/assets/js/typogr.js'); $style = (include __DIR__ . '/../style/' . get_theme_option('style') . '.php'); echo head_css(); echo head_js(); ?> </head> <?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?> <a href="#content" id="skipnav" class="sr-only sr-only-focusable"><?php echo __('Skip to main content'); ?> </a> <?php fire_plugin_hook('public_body', array('view' => $this)); ?>
<?php //<!-- LiquidSlider scripts with items/show --> queue_css_url(WEB_ROOT . '/themes/seasons-ahp/liquidslider/css/liquid-slider.css'); queue_js_url(WEB_ROOT . '/themes/seasons-ahp/javascripts/jquery/1.9.1/jquery.min.js'); queue_js_url(WEB_ROOT . '/themes/seasons-ahp/liquidslider/js/jquery.easing.1.3.js'); queue_js_url(WEB_ROOT . '/themes/seasons-ahp/liquidslider/js/jquery.touchSwipe.min.js'); queue_js_url(WEB_ROOT . '/themes/seasons-ahp/liquidslider/js/jquery.liquid-slider.min.js'); $js = "\n\t\t\$(function(){\n /* Here is the slider using default settings */\n \$('#slider-id').liquidSlider();\n /* If you want to adjust the settings, you set an option\n as follows:\n \$('#slider-id').liquidSlider({\n autoSlide:false,\n autoHeight:false\n });\n\n Find more options at http://liquidslider.kevinbatdorf.com/\n */\n /* If you need to access the internal property or methods, use this:\n var sliderObject = \$.data( \$('#slider-id')[0], 'liquidSlider');\n console.log(sliderObject);\n */\n });\n"; queue_js_string($js); echo head(array('title' => metadata('item', array('Dublin Core', 'Title')), 'bodyclass' => 'items show')); ?> <h1><?php echo metadata('item', array('Dublin Core', 'Title')); ?> </h1> <!-- Liquid Slider Begins Here--> <?php if (get_theme_option('Item FileGallery') == 0 && metadata('item', 'has files')) { $attrs = array('wrapper' => array('id' => 'slider-id', 'class' => 'liquid-slider')); echo custom_item_image_gallery($attrs); } ?> <!-- Liquid Slider Ends Here --> <div id="primary"> <?php echo all_element_texts('item'); ?>
/** * Queue header scripts * * Queues script libraries and stylesheets to include in header * * @return null */ public function viewerHead($params) { $libDir = dirname(dirname(dirname(__FILE__))) . '/libraries/ohmsviewer/'; $config = parse_ini_file($libDir . "config/config.ini", true); if (empty($params['cacheFileName'])) { throw new Exception('Item cannot be displayed. No cache file specified for Ohms Viewer.'); return; } $cachefile = is_array($params['cacheFileName']) ? $params['cacheFileName'][0] : $params['cacheFileName']; require_once $libDir . 'lib/CacheFile.class.php'; $liburl = absolute_url('/plugins/MultimediaDisplay/libraries/ohmsviewer/'); $liburl = str_replace('admin/', '', $liburl); $cssurl = $liburl . 'css/'; $jsurl = $liburl . 'js/'; //queue_css_url($cssurl.$config['css']); queue_css_url($cssurl . 'viewer.css'); queue_css_url($cssurl . 'jquery-ui.toggleSwitch.css'); queue_css_url($cssurl . 'jquery-ui-1.8.16.custom.css'); queue_css_url($cssurl . 'font-awesome.css'); queue_css_url($cssurl . 'jquery.fancybox.css'); queue_css_url($cssurl . 'jquery.fancybox-buttons.css'); queue_css_url($cssurl . 'jquery.fancybox-thumbs.css'); queue_css_url($cssurl . 'jplayer.blue.monday.css'); queue_js_url('//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js'); queue_js_url($jsurl . 'jquery-ui.toggleSwitch.js'); queue_js_url($jsurl . 'viewer_legacy.js'); queue_js_url($jsurl . 'jquery.jplayer.min.js'); queue_js_url($jsurl . 'jquery.easing.1.3.js'); queue_js_url($jsurl . 'jquery.scrollTo-min.js'); queue_js_url($jsurl . 'fancybox_2_1_5/source/jquery.fancybox.pack.js'); queue_js_url($jsurl . 'fancybox_2_1_5/source/helpers/jquery.fancybox-buttons.js'); queue_js_url($jsurl . 'fancybox_2_1_5/source/helpers/jquery.fancybox-media.js'); queue_js_url($jsurl . 'fancybox_2_1_5/source/helpers/jquery.fancybox-thumbs.js'); }
/** * Add a local JavaScript file or files to the current page. * * All scripts will be included in the page's head. This needs to be * called either before head(), or in a plugin_header hook. * * @package Omeka\Function\View\Asset * @see head_js() * @param string|array $file File to use, if an array is passed, each array * member will be treated like a file. * @param string $dir Directory to search for the file. Keeping the default is * recommended. * @param array $options An array of options. */ function queue_js_file($file, $dir = 'javascripts', $options = array()) { if (is_array($file)) { foreach ($file as $singleFile) { queue_js_file($singleFile, $dir, $options); } return; } queue_js_url(src($file, $dir, 'js'), $options); }
<?php queue_js_url('https://lib.bgsu.edu/assets/js/masonry.pkgd.js'); $featuredDisplay = get_theme_option('featured'); if ($featuredDisplay != 'disabled') { $featuredItems = get_records('Item', array('collection' => $collection->id, 'featured' => true, 'hasImage' => true, 'sort_field' => 'random')); } $pageTitle = metadata('collection', array('Dublin Core', 'Title')); echo head(array('title' => $pageTitle, 'bodyclass' => 'collections show', 'collection' => $collection)); ?> <?php if ($featuredItems && $featuredDisplay == 'carousel') { ?> <div class="featured-carousel"> <div class="featured-carousel-display"> <ul> <?php foreach (loop('items', $featuredItems) as $item) { ?> <?php if ($file = $item->getFile(0)) { ?> <li style="background:url(<?php echo $file->getWebPath('fullsize'); ?> )"> <a href="<?php echo record_url($item, 'show'); ?> ">
public function hookPublicHead($args) { queue_css_file('geolocation-aux'); queue_css_file('geolocation-items-map'); queue_css_file('jquery-ui'); $key = urlencode(get_option('geolocation_google_api_key')); if ($key) { $key = "key=" . $key . "&"; } queue_js_url("https://maps.google.com/maps/api/js?" . $key . "language=" . get_html_lang()); # sensor=false& queue_js_file('map'); }
public function hookPublicHead($args) { queue_css_file('geolocation-marker'); queue_js_url("//maps.google.com/maps/api/js?sensor=false"); queue_js_file('map'); }
public function hookPublicHead($args) { queue_js_url("//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"); queue_css_url('//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css'); queue_css_file('geolocation-marker'); queue_js_file('map'); }
<?php queue_js_url("http://maps.google.com/maps/api/js?sensor=false"); queue_js_file('map'); // Modifier le css de la carte $css = "\n #map_browse {\n height: 800px;\n }\n .balloon {width:400px !important; font-size:1.2em;}\n .balloon .title {font-weight:bold;margin-bottom:1.5em;}\n .balloon .title, .balloon .description {float:left; width: 220px;margin-bottom:1.5em;}\n .balloon img {float:right;display:block;}\n .balloon .view-item {display:block; float:left; clear:left; font-weight:bold; text-decoration:none;}\n #map-links a {\n display:block;\n }\n #search_block {\n clear: both;\n }\n\t\t\t\t\t\t#content{padding-left:3%;padding-right:3%;}\n\t\t\t\t\t\t.night a:link, .night a:visited{color:grey;}\n "; queue_css_string($css); echo head(array('title' => __('Browse Map'), 'bodyid' => 'map', 'bodyclass' => 'browse')); ?> <div id="map_block"> <h2 style="margin-bottom:0"><?php echo __('Parcourir la carte'); ?> (<?php echo $totalItems; ?> <?php echo __('total'); ?> )</h2> <?php echo $this->googleMap('map_browse', array('loadKml' => true, 'list' => 'map-links')); ?> </div><!-- end map_block --> <div class="pagination" style="margin:0;padding:0;"> <?php
?> <?php queue_css_file('results'); ?> <?php queue_js_file('moment'); queue_js_file('jquery.daterangepicker'); queue_js_string('var search_url = "' . url("solr-search") . '"; var autocompleteChoicesUrl = ' . js_escape(url('solr-search/results/autocomplete')) . ';'); queue_js_file('searchformfunctions'); $key = get_option('geolocation_gmaps_key'); // ? get_option('geolocation_gmaps_key') : 'AIzaSyD6zj4P4YxltcYJZsRVUvTqG_bT1nny30o'; $lang = "nl"; queue_js_url("https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key={$key}&language={$lang}"); echo head(array('title' => __('Solr Search'))); ?> <script type="text/javascript" charset="utf-8"> //<![CDATA[ //]]> </script> <h1><?php echo __('Search the Collection'); ?> </h1> <style>
<!-- Plugin Stuff --> <?php fire_plugin_hook('public_head', array('view' => $this)); ?> <!-- Stylesheets --> <?php queue_css_url('//fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic|Cardo:400,400italic,700'); queue_css_file('screen', 'screen'); queue_css_file('bootstrap.min', 'all'); echo head_css(); ?> <!-- JavaScripts --> <?php queue_js_url('//code.jquery.com/jquery-2.1.4.min.js'); queue_js_file('globals'); queue_js_file('global'); queue_js_file('masonry.pkgd'); queue_js_file('imagesloaded.pkgd'); echo head_js(); ?> </head> <?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?> <input type="checkbox" id="nav-drawer-toggle" class="checkbox-hidden"> <label class="nav-drawer-shade" for="nav-drawer-toggle" onclick></label>