Changeset 1092


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)

Location:
trunk
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_global.php

    r1084 r1092  
    2929 * Management of elements set. Elements can belong to a category or to the
    3030 * user caddie.
    31  * 
     31 *
    3232 */
    33  
     33
    3434if (!defined('PHPWG_ROOT_PATH'))
    3535{
     
    5959    return array();
    6060  }
    61  
     61
    6262  $keywords = array();
    63  
     63
    6464  $query = '
    6565SELECT keywords
     
    8585{
    8686  $collection = array();
    87  
     87
    8888//   echo '<pre>';
    8989//   print_r($_POST);
     
    137137          );
    138138      }
    139  
     139
    140140      mass_inserts(
    141141        IMAGE_CATEGORY_TABLE,
     
    171171      $destinations_of[ $_POST['dissociate'] ]
    172172      );
    173    
     173
    174174    // Eventually, deletion of associations
    175175    $query = '
     
    186186    // B. Who said "complicated"?
    187187    check_links();
    188    
     188
    189189    update_category($associated_categories);
    190190  }
     
    206206    }
    207207  }
    208  
     208
    209209  // updating elements is useful only if needed...
    210210  if (count($dbfields['update']) > 0 and count($collection) > 0)
     
    221221      $data = array();
    222222      $data['id'] = $row['id'];
    223      
     223
    224224      if (!empty($_POST['add_keywords']))
    225225      {
     
    242242          $data['keywords'] = empty($row['keywords']) ? '' : $row['keywords'];
    243243        }
    244        
     244
    245245        $data['keywords'] =
    246246          implode(
     
    288288          ;
    289289      }
    290      
     290
    291291      array_push($datas, $data);
    292292    }
     
    309309  array(
    310310    'CATEGORIES_NAV'=>$page['title'],
    311    
     311
    312312    'L_SUBMIT'=>$lang['submit'],
    313313
    314314    'U_COLS'=>$base_url.get_query_string_diff(array('cols')),
    315315    'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
    316    
     316
    317317    'U_UNIT_MODE'
    318318    =>
     
    320320    .get_query_string_diff(array('mode','display'))
    321321    .'&amp;mode=unit',
    322    
     322
    323323    'F_ACTION'=>$base_url.get_query_string_diff(array()),
    324324   )
     
    380380    AND ic.category_id = c.id
    381381    AND ic.image_id = i.id
    382     AND ic.category_id != i.storage_category_id
     382    AND ic.is_storage = \'false\'
    383383;';
    384384  display_select_cat_wrapper($query, array(), $blockname, true);
     
    485485  {
    486486    $src = get_thumbnail_src($row['path'], @$row['tn_ext']);
    487    
     487
    488488    $template->assign_block_vars(
    489489      'thumbnails.line.thumbnail',
     
    495495        )
    496496      );
    497    
     497
    498498    // create a new line ?
    499499    if (++$row_number == $page['cols'])
  • 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']) ? '&amp;cat_id='.$_GET['cat_id'] : '').
    238239        '&amp;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 = '
  • trunk/admin/user_perm.php

    r1072 r1092  
    9393  // accesible
    9494  $authorized_ids = array();
    95    
     95
    9696  $query = '
    9797SELECT cat_id
     
    100100;';
    101101  $result = pwg_query($query);
    102  
     102
    103103  while ($row = mysql_fetch_array($result))
    104104  {
    105105    array_push($authorized_ids, $row['cat_id']);
    106106  }
    107  
     107
    108108  $inserts = array();
    109109  $to_autorize_ids = array_diff($private_uppercats, $authorized_ids);
     
    138138    'L_CAT_OPTIONS_TRUE'=>$lang['authorized'],
    139139    'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'],
    140    
     140
    141141    'F_ACTION' =>
    142142        PHPWG_ROOT_PATH.
     
    178178      'groups.category',
    179179      array(
    180         'NAME' => get_cat_display_name_cache($category['uppercats'], '', false)
     180        'NAME' => get_cat_display_name_cache($category['uppercats'], null, false)
    181181        )
    182182      );
     
    198198;';
    199199display_select_cat_wrapper($query_true,array(),'category_option_true');
    200  
     200
    201201$result = pwg_query($query_true);
    202202$authorized_ids = array();
  • trunk/category.php

    r1090 r1092  
    4646  session_destroy();
    4747  setcookie(session_name(),'',0, cookie_path() );
    48   $url = 'category.php';
    49   redirect( $url );
     48  redirect( make_index_url() );
    5049}
    5150
     
    114113if (isset($page['category']))
    115114{
    116   $template_title = get_cat_display_name(
    117     $page['cat_name'],
    118     'category.php?/category/',
    119     false
    120     );
     115  $template_title = get_cat_display_name( $page['cat_name'], '', false );
    121116}
    122117else
     
    207202    'search_rules',
    208203    array(
    209       'URL' => PHPWG_ROOT_PATH.'/search_rules.php?search_id='.$page['search'],
     204      'URL' => get_root_url().'search_rules.php?search_id='.$page['search'],
    210205      )
    211206    );
     
    265260  'special_cat',
    266261  array(
    267     'URL' => PHPWG_ROOT_PATH.'random.php',
     262    'URL' => get_root_url().'random.php',
    268263    'TITLE' => $lang['random_cat_hint'],
    269264    'NAME' => $lang['random_cat']
     
    396391}
    397392
     393if (is_admin() and !empty($page['items']) )
     394{
     395    $template->assign_block_vars(
     396      'caddie',
     397      array(
     398        'URL' =>
     399          add_url_param(duplicate_index_url(),'caddie=1')
     400        )
     401      );
     402  }
     403
    398404//------------------------------------------------------ main part : thumbnails
    399405if (isset($page['thumbnails_include']))
     
    454460  if ($page['cat_uploadable'])
    455461  {
    456     $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['category'];
     462    $url = get_root_url().'upload.php?cat='.$page['category'];
    457463    $template->assign_block_vars(
    458464      'upload',
  • trunk/comments.php

    r1090 r1092  
    6767  );
    6868
    69 $page['since'] = isset($_GET['since']) ? $_GET['since'] : 1;
     69$page['since'] = isset($_GET['since']) ? $_GET['since'] : 3;
    7070
    7171// on which field sorting
     
    394394    // name of the picture
    395395    $name = get_cat_display_name_cache(
    396       $categories[$comment['category_id']]['uppercats'], '', false);
     396      $categories[$comment['category_id']]['uppercats'], null, false);
    397397    $name.= $conf['level_separator'];
    398398    if (!empty($elements[$comment['image_id']]['name']))
     
    412412
    413413    // link to the full size picture
    414     $url = PHPWG_ROOT_PATH.'picture.php?cat='.$comment['category_id'];
    415     $url.= '&amp;image_id='.$comment['image_id'];
    416 
    417414    $url = make_picture_url(
    418415            array(
  • trunk/include/calendar_base.class.php

    r1090 r1092  
    262262    }
    263263
     264    $dates = $page['chronology_date'];
     265    while ($level<count($dates))
     266    {
     267      array_pop($dates);
     268    }
     269
    264270    $nav_bar = $this->get_nav_bar_from_items(
    265       $page['chronology_date'],
     271      $dates,
    266272      $level_items,
    267273      null,
  • trunk/include/calendar_monthly.class.php

    r1090 r1092  
    225225  $query.= '
    226226  GROUP BY period
    227   ORDER BY YEAR('.$this->date_field.') DESC';
     227  ORDER BY YEAR('.$this->date_field.') DESC, MONTH('.$this->date_field.')';
    228228
    229229  $result = pwg_query($query);
     
    351351    $row = mysql_fetch_array(pwg_query($query));
    352352    $items[$day]['tn_path'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
    353     $items[$day]['tn_file'] = $row['file'];
     353    $items[$day]['file'] = $row['file'];
     354    $items[$day]['path'] = $row['path'];
     355    $items[$day]['tn_ext'] = @$row['tn_ext'];
    354356    $items[$day]['width'] = $row['width'];
    355357    $items[$day]['height'] = $row['height'];
     
    446448        else
    447449        {// item not an image (tn is either mime type or an image)
    448           $tn_size = @getimagesize($items[$day]['tn_path']);
     450          $thumb = get_thumbnail_src(
     451                $items[$day]['path'], @$items[$day]['tn_ext'], false
     452              );
     453          $tn_size = @getimagesize($thumb);
    449454        }
    450455        $tn_width = $tn_size[0];
     
    549554          array(
    550555            'IMAGE'=>$data['tn_path'],
    551             'IMAGE_ALT'=>$data['tn_file'],
     556            'IMAGE_ALT'=>$data['file'],
    552557            'IMAGE_TITLE'=>$thumbnail_title,
    553558            'U_IMG_LINK'=>$url
  • trunk/include/category_default.inc.php

    r1090 r1092  
    127127      case 'search' :
    128128      {
    129         $name = replace_search($name, $_GET['search']);
     129        $name = replace_search($name, $page['search']);
    130130        break;
    131131      }
  • trunk/include/category_recent_cats.inc.php

    r1082 r1092  
    2929 * This file is included by the main page to show thumbnails for recent_cats
    3030 * category
    31  * 
     31 *
    3232 */
    3333
     
    7272      'IMAGE_ALT'   => $row['file'],
    7373      'IMAGE_TITLE' => $lang['hint_category'],
    74      
     74
    7575      'U_IMG_LINK'  => make_index_url(
    7676        array(
     
    8484    'thumbnails.line.thumbnail.category_name',
    8585    array(
    86       'NAME' => get_cat_display_name_cache($row['uppercats'], '', false),
     86      'NAME' => get_cat_display_name_cache($row['uppercats'], null, false),
    8787      )
    8888    );
    89  
     89
    9090  // create a new line ?
    9191  if (++$row_number == $user['nb_image_line'])
  • trunk/include/common.inc.php

    r1085 r1092  
    6262    @reset($_GET);
    6363  }
    64  
     64
    6565  if( is_array($_POST) )
    6666  {
  • trunk/include/functions.inc.php

    r1090 r1092  
    203203          and is_dir($directory.'/'.$file)
    204204          and $file != 'CVS'
    205           and $file != '.svn')
     205    and $file != '.svn')
    206206      {
    207207        array_push($sub_dirs, $file);
     
    357357  {
    358358   if ( ($conf['history_admin'] ) or  ( (! $conf['history_admin'])  and (!is_admin())  ) )
    359           {
     359    {
    360360    $login = ($user['id'] == $conf['guest_id'])
    361361      ? 'guest' : addslashes($user['username']);
     
    11421142  $url =
    11431143    get_root_url().'picture.php?'
    1144     .'/'.$params['image_id']
    11451144    .'/'.make_section_in_URL($params)
    11461145    ;
    1147 
    11481146  $url = add_well_known_params_in_url($url, $params);
     1147  $url.= '/'.
     1148         $params['image_id']//.'-'.
     1149         //get_filename_wo_extension($params['image_file']).'.htm'
     1150       ;
    11491151  return $url;
    11501152}
  • trunk/include/functions_category.inc.php

    r1084 r1092  
    4848  {
    4949    $login_url =
    50       './identification.php?redirect='
     50      get_root_url().'identification.php?redirect='
    5151      .urlencode(urlencode($_SERVER['REQUEST_URI']));
    52    
     52
    5353    if (!$user['is_the_guest'])
    5454    {
     
    279279    {
    280280      $option = get_cat_display_name_cache($category['uppercats'],
    281                                            '',
     281                                           null,
    282282                                           false);
    283283    }
  • trunk/include/functions_html.inc.php

    r1090 r1092  
    6767    $title .=  '&nbsp;'.$lang['days'];
    6868    $size = getimagesize( $icon_url );
     69    $icon_url = get_root_url().$icon_url;
    6970    $output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
    7071    $output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
     
    245246 * categories string returned contains categories as given in the input
    246247 * array $cat_informations. $cat_informations array must be an association
    247  * of {category_id => category_name}. If url input parameter is empty,
     248 * of {category_id => category_name}. If url input parameter is null,
    248249 * returns only the categories name without links.
    249250 *
     
    254255 */
    255256function get_cat_display_name($cat_informations,
    256                               $url = 'category.php?/category/',
     257                              $url = '',
    257258                              $replace_space = true)
    258259{
     
    272273    }
    273274
    274     if ($url == '')
     275    if ( !isset($url) )
    275276    {
    276277      $output.= $name;
     278    }
     279    elseif ($url == '')
     280    {
     281      $output.= '<a class=""';
     282      $output.= ' href="'.make_index_url( array('category'=>$id) ).'">';
     283      $output.= $name.'</a>';
    277284    }
    278285    else
     
    307314 */
    308315function get_cat_display_name_cache($uppercats,
    309                                     $url = 'category.php?/category/',
     316                                    $url = '',
    310317                                    $replace_space = true)
    311318{
     
    340347    }
    341348
    342     if ($url == '')
     349    if ( !isset($url) )
    343350    {
    344351      $output.= $name;
     352    }
     353    elseif ($url == '')
     354    {
     355      $output.= '
     356<a class=""
     357   href="'.make_index_url( array('category'=>$category_id) ).'">'.$name.'</a>';
    345358    }
    346359    else
     
    475488
    476489function get_cat_display_name_from_id($cat_id,
    477                                       $url = 'category.php?/category/',
     490                                      $url = '',
    478491                                      $replace_space = true)
    479492{
  • trunk/include/functions_rate.inc.php

    • Property svn:eol-style set to native
    • Property svn:keywords set to Author Date Id Revision
    r1084 r1092  
    77// | branch        : BSF (Best So Far)
    88// | file          : $RCSfile$
    9 // | last update   : $Date: 2006-03-15 03:26:25 +0100 (mer, 15 mar 2006) $
    10 // | last modifier : $Author: rvelices $
    11 // | revision      : $Revision: 1081 $
    12 // | revision      : $Revision: 1081 $
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1312// +-----------------------------------------------------------------------+
    1413// | This program is free software; you can redistribute it and/or modify  |
     
    3029 * rate a picture by a user
    3130 *
    32  * @param int user identifier
    3331 * @param int image identifier
    3432 * @param int rate
    3533 * @return void
    3634 */
    37 function rate_picture($user_id, $image_id, $rate)
     35function rate_picture($image_id, $rate)
    3836{
    39   global $conf;
     37  global $conf, $user;
    4038
    41   $query = '
    42 SELECT status
    43   FROM '.USER_INFOS_TABLE.'
    44   WHERE user_id = '.$user_id.'
    45 ;';
    46   list($user_status) = mysql_fetch_array(pwg_query($query));
     39  if (!isset($rate)
     40      or !$conf['rate']
     41      or !in_array($rate, $conf['rate_items']))
     42  {
     43    return;
     44  }
    4745
    48   if ('guest' == $user_status
    49       or 'generic' == $user_status)
     46  $user_anonymous = is_autorize_status(ACCESS_CLASSIC) ? false : true;
     47
     48  if ($user_anonymous and !$conf['rate_anonymous'])
    5049  {
    51     $user_anonymous = true;
     50    return;
    5251  }
    53   else
     52
     53  if ($user_anonymous)
    5454  {
    55     $user_anonymous = false;
    56   }
    57  
    58   if (isset($rate)
    59       and $conf['rate']
    60       and (!$user_anonymous or $conf['rate_anonymous'])
    61       and in_array($rate, $conf['rate_items']))
    62   {
    63     if ($user_anonymous)
     55    $ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);
     56    if (count($ip_components) > 3)
    6457    {
    65       $ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);
    66       if (count($ip_components) > 3)
    67       {
    68         array_pop($ip_components);
    69       }
    70       $anonymous_id = implode ('.', $ip_components);
    71          
    72       if (isset($_COOKIE['pwg_anonymous_rater']))
    73       {
    74         if ($anonymous_id != $_COOKIE['pwg_anonymous_rater'])
    75         { // client has changed his IP adress or he's trying to fool us
    76           $query = '
     58      array_pop($ip_components);
     59    }
     60    $anonymous_id = implode ('.', $ip_components);
     61
     62    if (isset($_COOKIE['pwg_anonymous_rater']))
     63    {
     64      if ($anonymous_id != $_COOKIE['pwg_anonymous_rater'])
     65      { // client has changed his IP adress or he's trying to fool us
     66        $query = '
    7767SELECT element_id
    7868  FROM '.RATE_TABLE.'
     
    8070    AND anonymous_id = \''.$anonymous_id.'\'
    8171;';
    82           $already_there = array_from_query($query, 'element_id');
    83          
    84           if (count($already_there) > 0)
    85           {
    86             $query = '
     72        $already_there = array_from_query($query, 'element_id');
     73
     74        if (count($already_there) > 0)
     75        {
     76          $query = '
    8777DELETE
    8878  FROM '.RATE_TABLE.'
     
    9181    AND element_id NOT IN ('.implode(',', $already_there).')
    9282;';
    93             pwg_query($query);
    94           }
     83           pwg_query($query);
     84         }
    9585
    96           $query = '
     86         $query = '
    9787UPDATE
    9888  '.RATE_TABLE.'
     
    10191    AND anonymous_id = \'' . $_COOKIE['pwg_anonymous_rater'].'\'
    10292;';
    103           pwg_query($query);
     93         pwg_query($query);
    10494
    105           setcookie(
     95         setcookie(
    10696            'pwg_anonymous_rater',
    10797            $anonymous_id,
    10898            strtotime('+10 years'),
    10999            cookie_path()
    110             );
    111         }
    112       }
    113       else
    114       {
    115         setcookie(
     100           );
     101      } // end client changed ip
     102    } // end client has cookie
     103    else
     104    {
     105      setcookie(
    116106          'pwg_anonymous_rater',
    117107          $anonymous_id,
     
    119109          cookie_path()
    120110          );
    121       }
    122111    }
    123    
    124     $query = '
     112  } // end anonymous user
     113  $query = '
    125114DELETE
    126115  FROM '.RATE_TABLE.'
    127116  WHERE element_id = '.$image_id.'
    128   AND user_id = '.$user_id.'
     117  AND user_id = '.$user['id'].'
    129118';
    130     if (isset($anonymous_id))
    131     {
    132       $query.= ' AND anonymous_id = \''.$anonymous_id.'\'';
    133     }
    134     pwg_query($query);
    135     $query = '
     119  if (isset($anonymous_id))
     120  {
     121    $query.= ' AND anonymous_id = \''.$anonymous_id.'\'';
     122  }
     123  pwg_query($query);
     124  $query = '
    136125INSERT
    137126  INTO '.RATE_TABLE.'
     
    139128  VALUES
    140129  ('
    141       .$user_id.','
    142       .(isset($anonymous_id) ? '\''.$anonymous_id.'\'' : "''").','
    143       .$image_id.','
    144       .$rate
    145       .',NOW())
     130    .$user['id'].','
     131    .(isset($anonymous_id) ? '\''.$anonymous_id.'\'' : "''").','
     132    .$image_id.','
     133    .$rate
     134    .',NOW())
    146135;';
    147     pwg_query($query);
    148        
    149     // update of images.average_rate field
    150     $query = '
     136  pwg_query($query);
     137
     138  // update of images.average_rate field
     139  $query = '
    151140SELECT ROUND(AVG(rate),2) AS average_rate
    152141  FROM '.RATE_TABLE.'
    153142  WHERE element_id = '.$image_id.'
    154143;';
    155     $row = mysql_fetch_array(pwg_query($query));
    156     $query = '
     144  $row = mysql_fetch_array(pwg_query($query));
     145  $query = '
    157146UPDATE '.IMAGES_TABLE.'
    158147  SET average_rate = '.$row['average_rate'].'
    159148  WHERE id = '.$image_id.'
    160149;';
    161     pwg_query($query);
    162   }
     150  pwg_query($query);
    163151}
    164152
  • trunk/include/functions_session.inc.php

    r1063 r1092  
    8282  { // mod_rewrite is activated for upper level directories. we must set the
    8383    // cookie to the path shown in the browser otherwise it will be discarded.
    84     $scr = $_SERVER['REDIRECT_URL'];
     84    if ( isset($_SERVER['PATH_INFO']) )
     85    {
     86      $idx = strpos( $_SERVER['REDIRECT_URL'], $_SERVER['PATH_INFO'] );
     87      if ($idx !== false)
     88      {
     89        $scr = substr($_SERVER['REDIRECT_URL'], 0, $idx);
     90      }
     91      else
     92      {//this should never happen
     93        $scr='//';
     94      }
     95    }
     96    else
     97    {
     98      $scr = $_SERVER['REDIRECT_URL'];
     99    }
    85100  }
    86101  else
    87102  {
    88     $scr = $_SERVER['PHP_SELF'];
     103    $scr = $_SERVER['SCRIPT_NAME'];
    89104  }
    90105  return substr($scr,0,strrpos( $scr,'/'));
  • trunk/include/page_tail.php

    r1024 r1092  
    3030  array(
    3131    'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
    32    
    33     'L_GEN_TIME' => $lang['generation_time'],
    34     'L_SQL_QUERIES_IN' => $lang['sql_queries_in'],
    35     'L_SEND_MAIL' => $lang['send_mail'],
     32
    3633    'L_TITLE_MAIL' => urlencode($lang['title_send_mail']),
    37     'L_POWERED_BY'=>$lang['powered_by']
    3834    ));
    3935
     
    5147
    5248//------------------------------------------------------------- generation time
     49$debug_vars = array();
    5350if ($conf['show_gt'])
    5451{
     
    6057    $page['queries_time'] = 0;
    6158  }
    62  
    63   $template->assign_block_vars(
    64     'debug',
     59
     60  $debug_vars = array_merge($debug_vars,
    6561    array('TIME' => $time,
    6662          'NB_QUERIES' => $page['count_queries'],
    67           'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s'));
     63          'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s')
     64          );
    6865}
    6966
    70 if ($conf['show_queries']) 
     67if ($conf['show_queries'])
    7168{
    72   $template->assign_block_vars(
    73     'debug',
    74     array('QUERIES_LIST' => $debug)
    75   );
     69  $debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) );
     70}
     71
     72if ( !empty($debug_vars) )
     73{
     74  $template->assign_block_vars('debug',$debug_vars );
    7675}
    7776
  • trunk/include/picture_metadata.inc.php

    • Property svn:eol-style set to native
    • Property svn:keywords set to Author Date Id Revision
    r1082 r1092  
    77// | branch        : BSF (Best So Far)
    88// | file          : $RCSfile$
    9 // | last update   : $Date: 2006-03-09 00:14:53 +0100 (jeu, 09 mar 2006) $
    10 // | last modifier : $Author: rub $
    11 // | revision      : $Revision: 1070 $
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1212// +-----------------------------------------------------------------------+
    1313// | This program is free software; you can redistribute it and/or modify  |
     
    2828/**
    2929 * This file is included by the picture page to manage picture metadata
    30  * 
     30 *
    3131 */
    3232
    33 if ($metadata_showable and isset($_GET['show_metadata']))
     33if ($metadata_showable and isset($_GET['metadata']))
    3434{
    3535  include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
     
    4242    }
    4343
    44     if ($exif = @read_exif_data($picture['current']['src']))
     44    if ($exif = @read_exif_data($picture['current']['src_file_system']))
    4545    {
    4646      $template->assign_block_vars(
  • trunk/include/picture_rate.inc.php

    • Property svn:keywords set to Author Date Id Revision
    r1090 r1092  
    77// | branch        : BSF (Best So Far)
    88// | file          : $RCSfile$
    9 // | last update   : $Date: 2006-03-09 00:14:53 +0100 (jeu, 09 mar 2006) $
    10 // | last modifier : $Author: rub $
    11 // | revision      : $Revision: 1070 $
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1212// +-----------------------------------------------------------------------+
    1313// | This program is free software; you can redistribute it and/or modify  |
     
    5555  }
    5656
    57   if ($conf['rate_anonymous'] or !$user['is_the_guest'])
     57  if ($conf['rate_anonymous'] or is_autorize_status(ACCESS_CLASSIC) )
    5858  {
    5959    if ($row['count']>0)
     
    6464      AND user_id = '.$user['id'] ;
    6565
    66       if ($user['is_the_guest'])
     66      if ( !is_autorize_status(ACCESS_CLASSIC) )
    6767      {
    6868        $ip_components = explode('.', $_SERVER['REMOTE_ADDR']);
  • trunk/include/section_init.inc.php

    • Property svn:keywords set to Author Date Id Revision
    r1090 r1092  
    77// | branch        : BSF (Best So Far)
    88// | file          : $RCSfile$
    9 // | last update   : $Date: 2006-01-27 02:11:43 +0100 (ven, 27 jan 2006) $
    10 // | last modifier : $Author: rvelices $
    11 // | revision      : $Revision: 1014 $
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1212// +-----------------------------------------------------------------------+
    1313// | This program is free software; you can redistribute it and/or modify  |
     
    8585$next_token = 0;
    8686if (basename($_SERVER['SCRIPT_NAME']) == 'picture.php')
    87 {
    88 
    89   // the first token must be the numeric identifier of the picture
    90   preg_match('/(\d+)/', $tokens[$next_token], $matches);
    91   if (!isset($matches[1]))
    92   {
    93     die('Fatal: picture identifier is missing');
    94   }
    95   $page['image_id'] = $matches[1];
    96 
    97   $next_token++;
     87{ // the last token must be the identifier for the picture
     88  $token = array_pop($tokens);
     89  if ( is_numeric($token) )
     90  {
     91    $page['image_id'] = $token;
     92  }
     93  else
     94  {
     95    preg_match('/^(\d+-)?((.*)[_\.]html?)?$/', $token, $matches);
     96    if ( isset($matches[1]) and is_numeric($matches[1]) )
     97    {
     98      $page['image_id'] = $matches[1];
     99      if ( !empty($matches[3]) )
     100      {
     101        $page['image_file'] = $matches[3];
     102      }
     103    }
     104    else
     105    {
     106      if ( !empty($matches[3]) )
     107      {
     108        $page['image_file'] = $matches[3];
     109      }
     110      else
     111      {
     112        die('Fatal: picture identifier is missing');
     113      }
     114    }
     115  }
    98116}
    99117
     
    274292        'uppercats'        => $result['uppercats'],
    275293
    276         'title' => get_cat_display_name($result['name'], '', false),
    277         )
    278       );
    279 
    280     if (!isset($_GET['calendar']))
     294        'title' => get_cat_display_name($result['name'], null, false),
     295        )
     296      );
     297
     298    if (!isset($page['chronology_field']))
    281299    {
    282300      $query = '
     
    322340  FROM '.IMAGES_TABLE.'
    323341    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
    324   WHERE '.get_sql_search_clause($_GET['search']).'
     342  WHERE '.get_sql_search_clause($page['search']).'
    325343    AND '.$forbidden.'
    326344  '.$conf['order_by'].'
     
    490508}
    491509
     510if (basename($_SERVER['SCRIPT_NAME']) == 'picture.php'
     511    and !isset($page['image_id']) )
     512{
     513  $query = '
     514SELECT id,file
     515  FROM '.IMAGES_TABLE .'
     516  WHERE id IN ('.implode(',',$page['items']).')
     517  AND file LIKE "' . $page['image_file'] . '.%" ESCAPE "|"'
     518;
     519  $result = pwg_query($query);
     520  if (mysql_num_rows($result)>0)
     521  {
     522    list($page['image_id'], $page['image_file']) = mysql_fetch_row($result);
     523  }
     524}
    492525?>
  • trunk/include/template.php

    r960 r1092  
    3535
    3636  var $classname = "Template";
    37  
     37
    3838  // variable that holds all the data we'll be substituting into
    3939  // the compiled templates.
     
    4444  // $this->_tpldata[.][0][varname] == value
    4545  var $_tpldata = array();
    46  
     46
    4747  // Hash of filenames for each template handle.
    4848  var $files = array();
    49  
     49
    5050  // Root template directory.
    5151  var $root = "";
     
    5353  // this will hash handle names to the compiled code for that handle.
    5454  var $compiled_code = array();
    55  
     55
    5656  // This will hold the uncompiled code for that handle.
    5757  var $uncompiled_code = array();
     
    5959  // output
    6060  var $output = '';
    61  
     61
    6262  /**
    6363   * Constructor. Simply sets the root dir.
     
    6868      $this->set_rootdir($root);
    6969    }
    70  
     70
    7171  /**
    7272   * Destroys this template object. Should be called when you're done with
     
    8888        return false;
    8989      }
    90      
     90
    9191      $this->root = $dir;
    9292      return true;
    9393    }
    94  
     94
    9595  /**
    9696   * Sets the template filenames for handles. $filename_array should be a
     
    103103        return false;
    104104      }
    105      
     105
    106106      reset($filename_array);
    107107      while(list($handle, $filename) = each($filename_array))
     
    109109        $this->files[$handle] = $this->make_filename($filename);
    110110      }
    111      
    112       return true;
    113     }
    114  
    115  
     111
     112      return true;
     113    }
     114
     115
    116116  /**
    117117   * Load the file for the handle, compile the file, and run the compiled
     
    124124        die("Template->pparse(): Couldn't load template file for handle $handle");
    125125      }
    126      
     126
    127127      // actually compile the template now.
    128128      if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
     
    147147        die("Template->pparse(): Couldn't load template file for handle $handle");
    148148      }
    149      
     149
    150150      // actually compile the template now.
    151151      if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
     
    170170      echo $this->output;
    171171    }
    172  
     172
    173173  /**
    174174   * Inserts the uncompiled code for $handle as the value of $varname in the
     
    185185        die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
    186186      }
    187      
     187
    188188      // Compile it, with the "no echo statements" option on.
    189189      $_str = "";
    190190      $code = $this->compile($this->uncompiled_code[$handle], true, '_str');
    191      
     191
    192192      // evaluate the variable assignment.
    193193      eval($code);
    194194      // assign the value of the generated variable to the given varname.
    195195      $this->assign_var($varname, $_str);
    196      
    197       return true;
    198     }
    199  
     196
     197      return true;
     198    }
     199
    200200  /**
    201201   * Block-level variable assignment. Adds a new block iteration with the
     
    221221        // variable assignments.
    222222        $str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';
    223        
     223
    224224        // Now we evaluate this assignment we've built up.
    225225        eval($str);
     
    231231        $this->_tpldata[$blockname . '.'][] = $vararray;
    232232      }
    233      
    234       return true;
    235     }
    236  
     233
     234      return true;
     235    }
     236
    237237  /**
    238238   * Root-level variable assignment. Adds to current assignments, overriding
     
    246246        $this->_tpldata['.'][0][$key] = $val;
    247247      }
    248      
    249       return true;
    250     }
    251  
     248
     249      return true;
     250    }
     251
    252252  /**
    253253   * Root-level variable assignment. Adds to current assignments, overriding
     
    257257    {
    258258      $this->_tpldata['.'][0][$varname] = $varval;
    259      
    260       return true;
    261     }
    262  
    263  
     259
     260      return true;
     261    }
     262
     263
    264264  /**
    265265   * Generates a full path+filename for the given filename, which can either
     
    275275        $filename = $this->root.'/'.$filename;
    276276      }
    277      
     277
    278278      if (!file_exists($filename))
    279279      {
     
    283283      return $filename;
    284284    }
    285  
    286  
     285
     286
    287287  /**
    288288   * If not already done, load the file for the given handle and populate
     
    298298        return true;
    299299      }
    300      
     300
    301301      // If we don't have a file assigned to this handle, die.
    302302      if (!isset($this->files[$handle]))
     
    304304        die("Template->loadfile(): No file specified for handle $handle");
    305305      }
    306      
     306
    307307      $filename = $this->files[$handle];
    308      
     308
    309309      $str = implode("", @file($filename));
    310310      if (empty($str))
     
    329329  function compile($code, $do_not_echo = false, $retvar = '')
    330330    {
     331      $code = preg_replace('/\{pwg_root\}/e', "get_root_url()", $code);
    331332      // PWG specific : communication between template and $lang
    332333      $code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code);
    333334      // PWG specific : expand themeconf.inc.php variables
    334335      $code = preg_replace('/\{themeconf:([^}]+)\}/e', "get_themeconf('$1')", $code);
    335            
     336
    336337      // replace \ with \\ and then ' with \'.
    337338      $code = str_replace('\\', '\\\\', $code);
    338339      $code = str_replace('\'', '\\\'', $code);
    339      
     340
    340341      // change template varrefs into PHP varrefs
    341      
     342
    342343      // This one will handle varrefs WITH namespaces
    343344      $varrefs = array();
     
    349350        $varname = $varrefs[3][$i];
    350351        $new = $this->generate_block_varref($namespace, $varname);
    351        
     352
    352353        $code = str_replace($varrefs[0][$i], $new, $code);
    353354      }
    354      
     355
    355356      // This will handle the remaining root-level varrefs
    356357      $code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'', $code);
    357      
     358
    358359      // Break it up into lines.
    359360      $code_lines = explode("\n", $code);
    360      
     361
    361362      $block_nesting_level = 0;
    362363      $block_names = array();
    363364      $block_names[0] = ".";
    364      
     365
    365366      // Second: prepend echo ', append ' . "\n"; to each line.
    366367      $line_count = sizeof($code_lines);
     
    372373          $n[0] = $m[0];
    373374          $n[1] = $m[1];
    374          
     375
    375376          // Added: dougk_ff7-Keeps templates from bombing if begin is on
    376377          // the same line as end.. I think. :)
     
    389390            {
    390391              // This block is nested.
    391              
     392
    392393              // Generate a namespace string for this block.
    393394              $namespace = implode('.', $block_names);
     
    402403              $code_lines[$i] .= "\n" . '{';
    403404            }
    404            
     405
    405406            // We have the end of a block.
    406407            unset($block_names[$block_nesting_level]);
     
    425426            {
    426427              // This block is nested.
    427              
     428
    428429              // Generate a namespace string for this block.
    429430              $namespace = implode('.', $block_names);
     
    456457          else
    457458          {
    458             $code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";'; 
     459            $code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";';
    459460          }
    460461        }
    461462      }
    462      
     463
    463464      // Bring it back into a single string of lines of code.
    464465      $code = implode("\n", $code_lines);
    465466      return $code      ;
    466      
    467     }
    468  
    469  
     467
     468    }
     469
     470
    470471  /**
    471472   * Generates a reference to the given variable inside the given (possibly
     
    479480      // Strip the trailing period.
    480481      $namespace = substr($namespace, 0, strlen($namespace) - 1);
    481      
     482
    482483      // Get a reference to the data block for this namespace.
    483484      $varref = $this->generate_block_data_ref($namespace, true);
    484485      // Prepend the necessary code to stick this in an echo line.
    485      
     486
    486487      // Append the variable reference.
    487488      $varref .= '[\'' . $varname . '\']';
    488      
     489
    489490      $varref = '\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \'';
    490      
     491
    491492      return $varref;
    492      
    493     }
    494  
    495  
     493
     494    }
     495
     496
    496497  /**
    497498   * Generates a reference to the array of data values for the given
     
    521522              $varref .= '[$_' . $blocks[$blockcount] . '_i]';
    522523      }
    523      
     524
    524525      return $varref;
    525526    }
    526  
     527
    527528}
    528529
  • 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.= '&amp;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';
  • trunk/search_rules.php

    r1083 r1092  
    141141        'NAME' => get_cat_display_name_cache(
    142142          $category['uppercats'],
    143           '',                      // no url on category names
     143          null,                      // no url on category names
    144144          false                    // no blank replacement
    145145          )
  • trunk/template/yoga/category.tpl

    r1083 r1092  
    9292        </p>
    9393    <ul class="actions">
    94       <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
    95       <li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
     94      <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{pwg_root}{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
     95      <li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{pwg_root}{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
    9696    </ul>
    9797
     
    120120
    121121      <!-- BEGIN caddie -->
    122       <li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
     122      <li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
    123123      <!-- END caddie -->
    124124
    125125      <!-- BEGIN edit -->
    126       <li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
     126      <li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="{pwg_root}{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
    127127      <!-- END edit -->
    128128
    129129      <!-- BEGIN search_rules -->
    130       <li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
     130      <li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
    131131      <!-- END search_rules -->
    132132
    133133      <!-- BEGIN mode_normal -->
    134       <li><a href="{mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>
     134      <li><a href="{mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{pwg_root}{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>
    135135      <!-- END mode_normal -->
    136136      <!-- BEGIN mode_posted -->
    137       <li><a href="{mode_posted.URL}" title="{lang:mode_posted_hint}"><img src="{themeconf:icon_dir}/calendar.png" class="button" alt="{lang:mode_posted_hint}"></a></li>
     137      <li><a href="{mode_posted.URL}" title="{lang:mode_posted_hint}"><img src="{pwg_root}{themeconf:icon_dir}/calendar.png" class="button" alt="{lang:mode_posted_hint}"></a></li>
    138138      <!-- END mode_posted -->
    139139      <!-- BEGIN mode_created -->
    140       <li><a href="{mode_created.URL}" title="{lang:mode_created_hint}"><img src="{themeconf:icon_dir}/calendar_created.png" class="button" alt="{lang:mode_created_hint}"></a></li>
     140      <li><a href="{mode_created.URL}" title="{lang:mode_created_hint}"><img src="{pwg_root}{themeconf:icon_dir}/calendar_created.png" class="button" alt="{lang:mode_created_hint}"></a></li>
    141141      <!-- END mode_created -->
    142142    </ul>
  • trunk/template/yoga/footer.tpl

    r1012 r1092  
    11<div id="copyright">
    22 <!-- BEGIN debug -->
    3  {L_GEN_TIME} {debug.TIME} ({debug.NB_QUERIES} {L_SQL_QUERIES_IN} {debug.SQL_TIME}) -
     3 {lang:generation_time} {debug.TIME} ({debug.NB_QUERIES} {lang:sql_queries_in} {debug.SQL_TIME}) -
    44 <!-- END debug -->
    55
     
    88          to show the origin of the script...-->
    99
    10   {L_POWERED_BY} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a>
     10  {lang:powered_by} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a>
    1111  {VERSION}
    1212  <!-- BEGIN contact -->
    13   - {L_SEND_MAIL}
     13  - {lang:send_mail}
    1414  <a href="mailto:{contact.MAIL}?subject={L_TITLE_MAIL}">{lang:Webmaster}</a>
    1515  <!-- END contact -->
  • trunk/template/yoga/header.tpl

    r1071 r1092  
    44<head>
    55<meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
    6 <link rel="shortcut icon" type="image/x-icon" href="template-common/favicon.ico" />
    7 <link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-layout.css">
     6<link rel="shortcut icon" type="image/x-icon" href="{pwg_root}template-common/favicon.ico" />
     7<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-layout.css">
    88<!-- the next css is used to fix khtml (Konqueror/Safari) issue
    99the "text/nonsense" prevents gecko based browsers to load it -->
    10 <link rel="stylesheet" type="text/nonsense" href="template/{themeconf:template}/fix-khtml.css">
    11 <link rel="stylesheet" type="text/css" media="print" href="template/{themeconf:template}/print.css">
    12 <link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-colors.css">
    13 <link rel="stylesheet" type="text/css" href="template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
     10<link rel="stylesheet" type="text/nonsense" href="{pwg_root}template/{themeconf:template}/fix-khtml.css">
     11<link rel="stylesheet" type="text/css" media="print" href="{pwg_root}template/{themeconf:template}/print.css">
     12<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-colors.css">
     13<link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
    1414<!-- BEGIN next -->
    1515<link rel="prefetch" href="{next.U_IMG_SRC}">
     
    1919<!-- END refresh -->
    2020<title>{GALLERY_TITLE}:{PAGE_TITLE}</title>
    21 <script type="text/javascript" src="include/scripts.js"></script>
     21<script type="text/javascript" src="{pwg_root}include/scripts.js"></script>
    2222<!--[if gte IE 5.5000]>
    23 <script type="text/javascript" src="include/pngfix.js"></script>
     23<script type="text/javascript" src="{pwg_root}include/pngfix.js"></script>
    2424<![endif]-->
    2525</head>
  • trunk/template/yoga/picture.tpl

    r1085 r1092  
    1515
    1616<div class="randomButtons">
    17   <a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}" rel="nofollow"><img src="{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
    18   <a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
     17  <a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
     18  <a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{pwg_root}{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
    1919<!-- BEGIN representative -->
    20   <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"/></a>
     20  <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{pwg_root}{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"/></a>
    2121<!-- END representative -->
    2222<!-- BEGIN favorite -->
     
    2424<!-- END favorite -->
    2525<!-- BEGIN download -->
    26   <a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="{themeconf:icon_dir}/save.png" class="button" alt="{L_DOWNLOAD}"></a>
     26  <a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="{pwg_root}{themeconf:icon_dir}/save.png" class="button" alt="{L_DOWNLOAD}"></a>
    2727<!-- END download -->
    2828<!-- BEGIN admin -->
    29   <a href="{U_ADMIN}" title="{L_ADMIN}"><img src="{themeconf:icon_dir}/preferences.png" class="button" alt="{L_ADMIN}"></a>
     29  <a href="{U_ADMIN}" title="{L_ADMIN}"><img src="{pwg_root}{themeconf:icon_dir}/preferences.png" class="button" alt="{L_ADMIN}"></a>
    3030<!-- END admin -->
    3131<!-- BEGIN caddie -->
    32   <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
     32  <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
    3333<!-- END caddie -->
    3434</div>
     
    3636<div class="navButtons">
    3737<!-- BEGIN last -->
    38   <a class="navButton prev" href="{last.U_IMG}" rel="last"><img src="{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
     38  <a class="navButton prev" href="{last.U_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a>
    3939<!-- END last -->
    4040<!-- BEGIN next -->
    41   <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{themeconf:icon_dir}/right.png" class="button" alt="next"></a>
     41  <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="next"></a>
    4242<!-- END next -->
    43   <a class="navButton up" href="{U_UP}" title="{L_UP_HINT}" rel="up"><img src="{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
     43  <a class="navButton up" href="{U_UP}" title="{L_UP_HINT}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
    4444<!-- BEGIN previous -->
    45   <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{themeconf:icon_dir}/left.png" class="button" alt="previous"></a>
     45  <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="previous"></a>
    4646<!-- END previous -->
    4747<!-- BEGIN first -->
    48   <a class="navButton prev" href="{first.U_IMG}" rel="first"><img src="{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
     48  <a class="navButton prev" href="{first.U_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a>
    4949<!-- END first -->
    5050</div>
     
    171171  <p class="userCommentDelete">
    172172  <a href="{comments.comment.delete.U_COMMENT_DELETE}" title="{L_DELETE_COMMENT}">
    173     <img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
     173    <img src="{pwg_root}{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
    174174  </a>
    175175  </p>
  • trunk/template/yoga/theme/clear/themeconf.inc.php

    • Property svn:eol-style set to native
    r1029 r1092  
    33  'template' => 'yoga',
    44  'theme' => 'clear',
    5   'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
    6   'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
    7   'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/'
     5  'icon_dir' => 'template/yoga/icon',
     6  'admin_icon_dir' => 'template/yoga/icon/admin',
     7  'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
    88);
    99?>
  • trunk/template/yoga/theme/dark/themeconf.inc.php

    • Property svn:eol-style set to native
    r1029 r1092  
    33  'template' => 'yoga',
    44  'theme' => 'dark',
    5   'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
    6   'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
    7   'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mimetypes/'
     5  'icon_dir' => 'template/yoga/icon',
     6  'admin_icon_dir' => 'template/yoga/icon/admin',
     7  'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
    88);
    99?>
Note: See TracChangeset for help on using the changeset viewer.