Changeset 811 for trunk/picture.php


Ignore:
Timestamp:
Aug 14, 2005, 1:55:35 PM (19 years ago)
Author:
plg
Message:
  • new : ability to set an element as representant of its category directly from picture.php screen.
  • improvement : dedicated icon to add elements into caddie. Ths icon is displayed in the category title bar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r803 r811  
    7474  echo $lang['thumbnails'].'</a></div>';
    7575  exit();
     76}
     77//-------------------------------------------------------------- representative
     78if ('admin' == $user['status'] and isset($_GET['representative']))
     79{
     80  $query = '
     81UPDATE '.CATEGORIES_TABLE.'
     82  SET representative_picture_id = '.$_GET['image_id'].'
     83  WHERE id = '.$page['cat'].'
     84;';
     85  pwg_query($query);
     86
     87  $url =
     88    PHPWG_ROOT_PATH
     89    .'picture.php'
     90    .get_query_string_diff(array('representative'));
     91  redirect($url);
    7692}
    7793//---------------------------------------------------------- related categories
     
    620636        'HEIGHT_IMG'=>($full_height + 16)
    621637        ));
     638}
     639// button to set the current picture as representative
     640if ('admin' == $user['status'] and is_numeric($page['cat']))
     641{
     642  $template->assign_block_vars(
     643    'representative',
     644    array(
     645      'URL' =>
     646        PHPWG_ROOT_PATH.'picture.php'
     647        .get_query_string_diff(array())
     648        .'&amp;representative=1'
     649      )
     650    );
    622651}
    623652//------------------------------------------------------- favorite manipulation
Note: See TracChangeset for help on using the changeset viewer.