mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 05:26:22 +05:30
Limiting search
Sarching the contents also is bad idea since its databaseless. Search only tags and the url.
This commit is contained in:
parent
5389b38e4d
commit
a504035b88
1 changed files with 3 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue