fix: sql query erros when: no items for the selected tag, search returns

no result, caddie is empty

fix: tag cloud was showing least used tags

fix: strip html tags from head/title element on the page
(tag index page title contained <a>...)

improvement: added 5 tag levels in css for "ready to use" tags

fix: corrected png icon calendar_created.png for IE

fix: english language for nbm

git-svn-id: http://piwigo.org/svn/trunk@1120 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2006-04-04 00:35:12 +00:00
parent 42abf4c576
commit f33fdc91b2
9 changed files with 85 additions and 71 deletions
+15 -21
View File
@@ -110,15 +110,7 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('index'=>'index.tpl') );
//-------------------------------------------------------------- category title
if (isset($page['category']))
{
$template_title = get_cat_display_name( $page['cat_name'], '', false );
}
else
{
$template_title = $page['title'];
}
$template_title = $page['title'];
if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0)
{
$template_title.= ' ['.$page['cat_nb_images'].']';
@@ -225,9 +217,13 @@ if (count($conf['links']) > 0)
if ('tags' == $page['section'])
{
$template->assign_block_vars('tags', array());
// display tags associated to currently tagged items, less current tags
$query = '
$tags = array();
if ( !empty($page['items']) )
{
$query = '
SELECT tag_id, name, url_name, count(*) counter
FROM '.IMAGE_TAG_TABLE.'
INNER JOIN '.TAGS_TABLE.' ON tag_id = id
@@ -236,13 +232,11 @@ SELECT tag_id, name, url_name, count(*) counter
GROUP BY tag_id
ORDER BY name ASC
;';
$result = pwg_query($query);
$tags = array();
while($row = mysql_fetch_array($result))
{
array_push($tags, $row);
$result = pwg_query($query);
while($row = mysql_fetch_array($result))
{
array_push($tags, $row);
}
}
$tags = add_level_to_tags($tags);
@@ -276,16 +270,16 @@ SELECT tag_id, name, url_name, count(*) counter
)
)
),
'NAME' => $tag['name'],
'TITLE' => l10n('See pictures linked to this tag only'),
'TITLE_ADD' => sprintf(
l10n('%d pictures are also linked to current tags'),
$tag['counter']
),
'CLASS' => 'tagLevel'.$tag['level']
)
);