BLOGCODE.HEXAT.COM


![]() | ![]() ![]() ![]() |
Bắt đầu
Mở forum/index tìm
$res=true;
$parent=$type1['refid'];
while ($parent!='0'&&$res!=false) {
$req=mysql_query("SELECT * FROM `forum` WHERE `id` = '$parent' LIMIT 1");
$res=mysql_fetch_assoc($req);
if ($res['type'] =='f'||$res['type'] =='r')
$tree[] ='<a href="index.php?id='.$parent.'">'.$res['text'] .'</a>';
$parent=$res['refid'];
}
$tree[] ='<a href="index.php">'.$lng['forum'] .'</a>';
krsort($tree);
if ($type1['type'] !='t'&&$type1['type'] !='m')
$tree[] ='<b>'.$type1['text'] .'</b>';
Thay đoạn trên bằng
$res=true; $parent=$type1['refid']; while ($parent!='0'&&$res!=false) { $req=mysql_query("SELECT * FROM `forum` WHERE `id` = '$parent' LIMIT 1"); $res=mysql_fetch_assoc($req); if ($res['type'] =='f'||$res['type'] =='r') $tree[] ='<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php?id='.$parent.'" itemprop="url"><span itemprop="title">'.$res['text'] .'</span></a></span>'; $parent=$res['refid']; } $tree[] ='<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">'.$lng['forum'] .'</span></a></span>'; krsort($tree); if ($type1['type'] !='t'&&$type1['type'] !='m') $tree[] ='<b>'.$type1['text'] .'</b>';
Css
/** ---breadcrumb-- **/
.breadcrumb {
background: #FAFAFA;
border-radius: 4px;
margin-bottom: 8px;
border: 1px solid #D6D6D6;
box-shadow: -2px 2px 1px #E4E4E4;
padding-left: 5px;
}
.breadcrumb span span, .breadcrumb span.tree {
color: #777;
display: inline-block;
background: url('images/breadcrumb_sp.png') no-repeat center right;
padding: 6px 16px 6px 3px;
}
/** --------------------- **/
Xong chờ google index là xong.
- Share: BBCode: Link: |
Cùng chuyên mục