• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP link_to_item函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中link_to_item函数的典型用法代码示例。如果您正苦于以下问题:PHP link_to_item函数的具体用法?PHP link_to_item怎么用?PHP link_to_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了link_to_item函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:regan008,项目名称:WearingGayHistory-Plugins,代码行数:31,代码来源:ItemGoogleMap.php


示例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>&nbsp;&nbsp;&nbsp;' . $itemDescription . '</p>';
    } else {
        $html .= '<p>No featured items are available.</p>';
    }
    return $html;
}
开发者ID:SBUtltmedia,项目名称:omeka-neatline,代码行数:19,代码来源:custom.php


示例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>	
开发者ID:ebellempire,项目名称:curatescape_gardens,代码行数:31,代码来源:show.php


示例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>
开发者ID:kevinreiss,项目名称:Omeka-CategoryBrowse,代码行数:31,代码来源:browse.php


示例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 {
    ?>
开发者ID:sgbalogh,项目名称:peddler_clone5,代码行数:30,代码来源:index.php


示例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();
开发者ID:pcouchet,项目名称:seasons-ahp,代码行数:31,代码来源:show.php


示例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>
开发者ID:ucdh,项目名称:theme-emiglio,代码行数:31,代码来源:show.php


示例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']) {
        ?>
开发者ID:GerZah,项目名称:plugin-Geolocation,代码行数:31,代码来源:browse.kml.php


示例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>
开发者ID:plagmada,项目名称:plagmada-archives,代码行数:30,代码来源:show.php


示例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'));
    ?>
开发者ID:lchen01,项目名称:STEdwards,代码行数:31,代码来源:404.php


示例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>
开发者ID:chnm,项目名称:theme-rpi,代码行数:31,代码来源:browse.php


示例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 
}
开发者ID:lchen01,项目名称:STEdwards,代码行数:31,代码来源:show.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 
开发者ID:joelsalisbury,项目名称:findyourvoice,代码行数:30,代码来源:show.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']) {
        ?>
开发者ID:rabernathy,项目名称:plugin-Geolocation,代码行数:31,代码来源:browse.kml.php


示例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();
?>
',
开发者ID:mjlassila,项目名称:BookReader,代码行数:31,代码来源:view.php


示例16: pagination_links

		
		<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">
开发者ID:ebellempire,项目名称:curatescape_gardens,代码行数:30,代码来源:browse.php


示例17: head

<?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 
}
开发者ID:charvolant,项目名称:bigstuff,代码行数:31,代码来源:index.php


示例18: foreach

<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>
开发者ID:kyfr59,项目名称:cg35,代码行数:17,代码来源:_duplicates.php


示例19: __

<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>
开发者ID:biblibre,项目名称:omeka-plugin-OaipmhHarvester,代码行数:20,代码来源:_duplicates.php


示例20: strip_formatting

        ?>
        <?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>
开发者ID:HCDigitalScholarship,项目名称:peacetestimonies,代码行数:31,代码来源:show.php



注:本文中的link_to_item函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP linkcolor函数代码示例发布时间:2022-05-24
下一篇:
PHP line函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap