1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +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 * 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 * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * 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 $ * $URL$
* $Revision$ * $Id$
* $Date$
* $Author$
*/ */
// Mods to show extended field categories // Mods to show extended field categories
@@ -207,7 +205,9 @@ foreach($catList as $cat)
{ {
if(!$done_heading && ($cat['user_extended_struct_id'] > 0)) if(!$done_heading && ($cat['user_extended_struct_id'] > 0))
{ // Add in a heading { // 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; $done_heading = TRUE;
} }
$replace = array( $replace = array(

View File

@@ -423,11 +423,11 @@ require_once(e_HANDLER."user_extended_class.php");
$ue = new e107_user_extended; $ue = new e107_user_extended;
$ueCatList = $ue->user_extended_get_categories(); $ueCatList = $ue->user_extended_get_categories();
$ueFieldList = $ue->user_extended_get_fields(); $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 = ""; $ret = "";
foreach($ueCatList as $catnum => $cat) 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); $cat_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$user['user_id']}}", TRUE);
if($cat_name != FALSE && count($ueFieldList[$catnum])) if($cat_name != FALSE && count($ueFieldList[$catnum]))
{ {

View File

@@ -2,16 +2,14 @@
/* /*
* e107 website system * 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 * Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * 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 $ * $URL$
* $Revision$ * $Id$
* $Date$
* $Author$
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -271,7 +269,9 @@ if($catInfo)
if($ret) 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; $extended_showed['cat'][$parm] = 1;
@@ -303,7 +303,10 @@ if(!$fInfo)
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) if($fInfo['user_extended_struct_required'] == 1)
{ {
$fname = str_replace("{FIELDNAME}", $fname, $REQUIRED_FIELD); $fname = str_replace("{FIELDNAME}", $fname, $REQUIRED_FIELD);

View File

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

View File

@@ -238,13 +238,13 @@ class ExtendedPasswordHandler extends UserHandler
break; break;
case PASSWORD_JOOMLA_SALT : case PASSWORD_JOOMLA_SALT :
case PASSWORD_MAMBO_SALT :var_dump($stored_hash, strlen($stored_hash)); case PASSWORD_MAMBO_SALT :
if ((strpos($stored_hash, ':') === false) || (strlen($stored_hash) < 40)) if ((strpos($stored_hash, ':') === false) || (strlen($stored_hash) < 40))
{ {
return PASSWORD_INVALID; return PASSWORD_INVALID;
} }
// Mambo/Joomla salted hash - should be 32-character md5 hash, ':', 16-character salt (but could be 8-char salt, maybe) // Mambo/Joomla salted hash - should be 32-character md5 hash, ':', 16-character salt (but could be 8-char salt, maybe)
list($hash, $salt) = explode(':', $stored_hash); var_dump($hash, $salt, md5($pword.$salt)); list($hash, $salt) = explode(':', $stored_hash);
$pwHash = md5($pword.$salt); $pwHash = md5($pword.$salt);
$stored_hash = $hash; $stored_hash = $hash;
break; break;

View File

@@ -8,10 +8,8 @@
* *
* Sitelinks configuration module - News * Sitelinks configuration module - News
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/news/e_sitelink.php,v $ * $URL$
* $Revision$ * $Id$
* $Date$
* $Author$
* *
*/ */

View File

@@ -10,15 +10,14 @@
| Released under the terms and conditions of the | Released under the terms and conditions of the
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/search.php,v $ | $URL$
| $Revision$ | $Id$
| $Date$
| $Author$
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
require_once('class2.php'); require_once('class2.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE); //include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
e107::coreLan('search');
if (!check_class($pref['search_restrict'])) { if (!check_class($pref['search_restrict'])) {
require_once(HEADERF); require_once(HEADERF);
@@ -309,7 +308,7 @@ if ($search_prefs['selector'] == 1)
$SEARCH_MAIN_SUBMIT = "<input type='hidden' name='r' value='0' /><input class='button' type='submit' name='s' value='".LAN_180."' />"; $SEARCH_MAIN_SUBMIT = "<input type='hidden' name='r' value='0' /><input class='button' type='submit' name='s' value='".LAN_180."' />";
$ENHANCED_ICON = "<img src='".e_IMAGE."generic/search_basic.png' style='width: 16px; height: 16px; vertical-align: top' $ENHANCED_ICON = "<img src='".e_IMAGE_ABS."generic/search_basic.png' style='width: 16px; height: 16px; vertical-align: top'
alt='".LAN_SEARCH_23."' title='".LAN_SEARCH_23."' onclick=\"expandit('en_in'); expandit('en_ex'); expandit('en_ep'); expandit('en_be')\"/>"; alt='".LAN_SEARCH_23."' title='".LAN_SEARCH_23."' onclick=\"expandit('en_in'); expandit('en_ex'); expandit('en_ep'); expandit('en_be')\"/>";
$enhanced_types['in'] = LAN_SEARCH_24.':'; $enhanced_types['in'] = LAN_SEARCH_24.':';