aboutsummaryrefslogtreecommitdiffstats
path: root/category.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-03-22 01:01:47 +0000
committerrvelices <rv-github@modusoptimus.com>2006-03-22 01:01:47 +0000
commit0971ce48d217b7cc8081ae70c4b041ab23fdf29c (patch)
tree841bd14e9c2a19c207fb8479b1a086112795d04a /category.php
parent3609c224c74f50a9049524ebedc996ddd1187108 (diff)
URL rewriting: capable of fully working with urls without ?
URL rewriting: works with image file instead of image id (change make_picture_url to generate urls with file name instead of image id) URL rewriting: completely works with category/best_rated and picture/best_rated/534 (change 'category.php?' to 'category' in make_index_url and 'picture.php?' to 'picture' in make_picture_url to see it) fix: picture category display in upper bar fix: function rate_picture variables and use of the new user type fix: caddie icon appears now on category page fix: admin element_set sql query was using storage_category_id column (column has moved to #image_categories) fix: replaced some old $_GET[xxx] with $page[xxx] fix: pictures have metadata url (use ? parameter - might change later) git-svn-id: http://piwigo.org/svn/trunk@1092 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--category.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/category.php b/category.php
index d1c1624ac..58ae4e247 100644
--- a/category.php
+++ b/category.php
@@ -45,8 +45,7 @@ if ( isset( $_GET['act'] )
session_unset();
session_destroy();
setcookie(session_name(),'',0, cookie_path() );
- $url = 'category.php';
- redirect( $url );
+ redirect( make_index_url() );
}
//---------------------------------------------- change of image display order
@@ -113,11 +112,7 @@ $template->set_filenames( array('category'=>'category.tpl') );
//-------------------------------------------------------------- category title
if (isset($page['category']))
{
- $template_title = get_cat_display_name(
- $page['cat_name'],
- 'category.php?/category/',
- false
- );
+ $template_title = get_cat_display_name( $page['cat_name'], '', false );
}
else
{
@@ -206,7 +201,7 @@ if ('search' == $page['section'])
$template->assign_block_vars(
'search_rules',
array(
- 'URL' => PHPWG_ROOT_PATH.'/search_rules.php?search_id='.$page['search'],
+ 'URL' => get_root_url().'search_rules.php?search_id='.$page['search'],
)
);
}
@@ -264,7 +259,7 @@ if ($conf['rate'])
$template->assign_block_vars(
'special_cat',
array(
- 'URL' => PHPWG_ROOT_PATH.'random.php',
+ 'URL' => get_root_url().'random.php',
'TITLE' => $lang['random_cat_hint'],
'NAME' => $lang['random_cat']
));
@@ -395,6 +390,17 @@ if (isset($page['category']) and is_admin())
);
}
+if (is_admin() and !empty($page['items']) )
+{
+ $template->assign_block_vars(
+ 'caddie',
+ array(
+ 'URL' =>
+ add_url_param(duplicate_index_url(),'caddie=1')
+ )
+ );
+ }
+
//------------------------------------------------------ main part : thumbnails
if (isset($page['thumbnails_include']))
{
@@ -453,7 +459,7 @@ if (isset($page['category']))
// upload a picture in the category
if ($page['cat_uploadable'])
{
- $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['category'];
+ $url = get_root_url().'upload.php?cat='.$page['category'];
$template->assign_block_vars(
'upload',
array(