本日看论坛看到此文章的,虽然比较复杂,但照样很有效的,这里写出来供人人参考,此次写出来我也不知道这是不是很周全吧,不过我预计能有的我都给写进去了。
使用方法:
将以下代码放入模板文件module.php中
<?php$sheli_mbx = "首页";if( $params[1]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[2]));//猎取第某页}function __breadcrumb_Sort_Cache($id){ global $CACHE; $sort_cache = $CACHE->readCache('sort'); return $sort_cache[$id]['sortname'];}function __breadcrumb_User_Cache($id){ global $CACHE; $user_cache = $CACHE->readCache('user'); return $user_cache[$id]['name'];}function __breadcrumb_Blog_Sort_Cache_Check($blogid){ global $CACHE; $log_cache_sort = $CACHE->readCache('logsort'); if(!empty($log_cache_sort[$blogid])){ return true; }else{ return false; }}function __breadcrumb_Blog_Sort_Cache($blogid){ global $CACHE; $log_cache_sort = $CACHE->readCache('logsort'); if(!empty($log_cache_sort[$blogid])){ //分类称号:$log_cache_sort[$blogid]['name'] //分类链接:Url::sort($log_cache_sort[$blogid]['id']) return $log_cache_sort[$blogid]['name']; }}if( $params[1]=='sort' ){//分类 //分类称号:_cache_breadcrumb_Sort_Cache($sortid) //分类链接:$sort_url = Url::sort($sortid); $sheli_mbx .= __breadcrumb_Sort_Cache($sortid); if( $params[4]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[5]));//猎取第某页 }}elseif($params[1]=='record'){//归档 $sheli_mbx .= $params[2]; if( $params[4]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[5]));//猎取第某页 }}elseif( $params[1] == 'author' ){//文章 //作者称号:_cache_breadcrumb_User_Cache($params[2]) //作者链接:$author_url = Url::author($params[2]); $sheli_mbx .= __breadcrumb_User_Cache($params[2]); if( $params[4]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[5]));//猎取第某页 }}elseif( $params[1] == 'tag' ){//标签 //标签称号:htmlspecialchars(urldecode($params[2])); //标签链接:$tag_url = Url::tag($params[2]); $sheli_mbx .= htmlspecialchars(urldecode($params[2])); if( $params[4]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[5]));//猎取第某页 }}elseif( $params[1] == 'keyword' ){//搜刮 $sheli_mbx .= htmlspecialchars(urldecode($params[2])); if( $params[4]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($params[5]));//猎取第某页 }}elseif( $type=='blog' ){//自定义文章 //推断文章是不是存在分类 if( __breadcrumb_Blog_Sort_Cache_Check($logid) ){ $sheli_mbx .= __breadcrumb_Blog_Sort_Cache($logid); } //文章称号:$log_title //文章链接:Url::log($logid); $sheli_mbx .= $log_title;}elseif( $type=='page' ){//自定义文章 $sheli_mbx .= $log_title;}elseif( $tws ){ preg_match_all('|^.*/\?(page)=(\d+)([\?&].*)?$|',Dispatcher::setPath(),$Preferred); if( $Preferred[1][0]=='page' ){ $sheli_mbx .= htmlspecialchars(urldecode($Preferred[2][0])); } $sheli_mbx .= '微语';};?>末了在你须要的位置放入<?php echo $sheli_mbx;?>即可落成,至于CSS什么的,本身折腾吧。

评论列表