Changeset 1125


Ignore:
Timestamp:
Apr 5, 2006, 4:01:36 AM (18 years ago)
Author:
rvelices
Message:

image sort order for tags

very minor code and language simplifications and corrections

Location:
trunk
Files:
8 edited

Legend:

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

    r1109 r1125  
    3838      ( isset($page['category']) and is_numeric($page['category']) ) )
    3939  { // we will regenerate the items by including subcats elements
    40     $page['cat_nb_images'] = 0;
    4140    $page['items'] = array();
    4241    $inner_sql .= '
     
    187186      unset(
    188187        $page['thumbnails_include'],
    189         $page['items'],
    190         $page['cat_nb_images']
     188        $page['items']
    191189        );
    192190
     
    271269
    272270    $page['items']              = array_from_query($query, 'id');
    273     $page['cat_nb_images']      = count($page['items']);
    274271    $page['thumbnails_include'] = 'include/category_default.inc.php';
    275272  }
  • trunk/include/section_init.inc.php

    r1120 r1125  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    299299        'cat_dir'          => $result['dir'],
    300300        'cat_name'         => $result['name'],
    301         'cat_nb_images'    => $result['nb_images'],
    302301        'cat_site_id'      => $result['site_id'],
    303302        'cat_uploadable'   => $result['uploadable'],
     
    365364      $query = '
    366365SELECT image_id
    367   FROM '.IMAGE_CATEGORY_TABLE.'
     366  FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
    368367  WHERE image_id IN ('.implode(',', $items).')
    369     AND '.$forbidden.'
     368    AND '.$forbidden.
     369    $conf['order_by'].'
    370370;';
    371371      $items = array_unique(
     
    512512      array(
    513513        'title' => $lang['recent_cats_cat'],
    514         'cat_nb_images' => 0,
    515514        'thumbnails_include' => 'include/category_recent_cats.inc.php',
    516515        )
     
    592591      );
    593592  }
    594 
    595   if (!isset($page['cat_nb_images']))
    596   {
    597     $page['cat_nb_images'] = count($page['items']);
    598   }
    599593}
    600594
     
    608602  initialize_calendar();
    609603}
     604
     605$page['cat_nb_images'] = isset($page['items']) ? count($page['items']) : 0;
    610606
    611607if (basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php'
  • trunk/install/db/19-database.php

    r1119 r1125  
    8181      $tag_id[$keyword] = $current_id++;
    8282    }
    83    
     83
    8484    if (!isset($tag_images[ $tag_id[$keyword] ]))
    8585    {
     
    103103    );
    104104}
     105if (!empty($datas))
    105106mass_inserts(
    106107  PREFIX_TABLE.'tags',
     
    124125}
    125126
     127if (!empty($datas))
    126128mass_inserts(
    127129  PREFIX_TABLE.'image_tag',
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r1119 r1125  
    295295$lang['search_date_type'] = 'Kind of date';
    296296$lang['search_descending'] = 'Descending';
    297 $lang['search_explain'] = 'Use * as a wildcard for partial matches';
    298297$lang['search_keywords'] = 'Search for words';
    299298$lang['search_mode_and'] = 'Search for all terms ';
  • trunk/language/en_UK.iso-8859-1/help/notification_by_mail.html

    r1105 r1125  
    11<h2>Notification by mail</h2>
    22
    3 <p>This screen allows to configure, to manage the notification to users of news sendinf mail.</p>
     3<p>This screen allows to configure and manage email notifications to users of news on your site.</p>
    44
    55<p>This screen is composed of 3 tabs:</p>
     
    99
    1010<h3>Subscribe</h3>
    11 <p>Available only for webmasters, this tab manages subscribe/unsubscribe of notification by mail.</p>
     11<p>Available only for webmasters, this tab manages subscription/unsubscription of users to email notifications.</p>
    1212
    1313<h3>Envoi</h3>
  • trunk/language/fr_FR.iso-8859-1/common.lang.php

    r1119 r1125  
    295295$lang['search_date_type'] = 'Type de date';
    296296$lang['search_descending'] = 'Décroissant';
    297 $lang['search_explain'] = 'Utiliser * comme un joker pour une recherche partielle';
    298297$lang['search_keywords'] = 'Recherche de mot';
    299298$lang['search_mode_and'] = 'Rechercher tous les mots';
  • trunk/search.php

    r1119 r1125  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    7373      );
    7474  }
    75  
     75
    7676  if ($_POST['search_author'])
    7777  {
     
    177177
    178178$template->set_filenames( array('search'=>'search.tpl') );
     179
     180$available_tags = get_available_tags(
     181      isset($user['forbidden_categories'])
     182      ? explode(',', $user['forbidden_categories'])
     183      : null
     184      );
     185usort( $available_tags, 'name_compare');
     186
    179187$template->assign_vars(array(
    180   'L_SEARCH_TITLE' => $lang['search_title'],
    181   'L_SEARCH_OPTIONS' => $lang['search_options'],
    182   'L_RETURN' => $lang['home'],
    183   'L_SUBMIT' => $lang['submit'],
    184   'L_RESET' => $lang['reset'],
    185   'L_SEARCH_KEYWORDS'=>$lang['search_keywords'],
    186   'L_SEARCH_ANY_TERMS'=>$lang['search_mode_or'],
    187   'L_SEARCH_ALL_TERMS'=>$lang['search_mode_and'],
    188   'L_SEARCH_AUTHOR'=>$lang['search_author'],
    189   'L_SEARCH_AUTHOR_HINT'=>$lang['search_explain'],
    190   'L_SEARCH_CATEGORIES'=>$lang['search_categories'],
    191   'L_SEARCH_SUBFORUMS'=>$lang['search_subcats_included'],
    192   'L_YES' => $lang['yes'],
    193   'L_NO' => $lang['no'],
    194   'L_SEARCH_DATE' => $lang['search_date'],
    195   'L_TODAY' => $lang['today'],
    196   'L_SEARCH_DATE_FROM'=>$lang['search_date_from'],
    197   'L_SEARCH_DATE_TO'=>$lang['search_date_to'],
    198   'L_DAYS'=>$lang['days'],
    199   'L_MONTH'=>$lang['w_month'],
    200   'L_SEARCH_DATE_TYPE'=>$lang['search_date_type'],
    201   'L_RESULT_SORT'=>$lang['search_sort'],
    202   'L_SORT_ASCENDING'=>$lang['search_ascending'],
    203   'L_SORT_DESCENDING'=>$lang['search_descending'],
    204 
    205188  'TODAY_DAY' => date('d', time()),
    206189  'TODAY_MONTH' => date('m', time()),
     
    211194
    212195  'TAG_SELECTION' => get_html_tag_selection(
    213     get_available_tags(
    214       isset($user['forbidden_categories'])
    215       ? explode(',', $user['forbidden_categories'])
    216       : null
    217       ),
     196    $available_tags,
    218197    'tags',
    219198    isset($_POST['tags']) ? $_POST['tags'] : array()
  • trunk/template/yoga/search.tpl

    r1119 r1125  
    2222<table width="100%" align="center" cellpadding="2">
    2323  <tr>
    24     <td width="50%" colspan="2"><b>{L_SEARCH_KEYWORDS} : </b>
     24    <td width="50%" colspan="2"><b>{lang:search_keywords} : </b>
    2525    <td colspan="2" valign="top">
    2626          <input type="text" style="width: 300px" name="search_allwords" size="30" />
    2727          <br />
    28           <input type="radio" name="mode" value="AND" checked="checked" /> {L_SEARCH_ALL_TERMS}<br />
    29           <input type="radio" name="mode" value="OR" /> {L_SEARCH_ANY_TERMS}
     28          <input type="radio" name="mode" value="AND" checked="checked" /> {lang:search_mode_and}<br />
     29          <input type="radio" name="mode" value="OR" /> {lang:search_mode_or}
    3030        </td>
    3131  </tr>
    3232  <tr>
    33     <td colspan="2"><b>{L_SEARCH_AUTHOR} :</b>
     33    <td colspan="2"><b>{lang:search_author} :</b>
    3434    <td colspan="2" valign="middle">
    3535          <input type="text" style="width: 300px" name="search_author" size="30" />
    3636        </td>
    3737  </tr>
    38  
     38
    3939  <tr>
    4040    <td colspan="2"><b>{lang:Search tags} :</b></td>
     
    4545    </td>
    4646  </tr>
    47  
     47
    4848  <tr>
    49     <td colspan="2"><b>{L_SEARCH_DATE} :</b>
     49    <td colspan="2"><b>{lang:search_date} :</b>
    5050    <td colspan="2" valign="middle">
    5151      <table>
    5252        <tr>
    53           <td>{L_SEARCH_DATE_FROM} :</td>
     53          <td>{lang:search_date_from} :</td>
    5454          <td>
    5555            <select name="start_day">
     
    6464            </select>
    6565            <input name="start_year" type="text" size="4" maxlength="4">&nbsp;
    66             <a href="#" name="#" onClick="document.post.start_day.value={TODAY_DAY};document.post.start_month.value={TODAY_MONTH};document.post.start_year.value={TODAY_YEAR};" />{L_TODAY}</a>
     66            <a href="#" name="#" onClick="document.post.start_day.value={TODAY_DAY};document.post.start_month.value={TODAY_MONTH};document.post.start_year.value={TODAY_YEAR};" />{lang:today}</a>
    6767          </td>
    6868        </tr>
    6969        <tr>
    70           <td>{L_SEARCH_DATE_TO} :</td>
     70          <td>{lang:search_date_to} :</td>
    7171          <td>
    7272            <select name="end_day">
     
    8181            </select>
    8282            <input name="end_year" type="text" size="4" maxlength="4">&nbsp;
    83             <a href="#" name="#" onClick="document.post.end_day.value={TODAY_DAY};document.post.end_month.value={TODAY_MONTH};document.post.end_year.value={TODAY_YEAR};" />{L_TODAY}</a>
     83            <a href="#" name="#" onClick="document.post.end_day.value={TODAY_DAY};document.post.end_month.value={TODAY_MONTH};document.post.end_year.value={TODAY_YEAR};" />{lang:today}</a>
    8484          </td>
    8585        </tr>
     
    8888  </tr>
    8989  <tr class="admin">
    90     <th colspan="4">{L_SEARCH_OPTIONS}</th>
     90    <th colspan="4">{lang:search_options}</th>
    9191  </tr>
    9292  <tr>
    93     <td width="25%" ><b>{L_SEARCH_CATEGORIES} : </b>
     93    <td width="25%" ><b>{lang:search_categories} : </b>
    9494    <td width="25%" nowrap="nowrap">
    9595          <select style="width:200px" name="cat[]" multiple="multiple" size="8">
     
    9999      </select>
    100100        </td>
    101     <td width="25%" nowrap="nowrap"><b>{L_SEARCH_SUBFORUMS} : </b></td>
     101    <td width="25%" nowrap="nowrap"><b>{lang:search_subcats_included} : </b></td>
    102102    <td width="25%" nowrap="nowrap">
    103           <input type="radio" name="subcats-included" value="1" checked="checked" />{L_YES}&nbsp;&nbsp;
    104           <input type="radio" name="subcats-included" value="0" />{L_NO}
     103          <input type="radio" name="subcats-included" value="1" checked="checked" />{lang:yes}&nbsp;&nbsp;
     104          <input type="radio" name="subcats-included" value="0" />{lang:no}
    105105        </td>
    106106   </tr>
    107107   <tr>
    108     <td width="25%" nowrap="nowrap"><b>{L_SEARCH_DATE_TYPE} : </b></td>
     108    <td width="25%" nowrap="nowrap"><b>{lang:search_date_type} : </b></td>
    109109    <td width="25%" nowrap="nowrap">
    110110          <input type="radio" name="date_type" value="date_creation" checked="checked" />{lang:Creation date}<br />
    111111          <input type="radio" name="date_type" value="date_available" />{lang:Post date}
    112112        </td>
    113         <td><b>{L_RESULT_SORT} : </b></td>
     113        <td><b>{lang:search_sort} : </b></td>
    114114    <td nowrap="nowrap">
    115           <input type="radio" name="sd" value="AND" />{L_SORT_ASCENDING}<br />
    116           <input type="radio" name="sd" value="d" checked="checked" />{L_SORT_DESCENDING}
     115          <input type="radio" name="sd" value="AND" />{lang:search_ascending}<br />
     116          <input type="radio" name="sd" value="d" checked="checked" />{lang:search_descending}
    117117        </td>
    118118  </tr>
     
    126126  </tr>
    127127  <tr>
    128     <td><b>{L_RESULT_SORT} : </b></td>
     128    <td><b>{lang:search_sort} : </b></td>
    129129    <td nowrap="nowrap">
    130130          {S_SELECT_SORT_KEY}<br />
    131           <input type="radio" name="sd" value="a" />{L_SORT_ASCENDING}<br />
    132           <input type="radio" name="sd" value="d" checked="checked" />{L_SORT_DESCENDING}
     131          <input type="radio" name="sd" value="a" />{lang:search_ascending}<br />
     132          <input type="radio" name="sd" value="d" checked="checked" />{lang:search_descending}
    133133        </td>
    134134    <td nowrap="nowrap"><b>{L_DISPLAY_RESULTS} : </b></td>
     
    141141<tr>
    142142<td align="center" valign="bottom" colspan="4" height="38">
    143 <input type="submit" name="submit" value="{L_SUBMIT}" class="bouton" />&nbsp;&nbsp;
    144 <input type="reset" value="{L_RESET}" class="bouton" />
     143<input type="submit" name="submit" value="{lang:submit}" class="bouton" />&nbsp;&nbsp;
     144<input type="reset" value="{lang:reset}" class="bouton" />
    145145</td>
    146146</table>
Note: See TracChangeset for help on using the changeset viewer.