1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

User-settings shortcode and template cleanup. avatarpicker() function added to form handler. Other minor fixes.

This commit is contained in:
CaMer0n
2012-06-19 09:08:41 +00:00
parent 312ec063ba
commit aa4e5c0ee7
17 changed files with 705 additions and 519 deletions

View File

@@ -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)
{

View File

@@ -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'])
{

View File

@@ -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."&nbsp;&nbsp;".$rs->form_radio("hideemail", 0)." ".LAN_NO : $rs->form_radio("hideemail", 1)." ".LAN_YES."&nbsp;&nbsp;".$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
*/
?>
?>

View File

@@ -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 />";
//}
}
?>