本文整理汇总了PHP中link_to_item函数的典型用法代码示例。如果您正苦于以下问题:PHP link_to_item函数的具体用法?PHP link_to_item怎么用?PHP link_to_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了link_to_item函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: itemGoogleMap
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;
}
示例2: rhythm_display_random_featured_item_squarethumb
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;
}
示例3: __
</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>
示例4: link_to_item
<?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>
示例5: link_to_item
<?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 {
?>
示例6: link_to_item
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();
示例7: foreach
?>
<?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>
示例8: link_to_item
?>
]]></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']) {
?>
示例9: __
<?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>
示例10: set_loop_records
?>
</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'));
?>
示例11: link_to_item
<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>
示例12: set_loop_records
</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
}
示例13: elseif
<?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
示例14: link_to_item
?>
]]></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']) {
?>
示例15: function
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();
?>
',