- Timestamp:
- Jul 9, 2004, 11:00:00 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r394 r452 91 91 } 92 92 // periods must be integer values, they represents number of days 93 if ( !preg_match( $int_pattern, $_POST['short_period'])94 or !preg_match( $int_pattern, $_POST['long_period'] ))93 if (!preg_match($int_pattern, $_POST['recent_period']) 94 or $_POST['recent_period'] <= 0) 95 95 { 96 96 array_push( $error, $lang['err_periods'] ); 97 }98 else99 {100 // long period must be longer than short period101 if ( $_POST['long_period'] <= $_POST['short_period']102 or $_POST['short_period'] <= 0 )103 {104 array_push( $error, $lang['err_periods_2'] );105 }106 97 } 107 98 // session_id size must be an integer between 4 and 50 … … 217 208 'NB_ROW_PAGE'=>$conf['nb_line_page'], 218 209 'STYLE_SELECT'=>style_select($conf['default_style'], 'default_style'), 219 'SHORT_PERIOD'=>$conf['short_period'], 220 'LONG_PERIOD'=>$conf['long_period'], 210 'RECENT_PERIOD'=>$conf['recent_period'], 221 211 'UPLOAD_MAXSIZE'=>$conf['upload_maxfilesize'], 222 212 'UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth'], … … 272 262 'L_STYLE_SELECT'=>$lang['customize_theme'], 273 263 'L_STYLE_SELECT_INFO'=>$lang['conf_default_theme_info'], 274 'L_SHORT_PERIOD'=>$lang['customize_short_period'], 275 'L_SHORT_PERIOD_INFO'=>$lang['conf_default_short_period_info'], 276 'L_LONG_PERIOD'=>$lang['customize_long_period'], 277 'L_LONG_PERIOD_INFO'=>$lang['conf_default_long_period_info'], 264 'L_RECENT_PERIOD'=>$lang['customize_recent_period'], 265 'L_RECENT_PERIOD_INFO'=>$lang['conf_default_recent_period_info'], 278 266 'L_EXPAND_TREE'=>$lang['customize_expand'], 279 267 'L_EXPAND_TREE_INFO'=>$lang['conf_default_expand_info'], -
trunk/category.php
r441 r452 161 161 } 162 162 163 $icon_ short = get_icon( date( 'Y-m-d' ));163 $icon_recent = get_icon(date('Y-m-d')); 164 164 165 165 $template->assign_vars(array( … … 202 202 203 203 'T_COLLAPSED' => $user['lien_collapsed'], 204 'T_SHORT' => $icon_short, 205 'T_LONG'=>get_icon(date( 'Y-m-d',time()-($user['short_period']*24*60*60+1))), 204 'T_RECENT' => $icon_recent, 206 205 207 206 'U_HOME' => add_session_id( PHPWG_ROOT_PATH.'category.php' ), -
trunk/include/category_recent_cats.inc.php
r440 r452 39 39 FROM '.CATEGORIES_TABLE.' 40 40 WHERE date_last > SUBDATE(CURRENT_DATE 41 ,INTERVAL '.$user[' short_period'].' DAY)';41 ,INTERVAL '.$user['recent_period'].' DAY)'; 42 42 if ( $user['forbidden_categories'] != '' ) 43 43 { … … 71 71 WHERE category_id = '.$row['category_id'].' 72 72 AND date_available > SUBDATE(CURRENT_DATE 73 ,INTERVAL '.$user[' short_period'].' DAY)73 ,INTERVAL '.$user['recent_period'].' DAY) 74 74 AND id = image_id 75 75 ORDER BY RAND() -
trunk/include/functions_user.inc.php
r423 r452 85 85 $infos = array( 'nb_image_line', 'nb_line_page', 'language', 86 86 'maxwidth', 'maxheight', 'expand', 'show_nb_comments', 87 'short_period', 'long_period', 'template', 88 'forbidden_categories' ); 87 'recent_period', 'template', 'forbidden_categories' ); 89 88 $query = 'SELECT '; 90 89 for ( $i = 0; $i < sizeof( $infos ); $i++ ) -
trunk/include/htmlfunctions.inc.php
r438 r452 37 37 $output = ''; 38 38 $title = $lang['recent_image'].' '; 39 if ( $diff < $user[' long_period'] * $day_in_seconds )39 if ( $diff < $user['recent_period'] * $day_in_seconds ) 40 40 { 41 41 $icon_url = './template/'.$user['template'].'/theme/'; 42 if ( $diff < $user['short_period'] * $day_in_seconds ) 43 { 44 $icon_url.= 'new_short.gif'; 45 $title .= $user['short_period']; 46 } 47 else 48 { 49 $icon_url.= 'new_long.gif'; 50 $title .= $user['long_period']; 51 } 42 $icon_url.= 'recent.gif'; 43 $title .= $user['recent_period']; 52 44 $title .= ' '.$lang['days']; 53 45 $size = getimagesize( $icon_url ); -
trunk/include/user.inc.php
r405 r452 33 33 $infos = array( 'id', 'username', 'mail_address', 'nb_image_line', 34 34 'nb_line_page', 'status', 'language', 'maxwidth', 35 'maxheight', 'expand', 'show_nb_comments', ' short_period',36 ' long_period', 'template', 'forbidden_categories' );35 'maxheight', 'expand', 'show_nb_comments', 'recent_period', 36 'template', 'forbidden_categories' ); 37 37 38 38 $query_user = 'SELECT '.implode( ',', $infos ); -
trunk/install/config.sql
r399 r452 25 25 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_image_line','5','Number of images displayed per row'); 26 26 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_line_page','3','Number of rows displayed per page'); 27 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('short_period','7','Period within which pictures are displayed as new (in days)'); 28 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('long_period','14','Long period within which pictures are displayed as new (in days)'); 27 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('recent_period','7','Period within which pictures are displayed as new (in days)'); 29 28 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('auto_expand','false','Auto expand of the category tree'); 30 29 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('show_nb_comments','true','Show the number of comments under the thumbnails'); -
trunk/language/en_UK.iso-8859-1/admin.lang.php
r403 r452 113 113 $lang['conf_upload_title'] = 'Configuration of the users upload'; 114 114 $lang['conf_upload_available'] = 'authorized the upload of pictures'; 115 $lang['conf_upload_available_info'] = ''; 115 116 $lang['conf_upload_maxfilesize'] = 'maximum filesize'; 116 117 $lang['conf_upload_maxfilesize_info'] = 'Maximum filesize for the uploaded pictures. Must be a number between 10 and 1000 KB.'; … … 147 148 $lang['conf_default_nb_image_per_row_info'] = 'number of pictures for each row by default'; 148 149 $lang['conf_default_nb_row_per_page_info'] = 'number of rows by page by default'; 149 $lang['conf_default_short_period_info'] = 'By days. Period within a picture is shown with a red mark. The short period must be superior to 1 day.'; 150 $lang['conf_default_long_period_info'] = 'By days. Period within a picture is shown with a green mark. The long period must be superior to the short period.'; 150 $lang['conf_default_recent_period_info'] = 'By days. Period within a picture is shown as new. The short period must be superior to 1 day.'; 151 151 $lang['conf_default_expand_info'] = 'expand all categories by default in the menu ?'; 152 152 $lang['conf_default_show_nb_comments_info'] = 'show the number of comments for each picture on the thumbnails page'; -
trunk/language/en_UK.iso-8859-1/common.lang.php
r439 r452 220 220 $lang['customize_expand'] = 'expand all categories'; 221 221 $lang['customize_show_nb_comments'] = 'show number of comments'; 222 $lang['customize_short_period'] = 'short period'; 223 $lang['customize_long_period'] = 'long period'; 222 $lang['customize_recent_period'] = 'recent period'; 224 223 $lang['customize_template'] = 'template'; 225 $lang['err_periods'] = 'periods must be integer values'; 226 $lang['err_periods_2'] = 'periods must be superior to 0. The long period must be grater than the short period.'; 224 $lang['err_periods'] = 'recent period must be a positive integer value'; 227 225 $lang['create_cookie'] = 'create a cookie'; 228 226 $lang['customize_day'] = 'day'; -
trunk/profile.php
r405 r452 41 41 $infos = array( 'nb_image_line', 'nb_line_page', 'language', 42 42 'maxwidth', 'maxheight', 'expand', 'show_nb_comments', 43 ' short_period', 'long_period', 'template', 'mail_address' );43 'recent_period', 'template', 'mail_address' ); 44 44 // mise à jour dans la base de données des valeurs 45 45 // des paramètres pour l'utilisateur courant … … 63 63 } 64 64 // periods must be integer values, they represents number of days 65 if ( !preg_match( $int_pattern, $_POST['short_period'])66 or !preg_match( $int_pattern, $_POST['long_period'] ))65 if (!preg_match($int_pattern, $_POST['recent_period']) 66 or $_POST['recent_period'] <= 0) 67 67 { 68 68 array_push( $errors, $lang['err_periods'] ); 69 }70 else71 {72 // long period must be longer than short period73 if ( $_POST['long_period'] <= $_POST['short_period']74 or $_POST['short_period'] <= 0 )75 {76 array_push( $errors, $lang['err_periods_2'] );77 }78 69 } 79 70 $mail_error = validate_mail_address( $_POST['mail_address'] ); … … 138 129 'NB_ROW_PAGE'=>$user['nb_line_page'], 139 130 'STYLE_SELECT'=>style_select($user['template'], 'template'), 140 'SHORT_PERIOD'=>$user['short_period'], 141 'LONG_PERIOD'=>$user['long_period'], 131 'RECENT_PERIOD'=>$user['recent_period'], 142 132 143 133 $expand=>'checked="checked"', 144 134 $nb_comments=>'checked="checked"', 145 135 146 136 'L_TITLE' => $lang['customize_title'], 147 137 'L_PASSWORD' => $lang['password'], 148 'L_NEW' => $lang['new'], 149 'L_CONFIRM' => $lang['reg_confirm'], 138 'L_NEW' => $lang['new'], 139 'L_CONFIRM' => $lang['reg_confirm'], 150 140 'L_COOKIE' => $lang['create_cookie'], 151 'L_CONFIRM'=>$lang['conf_confirmation'],152 141 'L_LANG_SELECT'=>$lang['customize_language'], 153 142 'L_NB_IMAGE_LINE'=>$lang['customize_nb_image_per_row'], 154 143 'L_NB_ROW_PAGE'=>$lang['customize_nb_row_per_page'], 155 144 'L_STYLE_SELECT'=>$lang['customize_theme'], 156 'L_SHORT_PERIOD'=>$lang['customize_short_period'], 157 'L_LONG_PERIOD'=>$lang['customize_long_period'], 145 'L_RECENT_PERIOD'=>$lang['customize_recent_period'], 158 146 'L_EXPAND_TREE'=>$lang['customize_expand'], 159 147 'L_NB_COMMENTS'=>$lang['customize_show_nb_comments'], -
trunk/template/default/admin/configuration.tpl
r394 r452 100 100 </tr> 101 101 <tr> 102 <td><strong>{L_SHORT_PERIOD} :</strong><br /><span class="small">{L_SHORT_PERIOD_INFO}</span></td> 103 <td class="row1"><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td> 104 </tr> 105 <tr> 106 <td><strong>{L_LONG_PERIOD} :</strong><br /><span class="small">{L_LONG_PERIOD_INFO}</span></td> 107 <td class="row1"><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td> 102 <td><strong>{L_RECENT_PERIOD} :</strong><br /><span class="small">{L_RECENT_PERIOD_INFO}</span></td> 103 <td class="row1"><input type="text" size="3" maxlength="2" name="recent_period" value="{RECENT_PERIOD}" /></td> 108 104 </tr> 109 105 <tr> -
trunk/template/default/profile.tpl
r393 r452 28 28 </tr> 29 29 <tr> 30 <td>{L_SHORT_PERIOD}</td> 31 <td><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td> 32 </tr> 33 <tr> 34 <td>{L_LONG_PERIOD}</td> 35 <td><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td> 30 <td>{L_RECENT_PERIOD}</td> 31 <td><input type="text" size="3" maxlength="2" name="recent_period" value="{RECENT_PERIOD}" /></td> 36 32 </tr> 37 33 <tr> … … 47 43 <!-- BEGIN text --> 48 44 <tr> 49 <td class="menu">{text.F_LABEL}</td>50 <td class="menu">45 <td>{text.F_LABEL}</td> 46 <td> 51 47 <input type="text" name="{text.F_NAME}" value="{text.F_VALUE}" /> 52 48 </td> … … 57 53 </tr> 58 54 <tr> 59 <td class="menu">{L_NEW} {L_PASSWORD} <input type="checkbox" name="use_new_pwd" value="1" /></td>60 <td class="menu"><input type="password" name="password" value="" /></td>55 <td>{L_NEW} {L_PASSWORD} <input type="checkbox" name="use_new_pwd" value="1" /></td> 56 <td><input type="password" name="password" value="" /></td> 61 57 </tr> 62 58 <tr> 63 <td class="menu">{L_CONFIRM}</td>64 <td class="menu"><input type="password" name="passwordConf" value="" /></td>59 <td>{L_CONFIRM}</td> 60 <td><input type="password" name="passwordConf" value="" /></td> 65 61 </tr> 66 62 <tr>
Note: See TracChangeset
for help on using the changeset viewer.