Ignore:
Timestamp:
Apr 3, 2006, 12:26:19 AM (18 years ago)
Author:
plg
Message:

improvement: tags replace keywords. Better data model, less
limitations. Each image can be associated to as many tag as needed. Tags can
contain non ASCII characters. Oriented navigation with tags by association.

File:
1 edited

Legend:

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

    r1109 r1119  
    259259  $section_string = '';
    260260
     261  $section_of = array(
     262    'category' => 'categories',
     263    'tags'     => 'tags',
     264    'list'     => 'list',
     265    'search'   => 'search',
     266    );
     267
     268  foreach ($section_of as $param => $section)
     269  {
     270    if (isset($params[$param]))
     271    {
     272      $params['section'] = $section;
     273    }
     274  }
     275
    261276  if (!isset($params['section']))
    262277  {
    263     if (isset($params['category']))
    264     {
    265       $params['section'] = 'categories';
    266     }
    267     else if (isset($params['tags']))
    268     {
    269       $params['section'] = 'tags';
    270     }
    271     else if (isset($params['list']))
    272     {
    273       $params['section'] = 'list';
    274     }
    275     else if (isset($params['search']))
    276     {
    277       $params['section'] = 'search';
    278     }
    279   }
    280 
    281   if (!isset($params['section']))
    282   {
    283278    $params['section'] = 'categories';
    284279  }
     
    290285      if (!isset($params['category']))
    291286      {
    292         //$section_string.= '/categories';
     287        $section_string.= '/categories';
    293288      }
    294289      else
     
    310305      foreach ($params['tags'] as $tag)
    311306      {
    312         $section_string.= '/'.$tag;
     307        $section_string.= '/'.$tag['id'];
     308       
     309        if (isset($tag['url_name']))
     310        {
     311          $section_string.= '-'.$tag['url_name'];
     312        }
    313313      }
    314314
Note: See TracChangeset for help on using the changeset viewer.