Changeset 1092 for trunk/picture.php


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/picture.php

    r1090 r1092  
    169169    case 'rate' :
    170170    {
    171       rate_picture($user['id'], $page['image_id'], $_GET['rate']);
     171      rate_picture($page['image_id'], $_GET['rate']);
    172172      redirect($url_self);
    173173    }
     
    371371
    372372$title_img = $picture['current']['name'];
    373 if ( isset( $page['cat'] ) )
    374 {
    375   if (is_numeric( $page['cat'] ))
     373if ( isset( $page['category'] ) )
     374{
     375  if (is_numeric( $page['category'] ))
    376376  {
    377377    $title_img = replace_space(get_cat_display_name($page['cat_name']));
    378378  }
    379379  else if ( $page['cat'] == 'search' )
    380   {
     380  { // ??? TODO -remove or change some remainings from old variables
    381381    $title_img = replace_search( $title_img, $_GET['search'] );
    382382  }
     
    405405
    406406// metadata
     407$url_metadata = duplicate_picture_URL();
    407408if ($conf['show_exif'] or $conf['show_iptc'])
    408409{
    409410  $metadata_showable = true;
     411  if ( !isset($_GET['metadata']) )
     412  {
     413    $url_metadata = add_url_param( $url_metadata, 'metadata' );
     414  }
    410415}
    411416else
     
    413418  $metadata_showable = false;
    414419}
    415 
    416 // $url_metadata = PHPWG_ROOT_PATH.'picture.php';
    417 // $url_metadata .=  get_query_string_diff(array('add_fav', 'slideshow', 'show_metadata'));
    418 // if ($metadata_showable and !isset($_GET['show_metadata']))
    419 // {
    420 //   $url_metadata.= '&show_metadata=1';
    421 // }
    422 
    423 // TODO: rewrite metadata display to toggle on/off user_infos.show_metadata
    424 $url_metadata = duplicate_picture_URL();
    425420
    426421$page['body_id'] = 'thePicturePage';
Note: See TracChangeset for help on using the changeset viewer.