Changeset 12764
- Timestamp:
- 12/18/11 22:46:24 (18 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 24 modified
-
identification.php (modified) (5 diffs)
-
include/common.inc.php (modified) (1 diff)
-
include/page_header.php (modified) (1 diff)
-
include/picture_comment.inc.php (modified) (1 diff)
-
nbm.php (modified) (2 diffs)
-
password.php (modified) (2 diffs)
-
picture.php (modified) (2 diffs)
-
profile.php (modified) (2 diffs)
-
register.php (modified) (3 diffs)
-
search.php (modified) (3 diffs)
-
themes/Sylvia/theme.css (modified) (2 diffs)
-
themes/default/template/about.tpl (modified) (1 diff)
-
themes/default/template/comments.tpl (modified) (1 diff)
-
themes/default/template/identification.tpl (modified) (1 diff)
-
themes/default/template/index.tpl (modified) (1 diff)
-
themes/default/template/infos_errors.tpl (added)
-
themes/default/template/nbm.tpl (modified) (1 diff)
-
themes/default/template/notification.tpl (modified) (1 diff)
-
themes/default/template/password.tpl (modified) (1 diff)
-
themes/default/template/picture.tpl (modified) (1 diff)
-
themes/default/template/profile.tpl (modified) (2 diffs)
-
themes/default/template/register.tpl (modified) (1 diff)
-
themes/default/template/search.tpl (modified) (1 diff)
-
themes/default/template/tags.tpl (modified) (1 diff)
-
themes/default/theme.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/identification.php
r11989 r12764 32 32 33 33 //-------------------------------------------------------------- identification 34 $errors = array();35 36 34 $redirect_to = ''; 37 35 if ( !empty($_GET['redirect']) ) … … 40 38 if ( is_a_guest() ) 41 39 { 42 array_push($ errors, l10n('You are not authorized to access the requested page'));40 array_push($page['errors'], l10n('You are not authorized to access the requested page')); 43 41 } 44 42 } … … 49 47 { 50 48 array_push( 51 $ errors,49 $page['errors'], 52 50 l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.') 53 51 ); … … 69 67 else 70 68 { 71 array_push( $errors, l10n('Invalid password!') );69 array_push($page['errors'], l10n('Invalid password!') ); 72 70 } 73 71 } … … 97 95 } 98 96 99 //-------------------------------------------------------------- errors display100 if ( sizeof( $errors ) != 0 )101 {102 $template->assign('errors', $errors);103 }104 105 97 // include menubar 106 98 $themeconf = $template->get_template_vars('themeconf'); -
trunk/include/common.inc.php
r12553 r12764 64 64 // 65 65 $conf = array(); 66 $page = array(); 66 $page = array( 67 'infos' => array(), 68 'errors' => array(), 69 ); 67 70 $user = array(); 68 71 $lang = array(); -
trunk/include/page_header.php
r12008 r12764 99 99 } 100 100 101 102 // messages 103 foreach (array('errors','infos') as $mode) 104 { 105 if (isset($_SESSION['page_'.$mode])) 106 { 107 $page[$mode] = array_merge($page[$mode], $_SESSION['page_'.$mode]); 108 unset($_SESSION['page_'.$mode]); 109 } 110 111 if (count($page[$mode]) != 0) 112 { 113 $template->assign($mode, $page[$mode]); 114 } 115 } 116 101 117 trigger_action('loc_end_page_header'); 102 118 -
trunk/include/picture_comment.inc.php
r11839 r12764 54 54 include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); 55 55 56 $comment_action = insert_user_comment($comm, @$_POST['key'], $ infos);56 $comment_action = insert_user_comment($comm, @$_POST['key'], $page['infos']); 57 57 58 58 switch ($comment_action) 59 59 { 60 60 case 'moderate': 61 array_push( $infos, l10n('An administrator must authorize your comment before it is visible.') );61 array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.') ); 62 62 case 'validate': 63 array_push( $infos, l10n('Your comment has been registered'));63 array_push($page['infos'], l10n('Your comment has been registered')); 64 64 break; 65 65 case 'reject': 66 66 set_status_header(403); 67 array_push($ infos, l10n('Your comment has NOT been registered because it did not pass the validation rules') );67 array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules') ); 68 68 break; 69 69 default: 70 70 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 71 71 } 72 73 $template->assign(74 ($comment_action=='reject') ? 'errors' : 'infos',75 $infos76 );77 72 78 73 // allow plugins to notify what's going on -
trunk/nbm.php
r10824 r12764 38 38 39 39 40 41 40 // +-----------------------------------------------------------------------+ 42 41 // | Main | 43 42 // +-----------------------------------------------------------------------+ 44 $page['errors'] = array();45 $page['infos'] = array();46 47 43 if (isset($_GET['subscribe']) 48 44 and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['subscribe'])) … … 69 65 $template->set_filenames(array('nbm'=>'nbm.tpl')); 70 66 71 // +-----------------------------------------------------------------------+ 72 // | errors & infos | 73 // +-----------------------------------------------------------------------+ 74 $template->assign( 75 array( 76 'errors' => $page['errors'], 77 'infos' => $page['infos'], 78 ) 79 ); 80 67 81 68 // include menubar 82 69 $themeconf = $template->get_template_vars('themeconf'); -
trunk/password.php
r12672 r12764 241 241 // | Process form | 242 242 // +-----------------------------------------------------------------------+ 243 244 $page['errors'] = array();245 $page['infos'] = array();246 247 243 if (isset($_POST['submit'])) 248 244 { … … 346 342 ); 347 343 348 // +-----------------------------------------------------------------------+349 // | infos & errors display |350 // +-----------------------------------------------------------------------+351 352 $template->assign('errors', $page['errors']);353 $template->assign('infos', $page['infos']);354 344 355 345 // include menubar -
trunk/picture.php
r11839 r12764 190 190 // +-----------------------------------------------------------------------+ 191 191 192 $infos = array();193 194 192 // caching first_rank, last_rank, current_rank in the displayed 195 193 // section. This should also help in readability. … … 339 337 { 340 338 case 'moderate': 341 array_push($ infos, l10n('An administrator must authorize your comment before it is visible.'));339 array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.')); 342 340 case 'validate': 343 array_push($ infos, l10n('Your comment has been registered'));341 array_push($page['infos'], l10n('Your comment has been registered')); 344 342 break; 345 343 case 'reject': 346 344 set_status_header(403); 347 array_push($ infos, l10n('Your comment has NOT been registered because it did not pass the validation rules'));345 array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules')); 348 346 break; 349 347 default: 350 348 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 351 349 } 352 353 $template->assign(354 ($comment_action=='reject') ? 'errors' : 'infos',355 $infos356 );357 350 358 351 unset($_POST['content']); -
trunk/profile.php
r12672 r12764 65 65 } 66 66 67 save_profile_from_post($userdata, $ errors);67 save_profile_from_post($userdata, $page['errors']); 68 68 69 69 $title= l10n('Your Gallery Customization'); … … 76 76 $userdata ); 77 77 78 // +-----------------------------------------------------------------------+79 // | errors display |80 // +-----------------------------------------------------------------------+81 if (count($errors) != 0)82 {83 $template->assign('errors', $errors);84 }85 78 86 79 // include menubar -
trunk/register.php
r12610 r12764 38 38 } 39 39 40 $errors = array();41 40 if (isset($_POST['submit'])) 42 41 { … … 44 43 { 45 44 set_status_header(403); 46 array_push($ errors, 'Invalid/expired form key');45 array_push($page['errors'], 'Invalid/expired form key'); 47 46 } 48 47 49 48 if ($_POST['password'] != $_POST['password_conf']) 50 49 { 51 array_push($ errors, l10n('please enter your password again'));50 array_push($page['errors'], l10n('please enter your password again')); 52 51 } 53 52 54 $ errors=53 $page['errors'] = 55 54 register_user($_POST['login'], 56 55 $_POST['password'], 57 56 $_POST['mail_address'], 58 57 true, 59 $ errors);58 $page['errors']); 60 59 61 if (count($ errors) == 0)60 if (count($page['errors']) == 0) 62 61 { 63 62 $user_id = get_userid($_POST['login']); … … 92 91 )); 93 92 94 //-------------------------------------------------------------- errors display95 if (count($errors) != 0)96 {97 $template->assign('errors', $errors);98 }99 100 93 // include menubar 101 94 $themeconf = $template->get_template_vars('themeconf'); -
trunk/search.php
r10824 r12764 32 32 33 33 //------------------------------------------------------------------ form check 34 $errors = array();35 34 $search = array(); 36 35 if (isset($_POST['submit'])) … … 149 148 else 150 149 { 151 array_push($ errors, l10n('Empty query. No criteria has been entered.'));150 array_push($page['errors'], l10n('Empty query. No criteria has been entered.')); 152 151 } 153 152 } 154 153 //----------------------------------------------------------------- redirection 155 if (isset($_POST['submit']) and count($ errors) == 0)154 if (isset($_POST['submit']) and count($page['errors']) == 0) 156 155 { 157 156 redirect( … … 223 222 display_select_cat_wrapper($query, array(), 'category_options', false); 224 223 225 //-------------------------------------------------------------- errors display226 if (sizeof($errors) != 0)227 {228 $template->assign('errors', $errors);229 }230 224 231 225 // include menubar -
trunk/themes/Sylvia/theme.css
r12671 r12764 250 250 color:#f70; 251 251 border:0; 252 background-color: transparent; 253 margin-left:125px; 254 padding:5px 0px 0pt 10pt; 255 min-height: 48px; 252 background:transparent url(icon/infos.png) no-repeat center right; 253 margin-left:40px; 256 254 text-align:left; 257 255 } … … 259 257 color:#f33; 260 258 border:0; 261 background: transparent url(icon/errors.png) no-repeat scroll right top; 262 margin-left:125px; 263 padding:5px 0px 0pt 10pt; 264 min-height: 48px; 259 background:transparent url(icon/errors.png) no-repeat center right; 260 margin-left:40px; 265 261 text-align:left; 266 262 font-weight:bold; -
trunk/themes/default/template/about.tpl
r10824 r12764 9 9 <h2>{'About'|@translate}</h2> 10 10 </div> 11 12 {include file='infos_errors.tpl'} 13 11 14 <div id="piwigoAbout"> 12 15 {$ABOUT_MESSAGE} -
trunk/themes/default/template/comments.tpl
r12479 r12764 10 10 <h2>{'User comments'|@translate}</h2> 11 11 </div> 12 13 {include file='infos_errors.tpl'} 12 14 13 15 <form class="filter" action="{$F_ACTION}" method="get"> -
trunk/themes/default/template/identification.tpl
r12479 r12764 11 11 </div> 12 12 13 {if isset($errors) } 14 <div class="errors"> 15 <ul> 16 {foreach from=$errors item=error} 17 <li>{$error}</li> 18 {/foreach} 19 </ul> 20 </div> 21 {/if} 13 {include file='infos_errors.tpl'} 22 14 23 15 <form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties"> -
trunk/themes/default/template/index.tpl
r12677 r12764 80 80 </div>{* <!-- titrePage --> *} 81 81 82 {include file='infos_errors.tpl'} 83 82 84 {if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} 83 85 -
trunk/themes/default/template/nbm.tpl
r10824 r12764 10 10 </div> 11 11 12 {if not empty($errors)} 13 <div class="errors"> 14 <ul> 15 {foreach from=$errors item=error} 16 <li>{$error}</li> 17 {/foreach} 18 </ul> 19 </div> 20 {/if} 21 22 {if not empty($infos)} 23 <div class="infos"> 24 <ul> 25 {foreach from=$infos item=info} 26 <li>{$info}</li> 27 {/foreach} 28 </ul> 29 </div> 30 {/if} 12 {include file='infos_errors.tpl'} 31 13 32 14 </div> -
trunk/themes/default/template/notification.tpl
r11182 r12764 15 15 <h2>{'Notification'|@translate}</h2> 16 16 </div> 17 18 {include file='infos_errors.tpl'} 17 19 18 20 <div class="notification"> -
trunk/themes/default/template/password.tpl
r12479 r12764 13 13 </div> 14 14 15 {if count($errors)} 16 <div class="errors"> 17 <ul> 18 {foreach from=$errors item=error} 19 <li>{$error}</li> 20 {/foreach} 21 </ul> 22 </div> 23 {/if} 24 25 {if count($infos)} 26 <div class="infos"> 27 <ul> 28 {foreach from=$infos item=info} 29 <li>{$info}</li> 30 {/foreach} 31 </ul> 32 </div> 33 {/if} 15 {include file='infos_errors.tpl'} 34 16 35 17 {if $action ne 'none'} -
trunk/themes/default/template/picture.tpl
r12681 r12764 8 8 {/if} 9 9 10 {if isset($errors)} 11 <div class="errors"> 12 <ul> 13 {foreach from=$errors item=error} 14 <li>{$error}</li> 15 {/foreach} 16 </ul> 17 </div> 18 {/if} 19 {if isset($infos)} 20 <div class="infos"> 21 <ul> 22 {foreach from=$infos item=info} 23 <li>{$info}</li> 24 {/foreach} 25 </ul> 26 </div> 27 {/if} 10 {include file='infos_errors.tpl'} 28 11 29 12 {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} -
trunk/themes/default/template/profile.tpl
r10824 r12764 1 1 {if isset($MENUBAR)}{$MENUBAR}{/if} 2 2 <div id="content" class="content"> 3 4 {if isset($errors)}5 <div class="errors">6 <ul>7 {foreach from=$errors item=error}8 <li>{$error}</li>9 {/foreach}10 </ul>11 </div>12 {/if}13 3 14 4 <div class="titrePage"> … … 21 11 </div> 22 12 13 {include file='infos_errors.tpl'} 14 23 15 {$PROFILE_CONTENT} 24 16 </div> <!-- content --> -
trunk/themes/default/template/register.tpl
r12610 r12764 13 13 </div> 14 14 15 {if isset($errors)} 16 <div class="errors"> 17 <ul> 18 {foreach from=$errors item=error} 19 <li>{$error}</li> 20 {/foreach} 21 </ul> 22 </div> 23 {/if} 15 {include file='infos_errors.tpl'} 24 16 25 17 <form method="post" action="{$F_ACTION}" class="properties" name="register_form"> -
trunk/themes/default/template/search.tpl
r12693 r12764 31 31 </div> 32 32 33 {if isset($errors) } 34 <div class="errors"> 35 <ul> 36 {foreach from=$errors item=error} 37 <li>{$error}</li> 38 {/foreach} 39 </ul> 40 </div> 41 {/if} 33 {include file='infos_errors.tpl'} 42 34 43 35 <form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}"> -
trunk/themes/default/template/tags.tpl
r11431 r12764 20 20 <h2>{'Tags'|@translate}</h2> 21 21 </div> 22 23 {include file='infos_errors.tpl'} 22 24 23 25 {if isset($tags)} -
trunk/themes/default/theme.css
r12671 r12764 735 735 margin: 5px; 736 736 border: 1px solid red; 737 background: #ffe1e1 url(icon/errors.png) no-repeat topright;737 background: #ffe1e1 url(icon/errors.png) no-repeat center right; 738 738 padding: 10px 50px 10px 10px; 739 739 } … … 742 742 .infos { 743 743 color: #002000; 744 background: #98fb98 url(icon/infos.png) no-repeat topright;744 background: #98fb98 url(icon/infos.png) no-repeat center right; 745 745 margin: 5px; 746 746 padding: 10px 50px 10px 10px;
![(please configure the [header_logo] section in trac.ini)](http://piwigo.org/screenshots/piwigo_logo_on_white.png)