aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.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 /include/functions_html.inc.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--include/functions_html.inc.php25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 8cd69b5ba..37f4d8a59 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -66,6 +66,7 @@ function get_icon($date)
$title .= $user['recent_period'];
$title .= '&nbsp;'.$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);