aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_recent_cats.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-11 03:54:42 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-11 03:54:42 +0000
commita314099989aaef5ce4818837f554cfd98ba13698 (patch)
treee2078ff9dbd80106513a146cc201b477e078472e /include/category_recent_cats.inc.php
parentb3c2da5ef3ec169307bdee4bd51fc1e1b5e9b390 (diff)
fix: iptc keywords are split the same way for local and remote sites
(create_listing_file) fix: recent_cats and category_subcats build the url the same way (both subcatify and normal) fix: recent_cats subcatify also strip tags on subcategory comment fix: cookie deletion on logout uses cookie_domain from ini file git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1144 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_recent_cats.inc.php')
-rw-r--r--include/category_recent_cats.inc.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/category_recent_cats.inc.php b/include/category_recent_cats.inc.php
index 44494c9df..ae98426bd 100644
--- a/include/category_recent_cats.inc.php
+++ b/include/category_recent_cats.inc.php
@@ -46,6 +46,7 @@ SELECT c.id AS category_id
, c.comment
, tn_ext
, nb_images
+ , c.name AS cat_name
FROM '.CATEGORIES_TABLE.' AS c
INNER JOIN '.IMAGES_TABLE.' AS i ON i.id = c.representative_picture_id
WHERE date_last > SUBDATE(
@@ -67,13 +68,19 @@ if ($conf['subcatify'])
'mainpage_categories' => 'mainpage_categories.tpl',
)
);
-
+
// template thumbnail initialization
if (mysql_num_rows($result) > 0)
{
$template->assign_block_vars('categories', array());
}
+ $comment = null;
+ if (isset($row['comment']))
+ {
+ $comment = strip_tags($row['comment'], '<a><br><p><b><i><small><strong>');
+ }
+
// for each category, we have to search a recent picture to display and
// the name to display
while ( $row = mysql_fetch_array( $result ) )
@@ -84,15 +91,16 @@ if ($conf['subcatify'])
'SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']),
'ALT' => $row['file'],
'TITLE' => $lang['hint_category'],
-
+
'URL' => make_index_url(
array(
'category' => $row['category_id'],
+ 'cat_name' => $row['cat_name'],
)
),
'NAME' => get_cat_display_name_cache($row['uppercats'], null, false),
'NB_IMAGES' => $row['nb_images'],
- 'DESCRIPTION' => @$row['comment'],
+ 'DESCRIPTION' => $comment,
)
);
}
@@ -110,7 +118,7 @@ else
// current row displayed
$row_number = 0;
}
-
+
$old_level_separator = $conf['level_separator'];
$conf['level_separator'] = '<br />';
// for each category, we have to search a recent picture to display and
@@ -123,10 +131,11 @@ else
'IMAGE' => get_thumbnail_src($row['path'], @$row['tn_ext']),
'IMAGE_ALT' => $row['file'],
'IMAGE_TITLE' => $lang['hint_category'],
-
+
'U_IMG_LINK' => make_index_url(
array(
'category' => $row['category_id'],
+ 'cat_name' => $row['cat_name'],
)
),
)