本文整理汇总了PHP中text::hive_alt方法的典型用法代码示例。如果您正苦于以下问题:PHP text::hive_alt方法的具体用法?PHP text::hive_alt怎么用?PHP text::hive_alt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类text
的用法示例。
在下文中一共展示了text::hive_alt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<div class="header page-title">
<h3>Global Alliances</h3>
<p>Spicers Paper represents the following Paper Mills</p>
</div><!-- /.header -->
<div id="global-alliances-map" style="width: 748px; height: 366px;">
<div id="global-alliances-gmap"></div>
</div><!--/#global-alliances-map-->
<ul id="global-alliances-grid" class="gallery">
<?php
foreach ($locations as $location) {
?>
<li class="article <?php
echo text::hive_alt('first', '', '', 'last');
?>
">
<div class="image">
<a href="<?php
echo $location->url;
?>
" target="_blank"><img src="/media/cms/locations/<?php
echo $location->id;
?>
/resize/175-100/<?php
echo $location->image;
?>
" alt="<?php
echo $location->name;
?>
示例2: count
<p>You have <?php
echo count($lightboxes) ? count($lightboxes) : 'no';
?>
lightboxes</p>
</div><!-- /.header -->
<?php
if (count($lightboxes)) {
?>
<table>
<tbody>
<?php
foreach ($lightboxes as $lightbox) {
?>
<tr <?php
echo text::hive_alt('class="alt"', '');
?>
>
<td><a href="lightboxes/view/<?php
echo $lightbox->id . '/' . $lightbox->name;
?>
"><?php
echo $lightbox->name;
?>
</a></td>
<td><?php
echo count($lightbox->papers);
?>
papers</td>
<td class="time"><?php
echo date('j M Y', $lightbox->updated);
示例3: array
">
<a href="javascript:void(null);">
<img src="/media/cms/campaigns/<?php
echo $campaign->id;
?>
/resample/220-220/<?php
echo $poster->name;
?>
" width="220" height="220" alt="<?php
echo $poster->name;
?>
" />
</a>
</div>
<?php
echo text::hive_alt('', '', '', '</li>');
?>
<?php
}
?>
</ul>
</div>
<script type="text/javascript">
<?php
if (count($campaign->posters) > 0) {
$photos = array();
foreach ($campaign->posters as $i => $photo) {
// Image dimensions and info
$image_info = getimagesize('http://' . $_SERVER['HTTP_HOST'] . '/media/cms/campaigns/' . $campaign->id . '/' . $photo->name);
array_push($photos, (object) array('src' => '/media/cms/campaigns/' . $campaign->id . '/' . $photo->name, 'name' => htmlentities($photo->description, ENT_QUOTES, 'utf-8', false), 'width' => $image_info[0], 'height' => $image_info[1]));