Changeset 29221 for trunk/profile.php
- Timestamp:
- Aug 15, 2014, 6:14:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/profile.php
r28587 r29221 70 70 $page['body_id'] = 'theProfilePage'; 71 71 $template->set_filename('profile', 'profile.tpl'); 72 $template->set_filename('profile_content', 'profile_content.tpl'); 72 73 73 74 load_profile_in_template( … … 75 76 make_index_url(), // for redirect 76 77 $userdata ); 78 $template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content'); 79 77 80 78 81 … … 290 293 } 291 294 292 293 function load_profile_in_template($url_action, $url_redirect, $userdata) 295 /** 296 * Assign template variables, from arguments 297 * Used to build profile edition pages 298 * 299 * @param string $url_action 300 * @param string $url_redirect 301 * @param array $userdata 302 */ 303 function load_profile_in_template($url_action, $url_redirect, $userdata, $template_prefixe=null) 294 304 { 295 305 global $template, $conf; 296 297 $template->set_filename('profile_content', 'profile_content.tpl');298 306 299 307 $template->assign('radio_options', … … 304 312 $template->assign( 305 313 array( 306 'USERNAME'=>stripslashes($userdata['username']),307 'EMAIL'=>@$userdata['email'],308 'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'],309 'ACTIVATE_COMMENTS'=>$conf['activate_comments'],310 'NB_IMAGE_PAGE'=>$userdata['nb_image_page'],311 'RECENT_PERIOD'=>$userdata['recent_period'],312 'EXPAND' =>$userdata['expand'] ? 'true' : 'false',313 'NB_COMMENTS'=>$userdata['show_nb_comments'] ? 'true' : 'false',314 'NB_HITS'=>$userdata['show_nb_hits'] ? 'true' : 'false',315 'REDIRECT' => $url_redirect,316 'F_ACTION'=>$url_action,314 $template_prefixe.'USERNAME'=>stripslashes($userdata['username']), 315 $template_prefixe.'EMAIL'=>@$userdata['email'], 316 $template_prefixe.'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'], 317 $template_prefixe.'ACTIVATE_COMMENTS'=>$conf['activate_comments'], 318 $template_prefixe.'NB_IMAGE_PAGE'=>$userdata['nb_image_page'], 319 $template_prefixe.'RECENT_PERIOD'=>$userdata['recent_period'], 320 $template_prefixe.'EXPAND' =>$userdata['expand'] ? 'true' : 'false', 321 $template_prefixe.'NB_COMMENTS'=>$userdata['show_nb_comments'] ? 'true' : 'false', 322 $template_prefixe.'NB_HITS'=>$userdata['show_nb_hits'] ? 'true' : 'false', 323 $template_prefixe.'REDIRECT' => $url_redirect, 324 $template_prefixe.'F_ACTION'=>$url_action, 317 325 )); 318 326 … … 339 347 340 348 $template->assign('PWG_TOKEN', get_pwg_token()); 341 $template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content');342 349 } 343 350 ?>
Note: See TracChangeset
for help on using the changeset viewer.