1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Minor fixes, added extended user category title support (same as fields behaviour)

This commit is contained in:
secretr
2011-11-25 17:53:20 +00:00
parent 5cff110825
commit a06b6f88a6
7 changed files with 32 additions and 30 deletions

View File

@@ -2,16 +2,14 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/signup_shortcodes.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
// Mods to show extended field categories
@@ -207,7 +205,9 @@ foreach($catList as $cat)
{
if(!$done_heading && ($cat['user_extended_struct_id'] > 0))
{ // Add in a heading
$text .= str_replace('{EXTENDED_CAT_TEXT}', $tp->toHTML($cat['user_extended_struct_name'], FALSE, 'emotes_off,defs'), $SIGNUP_EXTENDED_CAT);
$catName = $cat['user_extended_struct_text'] ? $cat['user_extended_struct_text'] : $cat['user_extended_struct_name'];
if(defined($catName)) $catName = constant($catName);
$text .= str_replace('{EXTENDED_CAT_TEXT}', $tp->toHTML($catName, FALSE, 'emotes_off,defs'), $SIGNUP_EXTENDED_CAT);
$done_heading = TRUE;
}
$replace = array(

View File

@@ -423,11 +423,11 @@ require_once(e_HANDLER."user_extended_class.php");
$ue = new e107_user_extended;
$ueCatList = $ue->user_extended_get_categories();
$ueFieldList = $ue->user_extended_get_fields();
$ueCatList[0][0] = array('user_extended_struct_name' => LAN_USER_44);
$ueCatList[0][0] = array('user_extended_struct_name' => LAN_USER_44, 'user_extended_struct_text' => '');
$ret = "";
foreach($ueCatList as $catnum => $cat)
{
$key = $cat[0]['user_extended_struct_name'];
$key = $cat[0]['user_extended_struct_text'] ? $cat[0]['user_extended_struct_text'] : $cat[0]['user_extended_struct_name'];
$cat_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$user['user_id']}}", TRUE);
if($cat_name != FALSE && count($ueFieldList[$catnum]))
{

View File

@@ -2,16 +2,14 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/usersettings_shortcodes.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@@ -271,7 +269,9 @@ if($catInfo)
if($ret)
{
$ret = str_replace("{CATNAME}", $catInfo['user_extended_struct_name'], $USER_EXTENDED_CAT).$ret;
$catName = $catInfo['user_extended_struct_text'] ? $catInfo['user_extended_struct_text'] : $catInfo['user_extended_struct_name'];
if(defined($catName)) $catName = constant($catName);
$ret = str_replace("{CATNAME}", $tp->toHTML($catName, FALSE, 'emotes_off,defs'), $USER_EXTENDED_CAT).$ret;
}
$extended_showed['cat'][$parm] = 1;
@@ -303,7 +303,10 @@ if(!$fInfo)
if($fInfo)
{
$fname = $tp->toHTML($fInfo['user_extended_struct_text'], "", "emotes_off, defs");
$fname = $fInfo['user_extended_struct_text'];
if(defined($fname)) $fname = constant($fname);
$fname = $tp->toHTML($fname, "", "emotes_off, defs");
if($fInfo['user_extended_struct_required'] == 1)
{
$fname = str_replace("{FIELDNAME}", $fname, $REQUIRED_FIELD);

View File

@@ -87,7 +87,7 @@ if ($parms[1] == 'text')
}
else
{
return TRUE;
return FALSE;
}
}
@@ -105,7 +105,8 @@ if ($parms[1] == 'icon')
{
return "<img src='".e_IMAGE_ABS."user_icons/{$parms[0]}.png' style='width:16px; height:16px' alt='' />";
}
return '';
//return '';
return FALSE;
}
if ($parms[1] == 'value')
@@ -142,4 +143,5 @@ if ($parms[1] == 'value')
}
return FALSE;
}
return TRUE;
// return TRUE;
return FALSE;