Browse Source

Limiting search

Sarching the contents also is bad idea since its databaseless. Search
only tags and the url.
pull/31/merge
Danang Probo Sayekti 11 years ago
parent
commit
a504035b88
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      system/includes/functions.php

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

@ -429,11 +429,8 @@ function get_keyword($keyword){
if(!empty($posts)) {
foreach($posts as $index => $v){
$content = MarkdownExtra::defaultTransform(file_get_contents($v));
foreach ($words as $word) {
if(strpos(strtolower(strip_tags($content)), strtolower($word)) !== false){
if(strpos($v, strtolower($word)) !== false){
$post = new stdClass;
@ -479,6 +476,8 @@ function get_keyword($keyword){
$post->tag = implode(', ', $url);
$post->tagb = implode(' » ', $bc);
$content = MarkdownExtra::defaultTransform(file_get_contents($v));
// Extract the title and body
$arr = explode('t-->', $content);


Loading…
Cancel
Save