0
我有改變格式(重整架構)在Drupal 6尋呼機然而,它沒有在Drupal 7.它引發了太多的錯誤:(更改傳呼機格式7
function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {
$pager_list = theme('pager_list', $tags, $limit, $element, $parameters, $quantity);
$links = array();
$links['pager-first'] = theme('pager_first', ($tags[0] ? $tags[0] : t('FIRST')), $limit, $element, $parameters);
$links['pager-previous'] = theme('pager_previous', ($tags[1] ? $tags[1] : t('PREV')), $limit, $element, 1, $parameters);
$links = array_filter($links);
$pager_links_1 = theme('links', $links, array('class' => 'links pager pager-links left'));
$links = array();
$links['pager-next'] = theme('pager_next', ($tags[3] ? $tags[3] : t('NEXT')), $limit, $element, 1, $parameters);
$links['pager-last'] = theme('pager_last', ($tags[4] ? $tags[4] : t('LAST')), $limit, $element, $parameters);
$links = array_filter($links);
$pager_links_2 = theme('links', $links, array('class' => 'links pager pager-links right'));
if(empty($pager_links_1)){
if ($pager_list) {
return "<div class='pager clear-block'><div class='pager-wrapper'><ul class='links pager pager-links LeftClass'><li><span>PREV</span></li></ul>$pager_links_1 $pager_list $pager_links_2</div></div>";
}
}
if(empty($pager_links_2)){
if ($pager_list) {
return "<div class='pager clear-block'><div class='pager-wrapper'>$pager_links_1 $pager_list $pager_links_2<ul class='links pager pager-links RightClass'><li><span>NEXT</span></li></ul></div></div>";
}
}
if ($pager_list) {
return "<div class='pager clear-block'><div class='pager-wrapper'>$pager_links_1 $pager_list $pager_links_2</div></div>";
}
}
工作,下面的代碼
有什麼錯誤? – Clive