X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=801108b808c95af1cbfb16d74f2f2d2c81311e24;hb=2732de7c9ef82cee6b8eb8116e376c4be06425c3;hp=f182ad2905f1851dae7b30a90dadd639f4e28751;hpb=03cd3750fd26d2667ccdadb55fd4807be34e1d1c;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index f182ad29..801108b8 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ filterFulltext($_GET['searchterm']); + elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); + else $linksToDisplay = $LINKSDB; + $body=''; + foreach($linksToDisplay as $link) + { + $thumb=thumbnail($link['url']); + if ($thumb!='') + { + $url=htmlspecialchars($link['url'],ENT_QUOTES); + $body.='
'.$thumb.''.htmlspecialchars($link['title']).'
'; + + } + } + $body = '
'.$body.'
'; + $data = array('pageheader'=>'
 ','body'=>$body,'onload'=>''); + templatePage($data); + exit; + + } + // -------- Tag cloud if (startswith($_SERVER["QUERY_STRING"],'do=tagcloud')) { @@ -1344,7 +1370,7 @@ function templateLinkList() foreach(explode(' ',$link['tags']) as $tag) { $tags.=''.htmlspecialchars($tag).' '; } $tags='
'.$tags.'
'; } - $linklist.='
  • '.thumbnail($link['url']); + $linklist.='
  • '.thumbnail($link['url']).'
    '; $linklist.='