Ignore:
Timestamp:
Mar 22, 2006, 2:01:47 AM (18 years ago)
Author:
rvelices
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r1090 r1092  
    6767    $title .=  ' '.$lang['days'];
    6868    $size = getimagesize( $icon_url );
     69    $icon_url = get_root_url().$icon_url;
    6970    $output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
    7071    $output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
     
    245246 * categories string returned contains categories as given in the input
    246247 * array $cat_informations. $cat_informations array must be an association
    247  * of {category_id => category_name}. If url input parameter is empty,
     248 * of {category_id => category_name}. If url input parameter is null,
    248249 * returns only the categories name without links.
    249250 *
     
    254255 */
    255256function get_cat_display_name($cat_informations,
    256                               $url = 'category.php?/category/',
     257                              $url = '',
    257258                              $replace_space = true)
    258259{
     
    272273    }
    273274
    274     if ($url == '')
     275    if ( !isset($url) )
    275276    {
    276277      $output.= $name;
     278    }
     279    elseif ($url == '')
     280    {
     281      $output.= '<a class=""';
     282      $output.= ' href="'.make_index_url( array('category'=>$id) ).'">';
     283      $output.= $name.'</a>';
    277284    }
    278285    else
     
    307314 */
    308315function get_cat_display_name_cache($uppercats,
    309                                     $url = 'category.php?/category/',
     316                                    $url = '',
    310317                                    $replace_space = true)
    311318{
     
    340347    }
    341348
    342     if ($url == '')
     349    if ( !isset($url) )
    343350    {
    344351      $output.= $name;
     352    }
     353    elseif ($url == '')
     354    {
     355      $output.= '
     356<a class=""
     357   href="'.make_index_url( array('category'=>$category_id) ).'">'.$name.'</a>';
    345358    }
    346359    else
     
    475488
    476489function get_cat_display_name_from_id($cat_id,
    477                                       $url = 'category.php?/category/',
     490                                      $url = '',
    478491                                      $replace_space = true)
    479492{
Note: See TracChangeset for help on using the changeset viewer.