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
This commit is contained in:
rvelices 2006-03-22 01:01:47 +00:00
parent 3609c224c7
commit 0971ce48d2
28 changed files with 373 additions and 310 deletions

View file

@ -66,6 +66,7 @@ function get_icon($date)
$title .= $user['recent_period'];
$title .= ' '.$lang['days'];
$size = getimagesize( $icon_url );
$icon_url = get_root_url().$icon_url;
$output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
$output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
}
@ -244,7 +245,7 @@ function language_select($default, $select_name = "language")
*
* categories string returned contains categories as given in the input
* array $cat_informations. $cat_informations array must be an association
* of {category_id => category_name}. If url input parameter is empty,
* of {category_id => category_name}. If url input parameter is null,
* returns only the categories name without links.
*
* @param array cat_informations
@ -253,7 +254,7 @@ function language_select($default, $select_name = "language")
* @return string
*/
function get_cat_display_name($cat_informations,
$url = 'category.php?/category/',
$url = '',
$replace_space = true)
{
global $conf;
@ -271,10 +272,16 @@ function get_cat_display_name($cat_informations,
$output.= $conf['level_separator'];
}
if ($url == '')
if ( !isset($url) )
{
$output.= $name;
}
elseif ($url == '')
{
$output.= '<a class=""';
$output.= ' href="'.make_index_url( array('category'=>$id) ).'">';
$output.= $name.'</a>';
}
else
{
$output.= '<a class=""';
@ -306,7 +313,7 @@ function get_cat_display_name($cat_informations,
* @return string
*/
function get_cat_display_name_cache($uppercats,
$url = 'category.php?/category/',
$url = '',
$replace_space = true)
{
global $cat_names, $conf;
@ -339,10 +346,16 @@ SELECT id,name
$output.= $conf['level_separator'];
}
if ($url == '')
if ( !isset($url) )
{
$output.= $name;
}
elseif ($url == '')
{
$output.= '
<a class=""
href="'.make_index_url( array('category'=>$category_id) ).'">'.$name.'</a>';
}
else
{
$output.= '
@ -474,7 +487,7 @@ function parse_comment_content($content)
}
function get_cat_display_name_from_id($cat_id,
$url = 'category.php?/category/',
$url = '',
$replace_space = true)
{
$cat_info = get_cat_info($cat_id);