public function itemGoogleMap($item = null, $width = '200px', $height = '200px', $hasBalloonForMarker = false, $markerHtmlClassName = 'geolocation_balloon') { $divId = "item-map-{$item->id}"; $location = get_db()->getTable('Location')->findLocationByItem($item, true); // Only set the center of the map if this item actually has a location // associated with it if ($location) { $center['latitude'] = $location->latitude; $center['longitude'] = $location->longitude; $center['zoomLevel'] = $location->zoom_level; $center['show'] = true; if ($hasBalloonForMarker) { $titleLink = link_to_item(metadata($item, array('Dublin Core', 'Title'), array(), $item), array(), 'show', $item); $thumbnailLink = !item_image('thumbnail') ? '' : link_to_item(item_image('thumbnail', array(), 0, $item), array(), 'show', $item); $description = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 150), $item); $center['markerHtml'] = '<div class="' . $markerHtmlClassName . '">' . '<div class="geolocation_balloon_title">' . $titleLink . '</div>' . '<div class="geolocation_balloon_thumbnail">' . $thumbnailLink . '</div>' . '<p class="geolocation_balloon_description">' . $description . '</p></div>'; } $options = array(); $options['mapType'] = get_option('geolocation_map_type'); $center = js_escape($center); $options = js_escape($options); $style = "width: {$width}; height: {$height}"; $html = '<div id="' . $divId . '" class="map geolocation-map" style="' . $style . '"></div>'; $js = "var " . Inflector::variablize($divId) . ";"; $js .= "OmekaMapSingle = new OmekaMapSingle(" . js_escape($divId) . ", {$center}, {$options}); "; $html .= "<script type='text/javascript'>{$js}</script>"; } else { $html = '<p class="map-notification">' . __('This item has no location info associated with it.') . '</p>'; } return $html; }
function rhythm_display_random_featured_item_squarethumb() { $featuredItems = get_random_featured_items(1); $featuredItem = $featuredItems[0]; $html = '<h2>Featured <span class="type-featured">Item</span></h2>'; if ($featuredItem) { set_current_record('item', $featuredItem); // Needed for transparent access of item metadata. if (metadata('item', 'has thumbnail')) { $html .= link_to_item(item_square_thumbnail(), array('class' => 'image')); } // Grab the 1st Dublin Core description field (first 150 characters) $itemDescription = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150)); $html .= '<p><span class="title">' . link_to_item() . '</span> ' . $itemDescription . '</p>'; } else { $html .= '<p>No featured items are available.</p>'; } return $html; }
</div> <div id="file-type-os" class="element"> <h3><?php echo __('File Type / OS'); ?> </h3> <div class="element-text"><?php echo metadata('file', 'Type OS'); ?> </div> </div> </div><!-- end type-metadata --> </div><!-- end file-metadata --> <hr> <?php echo link_to_item('<i class="icon-chevron-left"></i> ' . __('This file appears in') . ': <em><strong>' . $title . '</strong></em>', array('class' => 'file-appears-in-item'), 'show', $record); ?> <hr> </div><!-- end primary --> <div id="page-col-right"> <aside id="page-sidebar"> <!-- Grab some recent images for the image tile montage --> <?php mh_display_recent_item(10); ?> </aside>
<?php if (item_has_thumbnail()) { ?> <div class="item-img"> <?php echo link_to_item(item_square_thumbnail(array('alt' => item('Dublin Core', 'Title'), 'width' => '70', 'height' => '70'))); ?> </div> <?php } ?> </td> <td><div style="font-size: 1.1em;"><?php echo link_to_item(item('Dublin Core', 'Title'), array('class' => 'permalink', 'title' => $shortdesc)); ?> </div></td> <td> <?php if ($creator = item('Dublin Core', 'Creator', array('all' => 'true'))) { ?> <?php foreach ($creator as $inst) { ?> <div style="font-size: 1.1em;"><?php echo metadata_browser_create_link(metadata_browser_get_element_id("Creator"), $inst); ?> </div>
<?php if (metadata('item', 'has thumbnail')) { ?> <?php echo link_to_item(item_image('square_thumbnail'), array('class' => 'image')); ?> <?php } ?> <?php if ($desc = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150))) { ?> <p class="item-description"><?php echo $desc; echo link_to_item('see more', array('class' => 'show')); ?> </p> <?php } ?> </div> <?php } ?> <?php } else { ?>
echo $creator; ?> ; <?php } ?> <?php if ($date = metadata('item', array('Dublin Core', 'Date'), array('snippet' => 250))) { ?> <?php echo $date; ?> ; <?php } ?> <?php echo link_to_item('Détail', array('class' => 'permalink')); ?> </li> <?php } ?> </ul> <?php } ?> </div> <?php echo foot();
?> <?php foreach (loop('items', $collectionItems) as $item) { ?> <h3><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title')), array('class' => 'permalink'), 'show', $item); ?> </h3> <?php if (metadata($item, 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title'))))); ?> </div> <?php } ?> <?php if ($text = metadata($item, array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
?> ]]></name> <namewithlink><![CDATA[<?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'view-item')); ?> ]]></namewithlink> <Snippet maxLines="2"><![CDATA[<?php echo metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150)); ?> ]]></Snippet> <description><![CDATA[<?php // @since 3/26/08: movies do not display properly on the map in IE6, // so can't use display_files(). Description field contains the HTML // for displaying the first file (if possible). if (metadata($item, 'has thumbnail')) { echo link_to_item(item_image('thumbnail'), array('class' => 'view-item')); } ?> ]]></description> <Point> <coordinates><?php echo $location['longitude']; ?> ,<?php echo $location['latitude']; ?> </coordinates> </Point> <?php if ($location['address']) { ?>
<?php if (metadata('collection', 'Total Items') > 0) { ?> <h2><?php echo __('Recently Added Items'); ?> </h2> <ul class="recent-items"> <?php foreach (loop('items') as $item) { ?> <li><span class="date"><?php echo format_date(metadata('item', 'Added')); ?> </span><span class="title"> <?php echo link_to_item(); ?> </span></li> <?php } ?> </ul> <?php } ?> <?php fire_plugin_hook('admin_collections_show', array('collection' => $collection, 'view' => $this)); ?> </section>
?> </h2> <?php set_loop_records('items', get_recent_items(5)); foreach (loop('items') as $item) { ?> <div class="recent-row"> <p class="recent"><?php echo link_to_item(); ?> </p> <?php if (is_allowed($item, 'edit')) { ?> <p class="dash-edit"><?php echo link_to_item(__('Edit'), array(), 'edit'); ?> </p> <?php } ?> </div> <?php } ?> <?php if (is_allowed('Items', 'add')) { ?> <div class="add-new-link"><p><a class="add-new-link" href="<?php echo html_escape(url('items/add')); ?>
<td class="item-meta"> <h3><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title'), array('class' => 'permalink'))); ?> </h3> <?php if (metadata($item, 'has thumbnail')) { ?> <span class="feature"><?php echo __('Image Available'); ?> </span> <div class="item-img"> <?php echo link_to_item(item_image('thumbnail')); ?> </div> <?php } ?> <?php if ($text = metadata($item, array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
</h2> <?php if ($item_type->Items != null) { ?> <ul> <?php set_loop_records('items', $item_type->Items); ?> <?php foreach (loop('items') as $item) { ?> <li><span class="date"><?php echo format_date(metadata('item', 'Added')); ?> </span> <?php echo link_to_item('<span class="title">' . metadata('item', array('Dublin Core', 'Title')) . '</span>'); ?> </li> <?php } ?> </ul> <?php } else { ?> <p><?php echo __('There are no recently added items.'); ?> </p> <?php }
<?php if ($text = metadata('item', array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div> <?php } elseif ($description = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 250))) { ?> <div class="item-description caption"> <h3><?php echo link_to_item($itemTitle, array('class' => 'permalink')); ?> </h3> <?php echo $description; ?> </div> <?php } ?> </div> </div> <?php } ?> <?php
?> ]]></name> <namewithlink><![CDATA[<?php echo link_to_item(item('Dublin Core', 'Title'), array('class' => 'view-item')); ?> ]]></namewithlink> <Snippet maxLines="2"><![CDATA[<?php echo item('Dublin Core', 'Description', array('snippet' => 150)); ?> ]]></Snippet> <description><![CDATA[<?php // @since 3/26/08: movies do not display properly on the map in IE6, // so can't use display_files(). Description field contains the HTML // for displaying the first file (if possible). if (item_has_thumbnail($item)) { echo link_to_item(item_thumbnail(), array('class' => 'view-item')); } ?> ]]></description> <Point> <coordinates><?php echo $location['longitude']; ?> ,<?php echo $location['latitude']; ?> </coordinates> </Point> <?php if ($location['address']) { ?>
br.buildInfoDiv = function(jInfoDiv) { // $$$ it might make more sense to have a URL on openlibrary.org that returns this info var escapedTitle = BookReader.util.escapeHTML(this.bookTitle); var domainRe = /(\w+\.(com|org))/; var domainMatch = domainRe.exec(this.bookUrl); var domain = this.bookUrl; if (domainMatch) { domain = domainMatch[1]; } // $$$ cover looks weird before it loads jInfoDiv.find('.BRfloatCover').append([ '<div style="height: 140px; min-width: 80px; padding: 0; margin: 0;">', <?php echo json_encode(link_to_item($bookreader->itemCover())); ?> , '</div>' ].join('')); jInfoDiv.find('.BRfloatMeta').append([ '<h3><?php echo html_escape(__('Other Formats')); ?> </h3>', '<ul class="links">', '<?php echo $bookreader->linksToNonImages(); ?> ',
<div class="pagination top"><?php echo pagination_links(); ?> </div> <?php $index = 1; // set index to one so we can use zero as an argument below $showImgNum = 3; // show this many images on the browse results page; used for slider on mobile devices foreach (loop('Items') as $item) { $description = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 250)); $tags = tag_string(get_current_record('item'), url('items/browse')); $thumblink = link_to_item(item_image('square_thumbnail')); $titlelink = link_to_item(metadata($item, array('Dublin Core', 'Title')), array('class' => 'permalink')); ?> <article class="item-result" id="item-result-<?php echo $index; ?> "> <h3><?php echo $titlelink; ?> </h3> <?php if (metadata($item, 'has thumbnail') && mh_reducepayload($index, $showImgNum)) { ?> <div class="item-thumb">
<?php echo head(array('bodyid' => 'home', 'bodyclass' => 'two-col')); ?> <div id="primary"> <?php if ($item = get_random_hero_shot()) { ?> <div id="hero-shot" class="hero-shot"> <div> <?php echo link_to_item(item_image('fullsize', array(), 0, $item), array(), 'show', $item); ?> </div> <p class="caption"><?php echo metadata($item, array('Dublin Core', 'Title')); ?> </p> </div> <?php } ?> <?php if ($homepageText = get_theme_option('Homepage Text')) { ?> <div class="homepage-text"><?php echo $homepageText; ?> </div> <?php }
<div id="harvester-duplicates" class="panel"> <h4>Duplicate Harvested Items</h4> <ul> <?php foreach ($items as $item) { ?> <li> <?php echo link_to_item('Item #' . $item->id, array(), 'show', $item); ?> </li> <?php release_object($item); } ?> </ul> </div>
<div id="harvester-duplicates" class="panel"> <h4><?php echo __('Duplicate Harvested Items'); ?> </h4> <ul> <?php foreach ($items as $item) { ?> <li> <?php echo link_to_item(__('Item #%s', $item->id), array(), 'show', $item); ?> </li> <?php release_object($item); } ?> </ul> </div>
?> <?php $itemTitle = strip_formatting(metadata('item', array('Dublin Core', 'Title'))); ?> <div class="item hentry"> <h3><?php echo link_to_item($itemTitle, array('class' => 'permalink')); ?> </h3> <?php if (metadata('item', 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => $itemTitle))); ?> </div> <?php } ?> <?php if ($text = metadata('item', array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
public function append($args) { ?> <?php if (get_option('jwplayer_external_control')) { ?> <?php if (metadata('item', array('Streaming Video', 'Segment Start'))) { ?> <div id="vid_player"> <div id="jwplayer_plugin">Player failed to load... </div> <div id="vidcontrols"> <ul class="vidControlsLayout" style="width='<?php echo get_option("jwplayer_width_public"); ?> '"> <li id="start_img"><img src="<?php echo img('pause.png'); ?> " title="Start/Stop" class="btnPlay"/></li> <li id="playback-display"><span class="current">0:00:00</span></li> <li class="progressBar"></li> <li id="slider-display"><span class="duration">0:00:00</span> </li> <li id="vol_img"><img class="muted" src="<?php echo img('volume_speaker.png'); ?> " /></a></li> <li class="volumeBar"></li> </ul> </div> <script type="text/javascript"> var is_play = true; var startTime= calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> "); var endTime = calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> "); jwplayer("jwplayer_plugin").setup({ playlist: [{ sources: [ <?php if (get_option('jwplayer_hls_streaming')) { ?> { file: '<?php echo metadata('item', array("Streaming Video", "HLS Streaming Directory")); echo metadata('item', array("Streaming Video", "HLS Video Filename")); ?> ' }, <?php } ?> <?php if (get_option('jwplayer_flash_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "Video Streaming URL")); echo metadata("item", array("Streaming Video", "Video Type")); echo metadata('item', array("Streaming Video", "Video Filename")); ?> '} , <?php } ?> <?php if (get_option('jwplayer_http_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "HTTP Streaming Directory")); echo metadata("item", array("Streaming Video", "HTTP Video Filename")); ?> '}, <?php } ?> ] } ], <?php if (get_option('jwplayer_flash_primary')) { ?> primary: "flash", <?php } ?> autostart: false, controls: false, width: "100%", height: "<?php echo get_option('jwplayer_height_public'); ?> ", } ); jwplayer("jwplayer_plugin").onReady(function(){ jQuery('.current').text(getFormattedTimeString(startTime)); jQuery('.duration').text(getFormattedTimeString(endTime)); jwplayer("jwplayer_plugin").seek(startTime); <?php if (get_option('jwplayer_autostart') == 0) { ?> jwplayer("jwplayer_plugin").pause(); <?php } ?> } ); jQuery( ".progressBar" ).slider( { min: startTime, max: endTime, range: "max", slide: function(event, ui) { jwplayer().seek(ui.value); }, change: function(event,ui){ if (jwplayer().getPosition() > endTime){ jwplayer().seek(startTime); } } }); jQuery( ".volumeBar" ).slider( { min: 0, max: 100, range: "max", slide: function(event, ui) { jwplayer().setVolume(ui.value); }, change: function(event,ui){ jwplayer().setVolume(ui.value); } }); jwplayer("jwplayer_plugin").onTime(function(event){ jQuery(".progressBar").slider("value", jwplayer("jwplayer_plugin").getPosition()); jQuery('.current').text(getFormattedTimeString(jwplayer("jwplayer_plugin").getPosition())); }); jwplayer("jwplayer_plugin").onPlay(function(){ jQuery('.btnPlay').attr("src","<?php echo img('pause.png'); ?> "); }); jwplayer("jwplayer_plugin").onPause(function(){ jQuery('.btnPlay').attr("src","<?php echo img('play.png'); ?> "); }); jwplayer("jwplayer_plugin").onMute(function(event){ if (event.mute){ jQuery('.muted').attr("src","<?php echo img('volume_speaker_mute.png'); ?> "); }else{ jQuery('.muted').attr("src","<?php echo img('volume_speaker.png'); ?> "); } } ); jwplayer("jwplayer_plugin").onVolume(function(event){ if (event.volume <= 0 ){ jQuery('.muted').attr("src","<?php echo img('volume_speaker_mute.png'); ?> "); }else{ jQuery('.muted').attr("src","<?php echo img('volume_speaker.png'); ?> "); } } ); jQuery('.btnPlay').on('click', function() { if (jwplayer().getPosition() > endTime){ jwplayer().seek(startTime); } jwplayer().play(); return false; }); jQuery('.btnStop').on('click', function() { jwplayer().stop(); jwplayer().seek(startTime); jQuery(".progressBar").slider("value", jwplayer().getPosition()); jQuery('.current').text(getFormattedTimeString(jwplayer().getPosition())); return false; }); jQuery('.muted').click(function() { jwplayer().setMute(); return false; }); jQuery('#vid_player')[0].onmouseover = (function() { var onmousestop = function() { jQuery('#vidcontrols').css('display', 'none'); }, thread; return function() { jQuery('#vidcontrols').css('display', 'block'); clearTimeout(thread); thread = setTimeout(onmousestop, 3000); }; })(); jQuery('#vid_player')[0].onmousedown = (function() { var moveend = function() { jQuery('#vidcontrols').css('display', 'none'); }, thread; return function() { jQuery('#vidcontrols').css('display', 'block'); clearTimeout(thread); thread = setTimeout(moveend, 3000); }; })(); </script> </div> <?php } ?> <?php } else { //use jwplayer control ?> <?php if ($bText = metadata('item', array('Streaming Video', 'Segment Start'))) { ?> <div id="vid_player" style="width:100%; margin:0 auto;"> <div id="jwplayer_plugin" style="margin:0 auto;">Player failed to load... </div> </div> <?php } ?> <script type="text/javascript"> var is_play = true; var startTime= calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> "); var endTime = calculateTime("<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> "); jwplayer("jwplayer_plugin").setup({ playlist: [{ sources: [ <?php if (get_option('jwplayer_hls_streaming')) { ?> { file: '<?php echo metadata('item', array("Streaming Video", "HLS Streaming Directory")); echo metadata('item', array("Streaming Video", "HLS Video Filename")); ?> ' }, <?php } ?> <?php if (get_option('jwplayer_flash_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "Video Streaming URL")); echo metadata("item", array("Streaming Video", "Video Type")); echo metadata('item', array("Streaming Video", "Video Filename")); ?> '} , <?php } ?> <?php if (get_option('jwplayer_http_streaming')) { ?> { file: '<?php echo metadata("item", array("Streaming Video", "HTTP Streaming Directory")); echo metadata("item", array("Streaming Video", "HTTP Video Filename")); ?> '}, <?php } ?> ] } ], <?php if (get_option('jwplayer_flash_primary')) { ?> primary: "flash", <?php } ?> autostart: false, width: "95%", height: <?php echo get_option('jwplayer_height_public'); ?> } ); jwplayer("jwplayer_plugin").onReady(function(){ jwplayer("jwplayer_plugin").seek(startTime); <?php if (get_option('jwplayer_autostart') == 0) { ?> jwplayer("jwplayer_plugin").pause(); <?php } ?> } ); <?php } ?> </script> <?php if (get_option('jwplayer_display_current')) { ?> <?php $orig_item = get_current_record('item'); $orig_video = metadata("item", array("Streaming Video", "Video Filename")); ?> <?php $items = get_records('item', array('collection' => metadata('item', 'collection id'), 'sort_field' => 'Streaming Video,Segment Start'), null); ?> <?php set_loop_records('items', $items); if (has_loop_records('items')) { $items = get_loop_records('items'); } ?> <?php foreach (loop('items') as $item) { ?> <?php if (metadata('item', array('Streaming Video', 'Segment Type')) == 'Scene' && metadata('item', array('Streaming Video', 'Video Filename')) == $orig_video) { ?> <div class="scene" id="<?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> " title="<?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> " style="display:none;"> <h2>Current video segment:</h2> <h3><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title'))); ?> </h3> <div style="overflow:auto; max-height:150px;"> <p> <?php echo metadata('item', array('Dublin Core', 'Description')); ?> </p> </div> <p>Segment: <?php echo metadata('item', array('Streaming Video', 'Segment Start')); ?> -- <?php echo metadata('item', array('Streaming Video', 'Segment End')); ?> </p> </div> <!-- end of loop div for display --> <?php } ?> <?php } ?> <hr style="color:lt-gray;"/> <?php set_current_record('item', $orig_item); ?> <script type="text/javascript"> function getElementsByClass(searchClass, domNode, tagName) { if (domNode == null) { domNode = document; } if (tagName == null) { tagName = '*'; } var el = new Array(); var tags = domNode.getElementsByTagName(tagName); var tcl = " "+searchClass+" "; for (i=0,j=0; i<tags.length; i++) { var test = " " + tags[i].className + " "; if (test.indexOf(tcl) != -1) { el[j++] = tags[i]; } } return el; } jwplayer("jwplayer_plugin").onTime(function(event){ var ctime = "0:00:00"; var scenes; var sel; var i = 0; ctime = getTimeString(jwplayer("jwplayer_plugin").getPosition()); scenes = getElementsByClass("scene"); for (i; i < scenes.length; i++) { sel = scenes[i]; if (sel.getAttribute('id') <= ctime && sel.getAttribute('title') >= ctime) { sel.style.display = 'block'; } else { sel.style.display = 'none'; } } } ); </script> <?php } ?> <?php }
foreach (loop('items') as $item) { ?> <div class="item hentry"> <div class="item-meta"> <h2><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title'), array('class' => 'permalink'))); ?> </h2> <?php if (metadata($item, 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail')); ?> </div> <?php } ?> <?php if ($text = metadata($item, array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
function _pimped_recent_items() { $recent_html = '<h2>' . __('Recent Items') . '</h2>'; set_loop_records('items', get_recent_items(5)); foreach (loop('items') as $item) { $recent_html .= '<div class="recent-row">'; $recent_html .= '<p class="recent">' . metadata($item, array('Dublin Core', 'Identifier')) . ' - ' . link_to_item() . '</p>'; $recent_html .= '<p class="recent">' . (metadata($item, 'item_type_name') ? metadata($item, 'item_type_name') : "NO ITEMTYPE!") . " in " . (metadata($item, 'collection_name') ? metadata($item, 'collection_name') : "NO COLLECTION !") . '</p>'; if (is_allowed($item, 'edit')) { $recent_html .= '<p class="dash-edit">' . link_to_item(__('Edit'), array(), 'edit') . '</p>'; } $recent_html .= '</div>'; } return $recent_html; }
?> <?php echo link_to($file, 'delete-confirm', __('Delete'), array('class' => 'big red button delete-confirm')); ?> <?php } ?> </div> <div id="item-metadata" class="panel"> <h4><?php echo __('Item'); ?> </h4> <p><?php echo link_to_item(null, array(), 'show', $file->getItem()); ?> </p> </div> <div id="file-links" class="panel"> <h4><?php echo __('Direct Links'); ?> </h4> <ul> <li><a href="<?php echo metadata($file, 'uri'); ?> "><?php echo __('Original');
$segmentEnd = metadata($item, array('Streaming Video', 'Segment End')); $segmentDescription = metadata($item, array('Dublin Core', 'Description')); ?> <div class="scene" id="<?php echo $segmentStart; ?> " title="<?php echo $segmentEnd; ?> " style="display:none;"> <h2><?php echo __('Current video segment:'); ?> </h2> <h3><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title')), array(), 'show', $item); ?> </h3> <div style="overflow:auto; max-height:150px;"> <p><?php echo $segmentDescription; ?> </p> </div> <p><?php echo __('Segment: %s - %s', $segmentStart, $segmentEnd); ?> </p> </div> <?php }
include 'form.php'; ?> <section class="three columns omega"> <div id="save" class="panel"> <?php echo $this->formSubmit('submit', __('Save Changes'), array('id' => 'save-changes', 'class' => 'submit big green button')); ?> <a href="<?php echo html_escape(public_url('items/show/' . metadata('item', 'id'))); ?> " class="big blue button" target="_blank"><?php echo __('View Public Page'); ?> </a> <?php echo link_to_item(__('Delete'), array('class' => 'delete-confirm big red button'), 'delete-confirm'); ?> <?php fire_plugin_hook("admin_items_panel_buttons", array('view' => $this, 'record' => $item)); ?> <div id="public-featured"> <?php if (is_allowed('Items', 'makePublic')) { ?> <div class="public"> <label for="public"><?php echo __('Public'); ?> :</label>
<ul class="thumbnails"> <?php $collection_items = get_records('Item', array('collection' => $collection['id'], 'sort_field' => 'Scripto,Weight', 'sort_dir' => 'a'), 999); set_loop_records('items', $collection_items); foreach (loop('items') as $item) { set_current_record('item', $item); if (metadata($item, 'has thumbnail')) { ?> <li> <div id="col-images" class="thumbnail right-caption span4"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title')), 'class' => 'span2'))); ?> <div class="caption"> <?php echo link_to_item(metadata($item, array('Dublin Core', 'Title'), array('snippet' => 60)), array('class' => 'permalink')); ?> <br /><br /> <div id="col-progress"> <?php // Set statuses. $progress_needs_review = (int) metadata($item, array('Scripto', 'Percent Needs Review')); $progress_percent_completed = (int) metadata($item, array('Scripto', 'Percent Completed')); $progress_status = $progress_needs_review + $progress_percent_completed; // Set status messages. if ($progress_percent_completed == 100) { $status_message = __('Completed'); } elseif ($progress_status == 100) { $status_message = __('Needs Review'); } elseif ($progress_status != 0 and $progress_status != 100) { $status_message = __('%d%% Started', $progress_status);
function mh_display_random_item($num = 1) { echo $num <= 1 ? '<h2>Random ' . mh_item_label() . '</h2>' : '<h2>Random ' . mh_item_label('plural') . '</h2>'; set_loop_records('items', get_random_featured_items($num, true)); if (has_loop_records('items')) { foreach (loop('items') as $item) { echo '<article class="item-result">'; echo '<h3>' . link_to_item(metadata($item, array('Dublin Core', 'Title'))) . '</h3>'; echo '<div class="item-thumb">' . link_to_item(item_image('square_thumbnail')) . '</div>'; if ($desc = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 200))) { echo '<div class="item-description">' . $desc . '</div>'; } else { echo '<div class="item-description">Text preview unavailable.</div>'; } echo '</article>'; } } echo '<p class="view-more-link">' . link_to_items_browse('View all ' . mh_item_label('plural') . '') . '</p>'; }
<div class="jcarousel-wrapper"> <div class="jcarousel" id="jcarousel-<?php echo $id_suffix; ?> "> <ul> <?php foreach ($items as $item) { ?> <li> <?php echo link_to_item(item_image('square_thumbnail', array(), 0, $item), array('class' => 'image'), 'show', $item); ?> <p> <?php if (isset($configs['carousel']['showTitles']) && $configs['carousel']['showTitles']) { ?> <a href="<?php echo record_url($item, 'show'); ?> "> <?php echo metadata($item, array('Dublin Core', 'Title')); ?> </a> </p> <?php } ?> </li>
<?php if (metadata('item', 'has thumbnail')) { ?> <div class="panel-image"> <?php echo link_to_item(item_image('thumbnail')); ?> </div> <?php } ?> <div class="item-meta"> <h2><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'permalink')); ?> </h2> <?php if ($itemAbstract = metadata('item', array('Dublin Core', 'Abstract'))) { ?> <div class="item-description"><?php echo $itemAbstract; ?> </div> <?php } elseif ($itemDescription = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150))) { ?> <div class="item-description"><?php