mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 12:41:51 +02:00
User-settings shortcode and template cleanup. avatarpicker() function added to form handler. Other minor fixes.
This commit is contained in:
parent
312ec063ba
commit
aa4e5c0ee7
@ -198,6 +198,8 @@ if (isset ($_POST['update_options']))
|
||||
$temp['force_userupdate'] = $_POST['force_userupdate'];
|
||||
$temp['memberlist_access'] = $_POST['memberlist_access'];
|
||||
$temp['user_new_period'] = $_POST['user_new_period'];
|
||||
$temp['signature_access'] = $_POST['signature_access'];
|
||||
|
||||
if ($admin_log->logArrayDiffs($temp,$pref,'USET_03'))
|
||||
{
|
||||
save_prefs();
|
||||
@ -962,22 +964,24 @@ class users_admin_ui extends e_admin_ui
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='vertical-align:top'>".USRLAN_133.":<br /><span class='smalltext'>".USRLAN_134."</span></td>
|
||||
<td style='vertical-align:top'>".($pref['force_userupdate'] ? "<input name='force_userupdate' type='radio' value='1' checked='checked' />".LAN_YES." <input name='force_userupdate' type='radio' value='0' />".LAN_NO : "<input name='force_userupdate' type='radio' value='1' />".LAN_YES." <input name='force_userupdate' type='radio' value='0' checked='checked' />".LAN_NO)."
|
||||
<td style='vertical-align:top'>".USRLAN_133.":</td>
|
||||
<td style='vertical-align:top'>".e107::getForm()->radio_switch('force_userupdate',($pref['force_userupdate'])). // ? "<input name='force_userupdate' type='radio' value='1' checked='checked' />".LAN_YES." <input name='force_userupdate' type='radio' value='0' />".LAN_NO : "<input name='force_userupdate' type='radio' value='1' />".LAN_YES." <input name='force_userupdate' type='radio' value='0' checked='checked' />".LAN_NO)."
|
||||
"<div class='field-help'>".USRLAN_134."</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style='vertical-align:top'>".USRLAN_93."<br /><span class='smalltext'>".USRLAN_94."</span></td>
|
||||
<td style='vertical-align:top'>".USRLAN_93.":</td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='del_unv' size='10' value='".$pref['del_unv']."' maxlength='5' /> ".USRLAN_95."
|
||||
<div class='field-help'>".USRLAN_94."</div>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td>".USRLAN_130."<br /><span class='smalltext'>".USRLAN_131."</span></td>
|
||||
<td>
|
||||
<input type='checkbox' name='track_online' value='1'".($pref['track_online'] ? " checked='checked'" : "")." /> ".USRLAN_132."
|
||||
<td>".USRLAN_130.":</td>
|
||||
<td>".e107::getForm()->radio_switch('track_online',$pref['track_online'])."
|
||||
<div class='field-help'>".USRLAN_131."</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -989,12 +993,21 @@ class users_admin_ui extends e_admin_ui
|
||||
$text .= "</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Signatures may be entered by:</td>
|
||||
<td>". // TODO LAN
|
||||
e107::getForm()->uc_select('signature_access',$pref['signature_access'],"member,admin,main,classes,nobody")
|
||||
."</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td style='vertical-align:top'>".USRLAN_190."<br /><span class='smalltext'>".USRLAN_191."</span></td>
|
||||
<td style='vertical-align:top'>".USRLAN_190.":</td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='user_new_period' size='10' value='".varset($pref['user_new_period'],0)."' maxlength='5' /> ".USRLAN_192."
|
||||
<div class='field-help'>".USRLAN_191."</div>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
@ -104,28 +104,10 @@ class comment_shortcodes extends e_shortcode
|
||||
$height = e107::getPref("im_height");
|
||||
$width = e107::getPref("im_width");
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
if (vartrue($this->var['user_id']))
|
||||
{
|
||||
if (vartrue($this->var['user_image']))
|
||||
{
|
||||
$img = (strpos($this->var['user_image'],"://")!==false) ? $this->var['user_image'] : $tp->thumbUrl(e_MEDIA."avatars/".$this->var['user_image'],"aw=".$width."&ah=".$height);
|
||||
$text = "<img class='comment-avatar' src='".$img."' alt='' style='width:".$width."px; height:".$height."px' />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$img = $tp->thumbUrl(e_IMAGE."generic/blank_avatar.jpg","aw=".$width."&ah=".$height);
|
||||
$text = "<img class='comment-avatar' src='".$img."' alt='' />";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$img = $tp->thumbUrl(e_IMAGE."generic/blank_avatar.jpg","aw=".$width."&ah=".$height);
|
||||
$text = "<img class='comment-avatar' src='".$img."' alt='' />";
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
//
|
||||
return $tp->parseTemplate("{USER_AVATAR=".$this->var['user_image']."}");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -133,9 +115,11 @@ class comment_shortcodes extends e_shortcode
|
||||
|
||||
function sc_avatar($parm)
|
||||
{
|
||||
|
||||
// --------- Legacy Code below for those who still want to use it.
|
||||
return $this->sc_comment_avatar($parm);
|
||||
|
||||
// --------- Legacy Code for reference
|
||||
|
||||
/*
|
||||
global $AVATAR;
|
||||
if (isset($this->var['user_id']) && $this->var['user_id']) {
|
||||
if (isset($this->var['user_image']) && $this->var['user_image']) {
|
||||
@ -149,6 +133,9 @@ class comment_shortcodes extends e_shortcode
|
||||
$this->var['user_image'] = '';
|
||||
}
|
||||
return $this->var['user_image'];
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -269,14 +256,14 @@ class comment_shortcodes extends e_shortcode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
function sc_user_avatar($parm)
|
||||
{
|
||||
$this->var['user_id'] = USERID;
|
||||
$this->var['user_image'] = USERIMAGE;
|
||||
return $this->sc_comment_avatar($parm);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
function sc_comment($parm)
|
||||
{
|
||||
|
@ -472,7 +472,11 @@ SC_BEGIN PROFILE_COMMENTS
|
||||
global $user, $pref, $sql, $ns;
|
||||
if($pref['profile_comments'])
|
||||
{
|
||||
include_once(e_HANDLER."comment_class.php");
|
||||
$ret = e107::getSingleton('comment')->compose_comment('profile', 'comment', $user['user_id'], null, $user['user_name'], FALSE,true);
|
||||
|
||||
return $ns->tablerender($ret['caption'],$ret['comment_form']. $ret['comment'], 'profile_comments', TRUE);
|
||||
|
||||
include_once(e_HANDLER."comment_class.php");
|
||||
$cobj = new comment;
|
||||
$qry = "
|
||||
SELECT c.*, u.*, ue.* FROM #comments AS c
|
||||
@ -497,6 +501,8 @@ return "";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PROFILE_COMMENT_FORM
|
||||
return ;
|
||||
|
||||
global $pref, $user;
|
||||
if($pref['profile_comments'])
|
||||
{
|
||||
|
@ -13,323 +13,389 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
include_once(e_HANDLER.'shortcode_handler.php');
|
||||
$usersettings_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
|
||||
/*
|
||||
SC_BEGIN USERNAME
|
||||
global $rs, $curVal, $pref;
|
||||
// This is the 'display name'
|
||||
if (check_class($pref['displayname_class']))
|
||||
|
||||
|
||||
class usersettings_shortcodes extends e_shortcode
|
||||
{
|
||||
$dis_name_len = varset($pref['displayname_maxlength'],15);
|
||||
return $rs->form_text("username", $dis_name_len, $curVal['user_name'], $dis_name_len, "tbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
return $curVal['user_name'];
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN LOGINNAME
|
||||
global $rs, $curVal;
|
||||
if (ADMIN && getperms("4"))
|
||||
{
|
||||
$log_name_length = varset($pref['loginname_maxlength'],30);
|
||||
return $rs->form_text("loginname", $log_name_length, $curVal['user_loginname'], $log_name_length, "tbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
return $curVal['user_loginname'];
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CUSTOMTITLE
|
||||
global $rs, $curVal, $pref;
|
||||
if ($pref['signup_option_customtitle'])
|
||||
{
|
||||
return $rs->form_text("customtitle", 40, $curVal['user_customtitle'], 100, "tbox");
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN REALNAME
|
||||
global $rs, $curVal;
|
||||
return $rs->form_text("realname", 20, $curVal['user_login'], 100, "tbox");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PASSWORD1
|
||||
global $rs, $curVal, $pref;
|
||||
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
|
||||
{
|
||||
return $rs->form_password("password1", 40, "", 20);
|
||||
}
|
||||
|
||||
return "";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PASSWORD2
|
||||
global $rs, $curVal, $pref;
|
||||
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
|
||||
{
|
||||
return $rs->form_password("password2", 40, "", 20);
|
||||
}
|
||||
|
||||
return "";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PASSWORD_LEN
|
||||
global $pref;
|
||||
if(!isset($pref['auth_method']) || ($pref['auth_method'] != 'e107' && $pref['auth_method'] != '>e107'))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return $pref['signup_pass_len'];
|
||||
SC_END
|
||||
|
||||
SC_BEGIN EMAIL
|
||||
global $rs, $curVal;
|
||||
return $rs->form_text("email", 40, $curVal['user_email'], 100);
|
||||
SC_END
|
||||
|
||||
SC_BEGIN HIDEEMAIL
|
||||
global $rs, $curVal;
|
||||
if($parm == 'radio')
|
||||
{
|
||||
return ($curVal['user_hideemail'] ? $rs->form_radio("hideemail", 1, 1)." ".LAN_YES." ".$rs->form_radio("hideemail", 0)." ".LAN_NO : $rs->form_radio("hideemail", 1)." ".LAN_YES." ".$rs->form_radio("hideemail", 0, 1)." ".LAN_NO);
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN USERCLASSES
|
||||
global $e_userclass, $pref, $tp, $curVal;
|
||||
$ret = "";
|
||||
if(ADMIN && $curVal['user_id'] != USERID)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (!is_object($e_userclass)) $e_userclass = new user_class;
|
||||
$ucList = $e_userclass->get_editable_classes(USERCLASS_LIST, TRUE); // List of classes which this user can edit (as array)
|
||||
$ret = '';
|
||||
if(!count($ucList)) return;
|
||||
|
||||
$is_checked = array();
|
||||
foreach ($ucList as $cid)
|
||||
{
|
||||
if (check_class($cid, $curVal['user_class'])) $is_checked[$cid] = $cid;
|
||||
if(isset($_POST['class']))
|
||||
{
|
||||
// $is_checked[$cid] = in_array($cid, $_POST['class']);
|
||||
}
|
||||
|
||||
}
|
||||
$inclass = implode(',',$is_checked);
|
||||
|
||||
$ret = "<table style='width:95%'><tr><td class='defaulttext'>";
|
||||
$ret .= $e_userclass->vetted_tree('class',array($e_userclass,checkbox_desc),$inclass,'editable');
|
||||
$ret .= "</td></tr></table>\n";
|
||||
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN SIGNATURE
|
||||
global $curVal;
|
||||
parse_str($parm);
|
||||
$cols = (isset($cols) ? $cols : 58);
|
||||
$rows = (isset($rows) ? $rows : 4);
|
||||
return "<textarea class='tbox signature' name='signature' cols='{$cols}' rows='{$rows}' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".$curVal['user_signature']."</textarea>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN SIGNATURE_HELP
|
||||
return display_help("", 2);
|
||||
SC_END
|
||||
|
||||
|
||||
|
||||
SC_BEGIN AVATAR_UPLOAD
|
||||
global $pref;
|
||||
if ($pref['avatar_upload'] && FILE_UPLOADS)
|
||||
{
|
||||
return "<input class='tbox' name='file_userfile[avatar]' type='file' size='47' />";
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN AVATAR_REMOTE
|
||||
global $curVal;
|
||||
return "<input class='tbox' type='text' name='image' size='60' value='".$curVal['user_image']."' maxlength='100' />";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN AVATAR_CHOOSE
|
||||
$ret = "
|
||||
<input class='button' type ='button' style=' cursor:pointer' size='30' value='".LAN_USET_38."' onclick='expandit(this)' />
|
||||
<div style='display:none' >";
|
||||
$avatarlist[0] = "";
|
||||
$handle = opendir(e_MEDIA."avatars/");
|
||||
while ($file = readdir($handle))
|
||||
{
|
||||
if ($file != "." && $file != ".." && $file != "index.html" && $file != "CVS")
|
||||
{
|
||||
$avatarlist[] = $file;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
for($c = 1; $c <= (count($avatarlist)-1); $c++)
|
||||
{
|
||||
$ret .= "<a href='javascript:addtext_us(\"$avatarlist[$c]\")'><img src='".e_MEDIA."avatars/".$avatarlist[$c]."' alt='' /></a> ";
|
||||
}
|
||||
|
||||
$ret .= "
|
||||
<br />
|
||||
</div>
|
||||
";
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN PHOTO_UPLOAD
|
||||
global $pref;
|
||||
if ($pref['photo_upload'] && FILE_UPLOADS)
|
||||
{
|
||||
return "<input type='checkbox' name='user_delete_photo' value='1' />".LAN_USET_16."<br />\n
|
||||
<input class='tbox' name='file_userfile[photo]' type='file' size='47' />";
|
||||
}
|
||||
SC_END
|
||||
|
||||
|
||||
|
||||
SC_BEGIN USEREXTENDED_ALL
|
||||
global $sql, $tp, $curVal, $usersettings_shortcodes;
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($curVal['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_type = 0
|
||||
ORDER BY user_extended_struct_order ASC
|
||||
";
|
||||
$ret="";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$catList = $sql->db_getList();
|
||||
}
|
||||
$catList[] = array("user_extended_struct_id" => 0, "user_extended_struct_name" => LAN_USET_7);
|
||||
foreach($catList as $cat)
|
||||
{
|
||||
cachevars("extendedcat_{$cat['user_extended_struct_id']}", $cat);
|
||||
$ret .= $tp->parseTemplate("{USEREXTENDED_CAT={$cat['user_extended_struct_id']}}", TRUE, $usersettings_shortcodes);
|
||||
}
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN USEREXTENDED_CAT
|
||||
global $sql, $tp, $curVal, $usersettings_shortcodes, $USER_EXTENDED_CAT, $extended_showed;
|
||||
if(isset($extended_showed['cat'][$parm]))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
$ret = "";
|
||||
$catInfo = getcachedvars("extendedcat_{$parm}");
|
||||
if(!$catInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($curVal['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_id = ".intval($parm)."
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$catInfo = $sql->db_Fetch();
|
||||
}
|
||||
}
|
||||
|
||||
if($catInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($curVal['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_parent = ".intval($parm)."
|
||||
AND user_extended_struct_type != 0
|
||||
ORDER BY user_extended_struct_order ASC
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$fieldList = $sql->db_getList();
|
||||
foreach($fieldList as $field)
|
||||
{
|
||||
cachevars("extendedfield_{$cat['user_extended_struct_name']}", $field);
|
||||
$ret .= $tp->parseTemplate("{USEREXTENDED_FIELD={$field['user_extended_struct_name']}}", TRUE, $usersettings_shortcodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($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;
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN USEREXTENDED_FIELD
|
||||
global $sql, $tp, $curVal, $usersettings_shortcodes, $extended_showed, $ue, $USEREXTENDED_FIELD, $REQUIRED_FIELD;
|
||||
if(isset($extended_showed['field'][$parm]))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
$ret = "";
|
||||
|
||||
$fInfo = getcachedvars("extendeddata_{$parm}");
|
||||
if(!$fInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($curVal['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_name = '".$tp -> toDB($parm, true)."'
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$fInfo = $sql->db_Fetch();
|
||||
}
|
||||
}
|
||||
|
||||
if($fInfo)
|
||||
{
|
||||
$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)
|
||||
function sc_username($parm) // This is the 'display name'
|
||||
{
|
||||
$fname = str_replace("{FIELDNAME}", $fname, $REQUIRED_FIELD);
|
||||
}
|
||||
|
||||
$parms = explode("^,^",$fInfo['user_extended_struct_parms']);
|
||||
|
||||
$fhide="";
|
||||
if($parms[3])
|
||||
{
|
||||
$chk = (strpos($curVal['user_hidden_fields'], "^user_".$parm."^") === FALSE) ? FALSE : TRUE;
|
||||
if(isset($_POST['updatesettings']))
|
||||
$pref = e107::getPref();
|
||||
|
||||
if (check_class($pref['displayname_class']) || $pref['allowEmailLogin'] == 1) // display if email is used for login.
|
||||
{
|
||||
$chk = isset($_POST['hide']['user_'.$parm]);
|
||||
$dis_name_len = varset($pref['displayname_maxlength'],15);
|
||||
$options = array('title'=> LAN_USER_80, 'size' => 40);
|
||||
|
||||
return e107::getForm()->text('username',$this->var['user_name'], $dis_name_len, $options);
|
||||
}
|
||||
$fhide = $ue->user_extended_hide($fInfo, $chk);
|
||||
else
|
||||
{
|
||||
return ($parm == 'show') ? $this->var['user_name'] : ''; // ; if it can't be changed then hide it.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_loginname($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
|
||||
if($pref['allowEmailLogin'] == 1) // email/password login only.
|
||||
{
|
||||
return; // hide login name when email-login is being used. (may contain social login info)
|
||||
}
|
||||
|
||||
if (ADMIN && getperms("4"))
|
||||
{
|
||||
|
||||
$log_name_length = varset($pref['loginname_maxlength'],30);
|
||||
|
||||
$options = array(
|
||||
'title'=> ($pref['allowEmailLogin'] ==1 ) ? LAN_USER_82 : LAN_USER_80,
|
||||
'size' => 40
|
||||
);
|
||||
|
||||
return e107::getForm()->text('loginname',$this->var['user_loginname'], $log_name_length, $options);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->var['user_loginname'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_customtitle($parm)
|
||||
{
|
||||
if (e107::getPref('signup_option_customtitle'))
|
||||
{
|
||||
$options = array('title'=> '', 'size' => 40);
|
||||
return e107::getForm()->text('customtitle', $this->var['user_customtitle'], 100, $options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_realname($parm)
|
||||
{
|
||||
$options = array('title'=> '', 'size' => 40);
|
||||
return e107::getForm()->text('realname',$this->var['user_login'], 100, $options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_password1($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
|
||||
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
|
||||
{
|
||||
$options = array('size' => 40,'title'=>LAN_USET_23);
|
||||
return e107::getForm()->password('password1', '', 20, $options);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_password2($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
|
||||
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
|
||||
{
|
||||
$options = array('size' => 40,'title'=>LAN_USET_23);
|
||||
return e107::getForm()->password('password2', '', 20, $options);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_password_len($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
if(!isset($pref['auth_method']) || ($pref['auth_method'] != 'e107' && $pref['auth_method'] != '>e107'))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return $pref['signup_pass_len'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_email($parm)
|
||||
{
|
||||
$options = array('size' => 40,'title'=>'','required'=>true);
|
||||
return e107::getForm()->email('email', $this->var['user_email'], 100, $options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_hideemail($parm)
|
||||
{
|
||||
if($parm == 'radio')
|
||||
{
|
||||
$options['enabled'] = array('title' => LAN_USER_84);
|
||||
return e107::getForm()->radio_switch("hideemail", $this->var['user_hideemail'],LAN_YES,LAN_NO,$options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_userclasses($parm)
|
||||
{
|
||||
global $e_userclass;
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$ret = "";
|
||||
if(ADMIN && $this->var['user_id'] != USERID)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (!is_object($e_userclass)) $e_userclass = new user_class;
|
||||
$ucList = $e_userclass->get_editable_classes(USERCLASS_LIST, TRUE); // List of classes which this user can edit (as array)
|
||||
$ret = '';
|
||||
if(!count($ucList)) return;
|
||||
|
||||
$is_checked = array();
|
||||
foreach ($ucList as $cid)
|
||||
{
|
||||
if (check_class($cid, $this->var['user_class'])) $is_checked[$cid] = $cid;
|
||||
if(isset($_POST['class']))
|
||||
{
|
||||
// $is_checked[$cid] = in_array($cid, $_POST['class']);
|
||||
}
|
||||
|
||||
}
|
||||
$inclass = implode(',',$is_checked);
|
||||
|
||||
// $ret = "<table style='width:95%;margin-left:0px'><tr><td class='defaulttext'>";
|
||||
$ret .= $e_userclass->vetted_tree('class',array($e_userclass,checkbox_desc),$inclass,'editable');
|
||||
// $ret .= "</td></tr></table>\n";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_signature($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
if(!check_class(varset($pref['signature_access'],0)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
parse_str($parm);
|
||||
$cols = (isset($cols) ? $cols : 58);
|
||||
$rows = (isset($rows) ? $rows : 4);
|
||||
return "<textarea class='tbox signature' name='signature' cols='{$cols}' rows='{$rows}' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>".$this->var['user_signature']."</textarea>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_signature_help($parm)
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
if(!check_class(varset($pref['signature_access'],0)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
return display_help("", 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_avatar_upload($parm) // deprecated and combined into avatarpicker() (see sc_avatar_remote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_avatar_remote($parm)
|
||||
{
|
||||
return e107::getForm()->avatarpicker('image',$this->var['user_image'],array('upload'=>1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_avatar_choose($parm) // deprecated
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_photo_upload($parm)
|
||||
{
|
||||
$diz = LAN_USET_27."<br />".LAN_USET_28;
|
||||
|
||||
if (e107::getPref('photo_upload') && FILE_UPLOADS)
|
||||
{
|
||||
return "<input type='checkbox' name='user_delete_photo' value='1' />".LAN_USET_16."<br />\n
|
||||
<input class='tbox' name='file_userfile[photo]' type='file' size='47' />
|
||||
<div class='field-help'>{$diz}</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_userextended_all($parm)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($this->var['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_type = 0
|
||||
ORDER BY user_extended_struct_order ASC";
|
||||
|
||||
$ret="";
|
||||
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$catList = $sql->db_getList();
|
||||
}
|
||||
|
||||
$catList[] = array("user_extended_struct_id" => 0, "user_extended_struct_name" => LAN_USET_7);
|
||||
|
||||
foreach($catList as $cat)
|
||||
{
|
||||
cachevars("extendedcat_{$cat['user_extended_struct_id']}", $cat);
|
||||
$ret .= $this->sc_userextended_cat($cat['user_extended_struct_id']);
|
||||
// $ret .= $tp->parseTemplate("{USEREXTENDED_CAT={$cat['user_extended_struct_id']}}", TRUE, $usersettings_shortcodes);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_userextended_cat($parm)
|
||||
{
|
||||
global $sql, $tp, $usersettings_shortcodes, $USER_EXTENDED_CAT, $extended_showed;
|
||||
if(isset($extended_showed['cat'][$parm]))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
$ret = "";
|
||||
$catInfo = getcachedvars("extendedcat_{$parm}");
|
||||
if(!$catInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($this->var['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_id = ".intval($parm)."
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$catInfo = $sql->db_Fetch();
|
||||
}
|
||||
}
|
||||
|
||||
if($catInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($this->var['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_parent = ".intval($parm)."
|
||||
AND user_extended_struct_type != 0
|
||||
ORDER BY user_extended_struct_order ASC
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$fieldList = $sql->db_getList();
|
||||
foreach($fieldList as $field)
|
||||
{
|
||||
cachevars("extendedfield_{$cat['user_extended_struct_name']}", $field);
|
||||
//TODO use $this instead of parseTemplate();
|
||||
$ret .= $tp->parseTemplate("{USEREXTENDED_FIELD={$field['user_extended_struct_name']}}", TRUE, $usersettings_shortcodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($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;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_userextended_field($parm)
|
||||
{
|
||||
global $sql, $tp, $usersettings_shortcodes, $extended_showed, $ue, $USEREXTENDED_FIELD, $REQUIRED_FIELD;
|
||||
if(isset($extended_showed['field'][$parm]))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
$ret = "";
|
||||
|
||||
$fInfo = getcachedvars("extendeddata_{$parm}");
|
||||
if(!$fInfo)
|
||||
{
|
||||
$qry = "
|
||||
SELECT * FROM #user_extended_struct
|
||||
WHERE user_extended_struct_applicable IN (".$tp -> toDB($this->var['userclass_list'], true).")
|
||||
AND user_extended_struct_write IN (".USERCLASS_LIST.")
|
||||
AND user_extended_struct_name = '".$tp -> toDB($parm, true)."'
|
||||
";
|
||||
if($sql->db_Select_gen($qry))
|
||||
{
|
||||
$fInfo = $sql->db_Fetch();
|
||||
}
|
||||
}
|
||||
|
||||
if($fInfo)
|
||||
{
|
||||
$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);
|
||||
}
|
||||
|
||||
$parms = explode("^,^",$fInfo['user_extended_struct_parms']);
|
||||
|
||||
$fhide="";
|
||||
if($parms[3])
|
||||
{
|
||||
$chk = (strpos($this->var['user_hidden_fields'], "^user_".$parm."^") === FALSE) ? FALSE : TRUE;
|
||||
if(isset($_POST['updatesettings']))
|
||||
{
|
||||
$chk = isset($_POST['hide']['user_'.$parm]);
|
||||
}
|
||||
$fhide = $ue->user_extended_hide($fInfo, $chk);
|
||||
}
|
||||
|
||||
$uVal = str_replace(chr(1), "", $this->var['user_'.$parm]);
|
||||
$fval = $ue->user_extended_edit($fInfo, $uVal);
|
||||
|
||||
$ret = $USEREXTENDED_FIELD;
|
||||
$ret = str_replace("{FIELDNAME}", $fname, $ret);
|
||||
$ret = str_replace("{FIELDVAL}", $fval, $ret);
|
||||
$ret = str_replace("{HIDEFIELD}", $fhide, $ret);
|
||||
}
|
||||
|
||||
$extended_showed['field'][$parm] = 1;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$uVal = str_replace(chr(1), "", $curVal['user_'.$parm]);
|
||||
$fval = $ue->user_extended_edit($fInfo, $uVal);
|
||||
|
||||
$ret = $USEREXTENDED_FIELD;
|
||||
$ret = str_replace("{FIELDNAME}", $fname, $ret);
|
||||
$ret = str_replace("{FIELDVAL}", $fval, $ret);
|
||||
$ret = str_replace("{HIDEFIELD}", $fhide, $ret);
|
||||
}
|
||||
|
||||
$extended_showed['field'][$parm] = 1;
|
||||
return $ret;
|
||||
SC_END
|
||||
|
||||
*/
|
||||
?>
|
||||
?>
|
@ -1,9 +1,9 @@
|
||||
// <?php
|
||||
<?php
|
||||
// $Id$
|
||||
|
||||
function user_avatar_shortcode($parm='')
|
||||
{
|
||||
global $loop_uid;
|
||||
|
||||
return $parm;
|
||||
|
||||
$height = e107::getPref("im_height");
|
||||
$width = e107::getPref("im_width");
|
||||
@ -30,22 +30,21 @@
|
||||
{
|
||||
$image=$parm;
|
||||
}
|
||||
else
|
||||
elseif(USERIMAGE)
|
||||
{
|
||||
$image = USERIMAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$image = "";
|
||||
}
|
||||
|
||||
// if(!$image) { return; }
|
||||
|
||||
|
||||
|
||||
//require_once(e_HANDLER.'avatar_handler.php');
|
||||
// $avatar = avatar($image);
|
||||
|
||||
if (vartrue($image))
|
||||
{
|
||||
$img = (strpos($image,"://")!==false) ? $image : $tp->thumbUrl(e_MEDIA."avatars/".$image,"aw=".$width."&ah=".$height);
|
||||
$text = "<img class='user-avatar' src='".$img."' alt='' style='width:".$width."px; height:".$height."px' />";
|
||||
$text = "<img class='user-avatar e-tip' src='".$img."' alt='' style='width:".$width."px; height:".$height."px' />
|
||||
<div class='field-help' style='display;none'>User info here</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -54,12 +53,6 @@
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
//if($avatar)
|
||||
//{
|
||||
// return "<div class='spacer'><img src='".avatar($image)."' alt='' /></div><br />";
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
?>
|
@ -2,11 +2,37 @@
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(":input").tipsy({gravity: 'w',fade: true, live: true});
|
||||
// $(":input").tipsy({gravity: 'w',fade: true, live: true});
|
||||
|
||||
$(".e-tip").tipsy({gravity: 'sw',fade: true, live: true});
|
||||
|
||||
$(":input,label,.e-tip").each(function() {
|
||||
|
||||
var field = $(this).nextAll(".field-help");
|
||||
|
||||
if(field.length == 0)
|
||||
{
|
||||
$(this).tipsy({gravity: 'sw',fade: true, live: true}); // Normal 'title' attribute
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
field.hide();
|
||||
$(this).tipsy({
|
||||
title: function() {
|
||||
return field.html(); // field-help when HTML is required.
|
||||
},
|
||||
fade: true,
|
||||
live: true,
|
||||
html: true,
|
||||
gravity: 'sw'
|
||||
});
|
||||
});
|
||||
|
||||
// $(".e-tip").tipsy({gravity: 'sw',fade: true, live: true});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(".e-comment-submit").live("click", function(){
|
||||
|
||||
|
@ -982,33 +982,36 @@ class comment
|
||||
$comment = "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
|
||||
}
|
||||
|
||||
if (!$return)
|
||||
{
|
||||
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}");
|
||||
$replace = array($modcomment,"<div id='comments-container'>\n".$text."\n</div>",$comment);
|
||||
$TEMPL = str_replace($search,$replace,$this->template['LAYOUT']);
|
||||
|
||||
|
||||
|
||||
|
||||
$search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}");
|
||||
$replace = array($modcomment,"<div id='comments-container'>\n".$text."\n</div>",$comment);
|
||||
$TEMPL = str_replace($search,$replace,$this->template['LAYOUT']);
|
||||
|
||||
|
||||
if(!$return)
|
||||
{
|
||||
if ($tablerender)
|
||||
{
|
||||
|
||||
echo $ns->tablerender("<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99, $TEMPL, 'comment', TRUE);
|
||||
|
||||
echo $ns->tablerender("<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99, $TEMPL, 'comment', TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $TEMPL;
|
||||
}
|
||||
|
||||
}
|
||||
//echo $modcomment.$comment;
|
||||
//echo $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$ret['comment'] = $text . $modcomment;
|
||||
$ret['comment'] = "<div id='comments-container'>\n".$text."\n</div>";
|
||||
|
||||
$ret['comment_form'] = $comment;
|
||||
$ret['caption'] = COMLAN_99;
|
||||
$ret['caption'] = "<span id='e-comment-total'>".$this->totalComments."</span> ".COMLAN_99;
|
||||
|
||||
return (!$return) ? "" : $ret;
|
||||
}
|
||||
|
@ -213,6 +213,100 @@ class e_form
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Avatar Picker
|
||||
* @param $name - form element name ie. value to be posted.
|
||||
* @param $curVal - current avatar value. ie. the image-file name or URL.
|
||||
*/
|
||||
function avatarpicker($name,$curVal='',$options=array())
|
||||
{
|
||||
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$attr = "aw=".$pref['im_width']."&ah=".$pref['im_height'];
|
||||
$blankImg = $tp->thumbUrl(e_IMAGE."generic/blank_avatar.jpg",$attr);
|
||||
$localonly = true; //TODO add a pref for allowing external or internal avatars or both.
|
||||
$idinput = $this->name2id($name);
|
||||
$previnput = $idinput."-preview";
|
||||
$optioni = $idinput."-options";
|
||||
|
||||
$img = (strpos($curVal,"://")!==false) ? $curVal : $tp->thumbUrl(e_MEDIA."avatars/".$curVal,"aw=".$width."&ah=".$height);
|
||||
|
||||
if(!$curVal)
|
||||
{
|
||||
$img = $blankImg;
|
||||
}
|
||||
|
||||
if($localonly == true)
|
||||
{
|
||||
$text = "<input class='tbox' style='width:80%' id='{$idinput}' type='hidden' name='image' size='40' value='{$curVal}' maxlength='100' />";
|
||||
$text .= "<img src='".$img."' id='{$previnput}' class='e-expandit e-tip avatar' style='cursor:pointer; width:".$pref['im_width']."px; height:".$pref['im_height']."px' title='Choose an avatar for yourself'/>"; // TODO LAN
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = "<input class='tbox' style='width:80%' id='{$idinput}' type='text' name='image' size='40' value='$curVal' maxlength='100' title=\"".LAN_SIGNUP_111."\" />";
|
||||
$text .= "<img src='".$img."' id='{$previnput}' style='display:none' />";
|
||||
$text .= "<input class='button e-expandit' type ='button' style='cursor:pointer' size='30' value=\"Choose Avatar\" />"; //TODO Common LAN.
|
||||
}
|
||||
|
||||
$avFiles = e107::getFile()->get_files(e_MEDIA."avatars/",".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG");
|
||||
|
||||
$text .= "\n<div id='{$optioni}' style='display:none' >\n"; //TODO unique id.
|
||||
|
||||
if ($pref['avatar_upload'] && FILE_UPLOADS && vartrue($options['upload']))
|
||||
{
|
||||
$diz = LAN_USET_32.($pref['im_width'] || $pref['im_height'] ? "\n".str_replace(array('--WIDTH--','--HEIGHT--'), array($pref['im_width'], $pref['im_height']), LAN_USER_86) : "");
|
||||
|
||||
$text .= "<div>".LAN_USET_26."<br />
|
||||
<input class='tbox' name='file_userfile[avatar]' type='file' size='47' title=\"{$diz}\" />
|
||||
</div>
|
||||
<div class='divider'><span>OR</span></div>";
|
||||
}
|
||||
|
||||
|
||||
foreach($avFiles as $fi)
|
||||
{
|
||||
$img_path = $tp->thumbUrl(e_MEDIA_ABS."avatars/".$fi['fname'],$attr);
|
||||
$text .= "\n<a class='e-expandit' title='Choose this avatar' href='#{$optioni}'><img src='".$img_path."' alt='' onclick=\"insertext('".$fi['fname']."', '".$idinput."');document.getElementById('".$previnput."').src = this.src;\" /></a> ";
|
||||
//TODO javascript CSS selector
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$text .= "<br />
|
||||
</div>";
|
||||
|
||||
// Used by usersettings.php right now.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return $text;
|
||||
|
||||
//TODO discuss and FIXME
|
||||
// Intentionally disable uploadable avatar and photos at this stage
|
||||
if (false && $pref['avatar_upload'] && FILE_UPLOADS)
|
||||
{
|
||||
$text .= "<br /><span class='smalltext'>".LAN_SIGNUP_25."</span> <input class='tbox' name='file_userfile[]' type='file' size='40' />
|
||||
<br /><div class='smalltext'>".LAN_SIGNUP_34."</div>";
|
||||
}
|
||||
|
||||
if (false && $pref['photo_upload'] && FILE_UPLOADS)
|
||||
{
|
||||
$text .= "<br /><span class='smalltext'>".LAN_SIGNUP_26."</span> <input class='tbox' name='file_userfile[]' type='file' size='40' />
|
||||
<br /><div class='smalltext'>".LAN_SIGNUP_34."</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* FIXME - better GUI, {IMAGESELECTOR} rewrite, flexibility, thumbnails, tooltip image preivew, etc.
|
||||
* FIXME - use the media-manager as an image selector.
|
||||
@ -737,8 +831,8 @@ class e_form
|
||||
|
||||
function radio_switch($name, $checked_enabled = false, $label_enabled = '', $label_disabled = '',$options=array())
|
||||
{
|
||||
$options_on = array();
|
||||
$options_off = array();
|
||||
$options_on = varset($options['enabled'],array());
|
||||
$options_off = varset($options['disabled'],array());
|
||||
|
||||
if($options['class'] == 'e-expandit') // See admin->prefs 'Single Login' for an example.
|
||||
{
|
||||
|
@ -922,6 +922,11 @@ class e_shortcode
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setVars($eVars) // Alias of setParserVars();
|
||||
{
|
||||
return $this->setParserVars($eVars);
|
||||
}
|
||||
|
||||
public function setMode($mode)
|
||||
{
|
||||
$this->mode = ($mode == 'edit') ? 'edit' : 'view';
|
||||
|
@ -71,7 +71,7 @@ define("LAN_SIGNUP_27", "Show");
|
||||
define("LAN_SIGNUP_30", "If you do not wish to display your email address on this site, please select 'Yes' for the 'Hide email address?' option.");
|
||||
//define("LAN_SIGNUP_31", "URL to your XUP file");
|
||||
//define("LAN_SIGNUP_32", "What's an XUP file?");
|
||||
define("LAN_SIGNUP_33", "Type path or choose avatar");
|
||||
// define("LAN_SIGNUP_33", "Type path or choose avatar");
|
||||
define("LAN_SIGNUP_34", "Please note: Any image uploaded to this server that is deemed inappropriate by the administrators will be deleted immediately.");
|
||||
//define("LAN_SIGNUP_35", "Click here to register using an XUP file");
|
||||
define("LAN_SIGNUP_36", "An error has occurred creating your user information, please contact the site admin");
|
||||
@ -152,7 +152,8 @@ define("LAN_USERNAME", "Display Name");
|
||||
|
||||
define("LAN_SIGNUP_107", "Password must be a minimum of [x] characters and include at least one UPPERCASE letter and a digit");
|
||||
define("LAN_SIGNUP_108", "Must be a valid email address");
|
||||
define("LAN_SIGNUP_109", "Must not contain any spaces");//TODO check against regex requirements
|
||||
define("LAN_SIGNUP_109", "Is CaSe sensitive and must not contain spaces");//TODO check against regex requirements
|
||||
define("LAN_SIGNUP_110", "Your full name");
|
||||
define("LAN_SIGNUP_111", "Enter a URL to your image or choose an existing avatar.");
|
||||
|
||||
?>
|
@ -86,14 +86,14 @@ define("LAN_USET_16", "Tick box to delete existing photo without uploading anoth
|
||||
define("LAN_USET_17", "Display name already used. Please choose another");
|
||||
define('LAN_USET_18', 'User data changed by admin: --ID--, login name: --LOGNAME--');
|
||||
//define('LAN_USET_19', 'Custom Title'); Now LAN_USER_74
|
||||
define('LAN_USET_20', 'You must also change the user\'s password if you are changing their login name or email address');
|
||||
define('LAN_USET_20', "You must also change the user's password if you are changing their login name or email address");
|
||||
define('LAN_USET_21', 'Please validate the changes by re-entering your password: ');
|
||||
define('LAN_USET_22', 'Invalid password!');
|
||||
define('LAN_USET_22', 'Invalid password!'); // TODO LAN common?
|
||||
define('LAN_USET_23', 'Leave blank to keep existing password'); // LAN_401
|
||||
define('LAN_USET_24', 'New Password: '); // LAN_152
|
||||
define('LAN_USET_25', 'Re-type New Password: '); // LAN_153
|
||||
define('LAN_USET_26', 'Upload your Avatar'); // LAN_415
|
||||
define('LAN_USET_27', 'Upload Your Photograph'); // LAN_414
|
||||
define('LAN_USET_27', 'Upload your Photograph'); // LAN_414
|
||||
define('LAN_USET_28', 'This will be shown on your profile page'); // LAN_426
|
||||
//define('LAN_USET_29', 'URL to your XUP file'); // LAN_433
|
||||
define('LAN_USET_30', 'what\'s this?'); // LAN_434
|
||||
@ -103,11 +103,11 @@ define('LAN_USET_33', 'Choose site-stored avatar'); // LAN_421
|
||||
define('LAN_USET_34', 'Use remote avatar'); // LAN_422
|
||||
define('LAN_USET_35', 'Please type full address to image'); // LAN_423
|
||||
define('LAN_USET_36', 'Click button to see avatars stored on this site'); // LAN_424
|
||||
define('LAN_USET_37', 'Save Settings'); // LAN_154
|
||||
define('LAN_USET_37', 'Save Settings'); // LAN_154 //TODO common LAN?
|
||||
define('LAN_USET_38', 'Choose avatar'); // LAN_403
|
||||
define('LAN_USET_39', 'Update User Settings'); // LAN_155
|
||||
define('LAN_USET_40', 'The two passwords do not match'); // LAN_105
|
||||
define('LAN_USET_41', 'Settings updated and saved into database.'); // LAN_150
|
||||
define('LAN_USET_41', 'Settings updated and saved into database.'); // LAN_150 //TODO Common LAN?
|
||||
define('LAN_USET_42', '');
|
||||
|
||||
|
||||
|
@ -83,8 +83,8 @@ $sc_style['COMMENT_BUTTON']['post'] = "</div>";
|
||||
$sc_style['COMMENT_RATE']['pre'] = '<div class="comment-rate">';
|
||||
$sc_style['COMMENT_RATE']['post'] = '</div>';
|
||||
|
||||
$sc_style['USER_AVATAR']['pre'] = '<div class="comment-avatar center">';
|
||||
$sc_style['USER_AVATAR']['post'] = '</div>';
|
||||
//$sc_style['USER_AVATAR']['pre'] = '<div class="comment-avatar center">';
|
||||
//$sc_style['USER_AVATAR']['post'] = '</div>';
|
||||
|
||||
$sc_style['COMMENT_MODERATE']['pre'] = '<span class="comment-moderate">';
|
||||
$sc_style['COMMENT_MODERATE']['post'] = '</span>';
|
||||
@ -95,7 +95,7 @@ $sc_style['COMMENT_MODERATE']['post'] = '</span>';
|
||||
$COMMENT_TEMPLATE['FORM'] = "
|
||||
<div class='comment-box comment-box-form clearfix'>
|
||||
<div class='comment-box-left'>
|
||||
{USER_AVATAR}
|
||||
{COMMENT_AVATAR}
|
||||
</div>
|
||||
<div class='comment-box-right' style='text-align:left'>
|
||||
<div class='P10'>
|
||||
|
@ -135,7 +135,7 @@ $sc_style['SIGNUP_SIGNATURE']['post'] = "
|
||||
|
||||
$sc_style['SIGNUP_IMAGES']['pre'] = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30%; vertical-align:top;white-space:nowrap' >".LAN_SIGNUP_94.req($pref['signup_option_image'])."<br /><span class='smalltext'>(".LAN_SIGNUP_33.")</span></td>
|
||||
<td class='forumheader3' style='width:30%; vertical-align:top;white-space:nowrap' >".LAN_SIGNUP_94.req($pref['signup_option_image'])."</td>
|
||||
<td class='forumheader3' style='width:70%;vertical-align:top' >
|
||||
";
|
||||
$sc_style['SIGNUP_IMAGES']['post'] = "
|
||||
@ -185,6 +185,9 @@ $sc_style['SIGNUP_EMAIL_CONFIRM']['post'] = "
|
||||
</tr>
|
||||
";
|
||||
|
||||
$sc_style['SIGNUP_XUP']['pre'] = "<div class='center' style='display:block;padding:10px'>";
|
||||
$sc_style['SIGNUP_XUP']['post'] = "<h2 class='divider'><span>OR</span></h2></div>";
|
||||
|
||||
|
||||
|
||||
if(!defined($COPPA_TEMPLATE))
|
||||
@ -206,17 +209,14 @@ $COPPA_FAIL = "<div style='text-align:center'>".LAN_SIGNUP_9."</div>";
|
||||
if(!defined($SIGNUP_TEXT))
|
||||
{
|
||||
$SIGNUP_TEXT =
|
||||
LAN_SIGNUP_80." <b>".LAN_SIGNUP_29."</b><br /><br />".LAN_SIGNUP_30."<br />
|
||||
LAN_SIGNUP_80." <b>".LAN_SIGNUP_29."</b><br /><br />".LAN_SIGNUP_30."<br />".LAN_SIbGNUP_85."
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
if(!defined($SIGNUP_BEGIN))
|
||||
{
|
||||
$SIGNUP_BEGIN = "
|
||||
{SIGNUP_FORM_OPEN}
|
||||
<div class='signup-container' style='text-align:center;".USER_WIDTH."'>
|
||||
".LAN_SIGNUP_85."<br /><br /></div>";
|
||||
$SIGNUP_BEGIN = "{SIGNUP_FORM_OPEN}";
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,81 +16,91 @@
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined("USER_WIDTH")){ define("USER_WIDTH", "width:auto"); }
|
||||
global $usersettings_shortcodes, $pref;
|
||||
|
||||
// global $usersettings_shortcodes, $pref;
|
||||
|
||||
|
||||
$sc_style['CUSTOMTITLE']['pre'] = "
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_04.":</td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
";
|
||||
$sc_style['CUSTOMTITLE']['post'] = "</td></tr>";
|
||||
$sc_style['CUSTOMTITLE']['pre'] = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_04.":</td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
$sc_style['CUSTOMTITLE']['post'] = "</td></tr>\n";
|
||||
|
||||
$sc_style['PASSWORD1']['pre'] = "
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USET_24."<br /><span class='smalltext'>".LAN_USET_23."</span></td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
";
|
||||
|
||||
$sc_style['PASSWORD2']['pre'] = "
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USET_25."<br /><span class='smalltext'>".LAN_USET_23."</span></td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
";
|
||||
$sc_style['PASSWORD2']['post'] = "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
$sc_style['PASSWORD_LEN']['pre'] = "<br /><span class='smalltext'> (".LAN_USER_78." ";
|
||||
$sc_style['PASSWORD_LEN']['post'] = " ".LAN_USER_79.")</span>";
|
||||
|
||||
$sc_style['USERCLASSES']['pre'] = "<tr>
|
||||
<td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_76.":".req($pref['signup_option_class'])."
|
||||
<br /><span class='smalltext'>".LAN_USER_73."</span>
|
||||
</td>
|
||||
<td style='width:60%' class='forumheader2'>";
|
||||
$sc_style['USERCLASSES']['post'] = "</td></tr>";
|
||||
|
||||
$sc_style['AVATAR_UPLOAD']['pre'] = "<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USET_26."<br /></td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
";
|
||||
$sc_style['AVATAR_UPLOAD']['post'] = "</td></tr>";
|
||||
|
||||
$sc_style['PHOTO_UPLOAD']['pre'] = "
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader'>".LAN_USER_06."</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USET_27."<br /><span class='smalltext'>".LAN_USET_28."</span></td>
|
||||
<td style='width:60%' class='forumheader2'><span class='smalltext'>
|
||||
";
|
||||
$sc_style['PHOTO_UPLOAD']['post'] = "</span></td></tr>";
|
||||
$sc_style['PASSWORD1']['pre'] = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USET_24."</td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
$sc_style['PASSWORD1']['post'] = "</td></tr>\n";
|
||||
|
||||
|
||||
$USER_EXTENDED_CAT = "<tr><td colspan='2' class='forumheader'>{CATNAME}</td></tr>";
|
||||
$USEREXTENDED_FIELD = "
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>
|
||||
{FIELDNAME}
|
||||
</td>
|
||||
<td style='width:60%' class='forumheader3'>
|
||||
{FIELDVAL} {HIDEFIELD}
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
$REQUIRED_FIELD = "{FIELDNAME}<span class='required'> *</span>";
|
||||
$sc_style['PASSWORD2']['pre'] = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USET_25."</td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
$sc_style['PASSWORD2']['post'] = "</td></tr>\n";
|
||||
|
||||
|
||||
$sc_style['PASSWORD_LEN']['pre'] = "<br /><span class='smalltext'> (".LAN_USER_78." ";
|
||||
$sc_style['PASSWORD_LEN']['post'] = " ".LAN_USER_79.")</span>";
|
||||
|
||||
$sc_style['USERCLASSES']['pre'] = "<tr>
|
||||
<td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_76.":".req($pref['signup_option_class'])."
|
||||
<br /><span class='smalltext'>".LAN_USER_73."</span>
|
||||
</td>
|
||||
<td style='width:60%' class='forumheader2'>";
|
||||
$sc_style['USERCLASSES']['post'] = "</td></tr>\n";
|
||||
|
||||
$sc_style['AVATAR_UPLOAD']['pre'] = "<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USET_26."<br /></td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
$sc_style['AVATAR_UPLOAD']['post'] = "</td></tr>\n";
|
||||
|
||||
|
||||
$sc_style['PHOTO_UPLOAD']['pre'] = "<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USER_06."</td>
|
||||
<td style='width:60%' class='forumheader2'><span class='smalltext'>\n";
|
||||
$sc_style['PHOTO_UPLOAD']['post'] = "</span></td></tr>";
|
||||
|
||||
|
||||
$sc_style['USERNAME']['pre'] = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_01."</td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
|
||||
$sc_style['USERNAME']['post'] = "</td</tr>";
|
||||
|
||||
|
||||
$sc_style['LOGINNAME']['pre'] = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_81."</td>
|
||||
<td style='width:60%' class='forumheader2'>\n";
|
||||
$sc_style['LOGINNAME']['post'] = "</td></tr>\n";
|
||||
|
||||
|
||||
$sc_style['SIGNATURE']['pre'] = "<tr><td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_71.req($pref['signup_option_signature'])."</td>
|
||||
<td style='width:60%' class='forumheader2'>";
|
||||
|
||||
$sc_style['SIGNATURE_HELP']['pre'] = "</td></tr>";
|
||||
|
||||
|
||||
$USER_EXTENDED_CAT = "<tr><td colspan='2' class='forumheader'>{CATNAME}</td></tr>";
|
||||
$USEREXTENDED_FIELD = "<tr>
|
||||
<td style='width:40%' class='forumheader3'>
|
||||
{FIELDNAME}
|
||||
</td>
|
||||
<td style='width:60%' class='forumheader3'>
|
||||
{FIELDVAL} {HIDEFIELD}
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
$REQUIRED_FIELD = "{FIELDNAME}<span class='required'> *</span>";
|
||||
|
||||
// After Saving has occurred.
|
||||
$USERSETTINGS_MESSAGE = "<div style='text-align:center'>{MESSAGE}</div>";
|
||||
$USERSETTINGS_MESSAGE_CAPTION = LAN_OK;
|
||||
$USERSETTINGS_MESSAGE = "<div style='text-align:center'>{MESSAGE}</div>";
|
||||
$USERSETTINGS_MESSAGE_CAPTION = LAN_OK;
|
||||
$USERSETTINGS_EDIT_CAPTION = LAN_USET_39; // 'Update User Settings'
|
||||
|
||||
|
||||
|
||||
$USERSETTINGS_EDIT_CAPTION = LAN_USET_39; // 'Update User Settings'
|
||||
|
||||
$USERSETTINGS_EDIT = "
|
||||
<div style='text-align:center'>
|
||||
@ -102,18 +112,13 @@ $USERSETTINGS_EDIT = "
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader'>".LAN_USET_31."</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_01."<br /><span class='smalltext'>".LAN_USER_80."</span></td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{USERNAME}
|
||||
</td>
|
||||
</tr>
|
||||
{LOGINNAME}
|
||||
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_81."<br /><span class='smalltext'>".LAN_USER_82."</span></td>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_60.req(!$pref['disable_emailcheck'])."</td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{LOGINNAME}
|
||||
{EMAIL}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -130,59 +135,32 @@ $USERSETTINGS_EDIT = "
|
||||
{PASSWORD_LEN}
|
||||
{PASSWORD2}
|
||||
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_60.req(!$pref['disable_emailcheck'])."</td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{EMAIL}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_83."<br /><span class='smalltext'>".LAN_USER_84."</span></td>
|
||||
<td style='width:40%' class='forumheader3'>".LAN_USER_83."</td>
|
||||
<td style='width:60%' class='forumheader2'><span class='defaulttext'>
|
||||
{HIDEEMAIL=radio}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{USERCLASSES}
|
||||
{USEREXTENDED_ALL}
|
||||
|
||||
<tr><td colspan='2' class='forumheader'>".LAN_USET_8."</td></tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%;vertical-align:top' class='forumheader3'>".LAN_USER_71.req($pref['signup_option_signature'])."</td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{SIGNATURE=cols=58&rows=4}
|
||||
<br />
|
||||
{SIGNATURE_HELP}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader'>".LAN_USER_07."</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader3' style='text-align:center'>".LAN_USET_32.($pref['im_width'] || $pref['im_height'] ? "<br />".str_replace(array('--WIDTH--','--HEIGHT--'), array($pref['im_width'], $pref['im_height']), LAN_USER_86) : "")."</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USET_34.req($pref['signup_option_image'])."<br /><span class='smalltext'>".LAN_USET_35."</span></td>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USER_07.req($pref['signup_option_image'])."</td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{AVATAR_REMOTE}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style='width:40%; vertical-align:top' class='forumheader3'>".LAN_USET_33."<br /><span class='smalltext'>".LAN_USET_36."</span></td>
|
||||
<td style='width:60%' class='forumheader2'>
|
||||
{AVATAR_CHOOSE}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{AVATAR_UPLOAD}
|
||||
{PHOTO_UPLOAD}
|
||||
|
||||
{USERCLASSES}
|
||||
{USEREXTENDED_ALL}
|
||||
|
||||
|
||||
{SIGNATURE=cols=58&rows=4}
|
||||
{SIGNATURE_HELP}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td colspan='2' style='text-align:center' class='forumheader'><input class='button' type='submit' name='updatesettings' value='".LAN_USET_37."' /></td>
|
||||
</tr>
|
||||
|
@ -78,15 +78,15 @@ a.cpage-np.current { text-decoration: none; }
|
||||
.s-message div.warning { padding: 5px; margin-bottom: 10px; }
|
||||
|
||||
|
||||
.s-message div.info { background-color:#C1E0FF; border: 1px solid #3399FF; }
|
||||
.s-message div.error { background-color:#FFCECE; border: 1px solid #CC0000; }
|
||||
.s-message div.success { background-color:#DFFFDF; border: 1px solid #009900; }
|
||||
.s-message div.warning { background-color:#FFFFD5; border: 1px solid #FFCC00; }
|
||||
.s-message div.debug { background-color:#FFFFFF; border: 1px solid #EAEAEA; }
|
||||
.s-message div.info { background-color:#C1E0FF; border: 1px solid #3399FF; border-radius:5px }
|
||||
.s-message div.error { background-color:#FFCECE; border: 1px solid #CC0000; border-radius:5px }
|
||||
.s-message div.success { background-color:#DFFFDF; border: 1px solid #009900; border-radius:5px }
|
||||
.s-message div.warning { background-color:#FFFFD5; border: 1px solid #FFCC00; border-radius:5px }
|
||||
.s-message div.debug { background-color:#FFFFFF; border: 1px solid #EAEAEA; border-radius:5px }
|
||||
|
||||
.s-message .s-message-title { height: 32px; background: 0 50% no-repeat; padding-left: 42px; font-size: 14px; font-weight: bold; line-height: 32px; }
|
||||
|
||||
.s-message div.info .s-message-title { background-image: url(images/messagebox_info.png); }
|
||||
.s-message div.info .s-message-title { background-image: url(images/messagebox_info.png); }
|
||||
.s-message div.error .s-message-title { background-image: url(images/messagebox_critical.png); }
|
||||
.s-message div.success .s-message-title { background-image: url(images/ok.png); }
|
||||
.s-message div.warning .s-message-title { background-image: url(images/messagebox_warning.png); }
|
||||
@ -141,9 +141,9 @@ div.bbcode { margin: 15px 0px; clear: both; } /* layout control via bbcodes */
|
||||
|
||||
.comment-box-username { padding-left:0px; font-size:1.2em; padding-right: 10px }
|
||||
|
||||
div.comment-avatar { margin-top:5px; padding:10px 10px 0px 10px; }
|
||||
div.comment-avatar { margin-top:5px; padding:10px 10px 0px 10px; }
|
||||
|
||||
img.comment-avatar { max-width:128px; -webkit-box-shadow:#CCCCCC 0px 0px 10px; -moz-box-shadow:#CCCCCC 0px 0px 10px; box-shadow:#CCCCCC 0px 0px 10px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; }
|
||||
img.user-avatar { max-width:128px; -webkit-box-shadow:#CCCCCC 0px 0px 10px; -moz-box-shadow:#CCCCCC 0px 0px 10px; box-shadow:#CCCCCC 0px 0px 10px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; }
|
||||
|
||||
.comment-box-right { width:85%; min-height: 70px; float:left; }
|
||||
|
||||
@ -179,3 +179,11 @@ div.e-comment-edit-save { margin-top:8px; padding: 5px }
|
||||
.e-rate-up img { opacity: 0.4 }
|
||||
.e-rate-down img { opacity: 0.4 }
|
||||
|
||||
|
||||
|
||||
.divider { border-bottom: 1px solid silver; font-size: 18px; margin-bottom: 30px; position: relative; text-align: center; }
|
||||
.divider span { background: #fff; padding: 0 15px; position: relative; top: 10px; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -282,11 +282,13 @@ if ((USER || ($pref['user_reg'] == 0) || (vartrue($pref['auth_method'],'e107') !
|
||||
header('location: '.e_HTTP.'index.php');
|
||||
}
|
||||
|
||||
if(getperms('0'))
|
||||
if(getperms('0')) // allow main admin to view signup page for design/testing.
|
||||
{
|
||||
//$mes = e107::getMessage();
|
||||
//$mes->debug("You are currently logged in.");
|
||||
$SIGNUP_BEGIN = "<div class='s-message' style='background-color:red;text-align:center;padding:30px;'> You are currently logged in.</div>". $SIGNUP_BEGIN;
|
||||
$SIGNUP_BEGIN = "<div class='s-message'>
|
||||
<div class='error'> You are currently logged in.
|
||||
</div></div>". $SIGNUP_BEGIN;
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,6 +59,8 @@ require_once (e_HANDLER.'ren_help.php');
|
||||
include_once (e107::coreTemplatePath('usersettings')); //correct way to load a core template.
|
||||
include_once (e_CORE.'shortcodes/batch/usersettings_shortcodes.php');
|
||||
|
||||
$usersettings_shortcodes = e107::getScBatch('usersettings');
|
||||
|
||||
e107::js('inline',"
|
||||
function addtext_us(sc)
|
||||
{
|
||||
@ -694,6 +696,8 @@ if (e_QUERY == "update")
|
||||
$text .= "<div class='fborder' style='text-align:center'><br />".str_replace("*", "<span class='required'>*</span>", LAN_USET_9)."<br />".LAN_USET_10."<br /><br /></div>";
|
||||
}
|
||||
|
||||
// $sc->setParserVars($val);
|
||||
e107::getScBatch('usersettings')->setVars($curVal);
|
||||
$text .= $tp->parseTemplate($USERSETTINGS_EDIT, TRUE, $usersettings_shortcodes);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user