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/admin/picture_modify.php

    r1085 r1092  
    128128{
    129129  $datas = array();
    130  
     130
    131131  foreach ($_POST['cat_dissociated'] as $category_id)
    132132  {
     
    139139      );
    140140  }
    141  
     141
    142142  mass_inserts(
    143143    IMAGE_CATEGORY_TABLE,
     
    167167      );
    168168  }
    169  
     169
    170170  $query = '
    171171DELETE FROM '.IMAGE_CATEGORY_TABLE.'
     
    214214
    215215$storage_category_id = $row['category_id'];
     216$image_file = $row['file'];
    216217
    217218// Navigation path
     
    237238        (isset($_GET['cat_id']) ? '&cat_id='.$_GET['cat_id'] : '').
    238239        '&sync_metadata=1',
    239    
     240
    240241    'PATH'=>$row['path'],
    241    
     242
    242243    'TN_SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']),
    243    
     244
    244245    'NAME' =>
    245246      isset($_POST['name']) ?
    246247        stripslashes($_POST['name']) : @$row['name'],
    247    
     248
    248249    'DIMENSIONS' => @$row['width'].' * '.@$row['height'],
    249    
     250
    250251    'FILESIZE' => @$row['filesize'].' KB',
    251    
     252
    252253    'REGISTRATION_DATE' =>
    253254      format_date($row['date_available'], 'mysql_datetime', false),
    254    
     255
    255256    'AUTHOR' => isset($_POST['author']) ? $_POST['author'] : @$row['author'],
    256    
     257
    257258    'CREATION_DATE' => $date,
    258    
     259
    259260    'KEYWORDS' =>
    260261      isset($_POST['keywords']) ?
    261262        stripslashes($_POST['keywords']) : @$row['keywords'],
    262    
     263
    263264    'DESCRIPTION' =>
    264265      isset($_POST['description']) ?
    265266        stripslashes($_POST['description']) : @$row['comment'],
    266  
     267
    267268    'F_ACTION' =>
    268269        PHPWG_ROOT_PATH.'admin.php'
     
    293294get_month_list('date_creation_month', $month);
    294295$template->assign_vars(array('DATE_CREATION_YEAR_VALUE' => $year));
    295  
     296
    296297$query = '
    297298SELECT category_id, uppercats
     
    316317      false
    317318      );
    318    
     319
    319320  if ($row['category_id'] == $storage_category_id)
    320321  {
     
    355356    array(
    356357      'image_id' => $_GET['image_id'],
     358      'image_file' => $image_file,
    357359      'category' => $_GET['cat_id'],
    358360      )
     
    366368      array(
    367369        'image_id' => $_GET['image_id'],
     370        'image_file' => $image_file,
    368371        'category' => $category,
    369372        )
     
    382385    );
    383386}
    384  
     387
    385388// associate to another category ?
    386389$query = '
Note: See TracChangeset for help on using the changeset viewer.