Changeset 2517 for trunk/index.php


Ignore:
Timestamp:
Sep 11, 2008, 11:40:00 PM (16 years ago)
Author:
plg
Message:

feature 169 added: ability to manually sort images inside a category. A
dedicated screen let the administrator sort the images (pur HTML, no
JavaScript yet). The "rank" sort order is available only for a category
without flat mode. New database column image_category.rank.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r2488 r2517  
    261261
    262262  $orders = get_category_preferred_image_orders();
    263   for ($i = 0; $i < count($orders); $i++)
    264   {
    265     if ($orders[$i][2])
     263  foreach ($orders as $order_id => $order)
     264  {
     265    if ($order[2])
    266266    {
    267267      $template->append(
    268268        'image_orders',
    269269        array(
    270           'DISPLAY' => $orders[$i][0],
    271           'URL' => add_url_params( duplicate_index_url(), array('image_order'=>$i) ),
    272           'SELECTED' => ($order_idx==$i ? true:false),
     270          'DISPLAY' => $order[0],
     271          'URL' => add_url_params(
     272            duplicate_index_url(),
     273            array('image_order' => $order_id)
     274            ),
     275          'SELECTED' => ($order_idx == $order_id ? true:false),
    273276          )
    274277        );
Note: See TracChangeset for help on using the changeset viewer.