Browse Source

Fix breadcrumb.

Fix breadcrumb.
pull/31/merge
Danang Probo Sayekti 12 years ago
parent
commit
f5851178d4
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      system/includes/functions.php

+ 8
- 4
system/includes/functions.php View File

@ -132,6 +132,7 @@ function get_posts($posts, $page = 1, $perpage = 0){
$tag = array(); $tag = array();
$url = array(); $url = array();
$bc = array();
$t = explode(',', $arr[1]); $t = explode(',', $arr[1]);
foreach($t as $tt) { foreach($t as $tt) {
@ -139,12 +140,13 @@ function get_posts($posts, $page = 1, $perpage = 0){
} }
foreach($tag as $a) { foreach($tag as $a) {
$url[] = '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . $a[1] . '">'. $a[0] .'</a></span>';
$url[] = '<span><a href="' . $a[1] . '">'. $a[0] .'</a></span>';
$bc[] = '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . $a[1] . '">'. $a[0] .'</a></span>';
} }
$post->tag = implode(', ', $url); $post->tag = implode(', ', $url);
$post->tagb = implode(' » ', $url);
$post->tagb = implode(' » ', $bc);
// Get the contents and convert it to HTML // Get the contents and convert it to HTML
$content = MarkdownExtra::defaultTransform(file_get_contents($filepath)); $content = MarkdownExtra::defaultTransform(file_get_contents($filepath));
@ -407,6 +409,7 @@ function get_keyword($keyword){
$tag = array(); $tag = array();
$url = array(); $url = array();
$bc = array();
$t = explode(',', $arr[1]); $t = explode(',', $arr[1]);
foreach($t as $tt) { foreach($t as $tt) {
@ -414,12 +417,13 @@ function get_keyword($keyword){
} }
foreach($tag as $a) { foreach($tag as $a) {
$url[] = '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . $a[1] . '">'. $a[0] .'</a></span>';
$url[] = '<span><a href="' . $a[1] . '">'. $a[0] .'</a></span>';
$bc[] = '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . $a[1] . '">'. $a[0] .'</a></span>';
} }
$post->tag = implode(', ', $url); $post->tag = implode(', ', $url);
$post->tagb = implode(' » ', $url);
$post->tagb = implode(' » ', $bc);
// Extract the title and body // Extract the title and body
$arr = explode('</h1>', $content); $arr = explode('</h1>', $content);


Loading…
Cancel
Save