原样式
新样式
请忽略上面的样式,主要是增加了中间的“・・・”
第一步修改:/yzmphp/core/class/page.class.php
增加代码:
/** * 获得后面点点 */ public function getdots_end(){ if($this->now_page total_page - 4){ return ''.L('dots_page').'make_url($this->total_page).'" class="listpage" _href="'.$this->make_url($this->total_page).'">' .$this->total_page.''; } if($this->now_page == $this->total_page - 3){ return 'make_url($this->total_page).'" class="listpage" _href="'.$this->make_url($this->total_page).'">'.$this->total_page.''; } } /** * 获得前面点点 */ public function getdots_sta(){ if($this->now_page >= 5){ return 'make_url(1).'" class="listpage" _href="'.$this->make_url(1).'">1'.L('dots_page').''; }else{ if($this->now_page == 4 && $this->total_page >=6){ return 'make_url(1).'" class="listpage" _href="'.$this->make_url(1).'">1'; } } }
修改其中的内容:“public function getfull(){ ... }”
public function getfull(){ if($this->total_rows == 0) return ''; if($this->total_page == 1) return ''; if($this->total_page getpre()).($this->getlist()).($this->getnext()); return ($this->getpre()).($this->getdots_sta()).($this->getlist()).($this->getdots_end()).($this->getnext()); }
附图
第二步修改:/yzmphp/language/zh_cn.lang.php,增加“'dots_page' => '•••',”
'未知', 'error' => '错误', 'message_tips' => '提示信息', 'site_home' => '站点首页', 'illegal_operation' => '非法操作!', 'illegal_parameters' => '非法参数!', 'home_page' => '首页', 'end_page' => '尾页', 'pre_page' => '上页', 'next_page' => '下页', 'dots_page' => '•••',
完成。