aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-08-15 02:06:06 +0000
committerrvelices <rv-github@modusoptimus.com>2006-08-15 02:06:06 +0000
commit48c6d7e8a4d5b44a6c5c6fa919267d098ed28ee7 (patch)
tree3db23f90be4b39dbe3f25aef0df3c56774106fca /index.php
parentbc1f5319b151c22cd0bed853fc940617e700a29f (diff)
feature 519: quick search (first version)
git-svn-id: http://piwigo.org/svn/trunk@1537 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'index.php')
-rw-r--r--index.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/index.php b/index.php
index cf3d9e434..5b6d011c4 100644
--- a/index.php
+++ b/index.php
@@ -198,6 +198,41 @@ if (is_admin() and !empty($page['items']) )
);
}
+if ( $page['section']=='search' and $page['start']==0 )
+{
+ $tags = get_common_tags($page['items'],
+ $conf['content_tag_cloud_items_number'], null);
+ if ( count($tags)>1 )
+ {
+ $template->assign_block_vars('related_tags', array() );
+
+ $tags = add_level_to_tags($tags);
+ foreach ($tags as $tag)
+ {
+ $template->assign_block_vars(
+ 'related_tags.tag', array(
+ 'URL' => make_index_url(
+ array(
+ 'tags' => array(
+ array(
+ 'id' => $tag['tag_id'],
+ 'url_name' => $tag['url_name'],
+ ),
+ )
+ )
+ ),
+ 'NAME' => $tag['name'],
+ 'TITLE' => sprintf(
+ l10n('%d pictures are also linked to current tags'),
+ $tag['counter']
+ ),
+ 'CLASS' => 'tagLevel'.$tag['level']
+ )
+ );
+ }
+ }
+}
+
//------------------------------------------------------ main part : thumbnails
if (isset($page['thumbnails_include']))
{