mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
Using block_vars to fake IF...ELSE...ENDIF capability
git-svn-id: file:///svn/phpbb/trunk@719 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1060,6 +1060,30 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
|
||||
"S_PROFILE_ACTION" => append_sid("profile.$phpEx"))
|
||||
);
|
||||
|
||||
//
|
||||
// This is another cheat using the block_var capability
|
||||
// of the templates to 'fake' an IF...ELSE...ENDIF solution
|
||||
// it works well :)
|
||||
//
|
||||
if( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] )
|
||||
{
|
||||
$template->assign_block_vars("avatarblock", array() );
|
||||
|
||||
if($board_config['allow_avatar_upload'])
|
||||
{
|
||||
$template->assign_block_vars("avatarblock.avatarupload", array() );
|
||||
}
|
||||
if($board_config['allow_avatar_remote'])
|
||||
{
|
||||
$template->assign_block_vars("avatarblock.avatarremote", array() );
|
||||
}
|
||||
if($board_config['allow_avatar_local'])
|
||||
{
|
||||
$template->assign_block_vars("avatarblock.avatargallery", array() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$template->pparse("body");
|
||||
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
|
Reference in New Issue
Block a user