本文整理匯總了PHP中Gallery::getSortType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::getSortType方法的具體用法?PHP Gallery::getSortType怎麽用?PHP Gallery::getSortType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gallery
的用法示例。
在下文中一共展示了Gallery::getSortType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: gettext
break;
case 'alltags':
$message = gettext('Tags added for images of selected items');
break;
case 'clearalltags':
$message = gettext('Tags cleared for images of selected items');
break;
}
echo '<div class="messagebox fade-message">';
echo "<h2>" . $message . "</h2>";
echo '</div>';
}
$albums = getNestedAlbumList(NULL, $gallery_nesting);
if (count($albums) > 0) {
if (zp_loggedin(ADMIN_RIGHTS) && count($albums) > 1) {
$sorttype = strtolower($gallery->getSortType());
if ($sorttype != 'manual') {
if ($gallery->getSortDirection()) {
$dir = gettext(' descending');
} else {
$dir = '';
}
$sortNames = array_flip($sortby);
$sorttype = $sortNames[$sorttype];
} else {
$dir = '';
}
?>
<p>
<?php
printf(gettext('Current sort: <em>%1$s%2$s</em>.'), $sorttype, $dir);
示例2: gettext
<tr>
<td><?php
echo gettext("Sort gallery by:");
?>
</td>
<td>
<?php
$sort = $sortby;
$sort[gettext('Manual')] = 'manual';
$sort[gettext('Custom')] = 'custom';
/*
* not recommended--screws with peoples minds during pagination!
$sort[gettext('Random')] = 'random';
*/
$cvt = $cv = strtolower($gallery->getSortType());
ksort($sort, SORT_LOCALE_STRING);
$flip = array_flip($sort);
if (isset($flip[$cv])) {
$dspc = 'none';
} else {
$dspc = 'block';
}
if ($cv == 'manual' || $cv == 'random' || $cv == '') {
$dspd = 'none';
} else {
$dspd = 'block';
}
?>
<table>
<tr>