mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Added new user shortcode {USER_PROFILE_URL}
which returns only the URL to the user profile page without any HTML formatting
This commit is contained in:
@@ -374,7 +374,6 @@ class user_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_icon_link($parm='')
|
function sc_user_icon_link($parm='')
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -396,29 +395,32 @@ class user_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_id($parm='')
|
function sc_user_id($parm='')
|
||||||
{
|
{
|
||||||
return $this->var['user_id'];
|
return $this->var['user_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_name($parm='')
|
function sc_user_name($parm='')
|
||||||
{
|
{
|
||||||
return $this->var['user_name'];
|
return $this->var['user_name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_name_link($parm='')
|
function sc_user_name_link($parm='')
|
||||||
{
|
{
|
||||||
$uparams = array('id' => $this->var['user_id'], 'name' => $this->var['user_name']);
|
$uparams = array('id' => $this->var['user_id'], 'name' => $this->var['user_name']);
|
||||||
return "<a href='".e107::getUrl()->create('user/profile/view', $uparams)."'>".$this->var['user_name']."</a>";
|
return "<a href='".e107::getUrl()->create('user/profile/view', $uparams)."'>".$this->var['user_name']."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sc_user_profile_url($parm='')
|
||||||
|
{
|
||||||
|
$uparams = array('id' => $this->var['user_id'], 'name' => $this->var['user_name']);
|
||||||
|
return e107::getUrl()->create('user/profile/view', $uparams);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function sc_user_loginname($parm='')
|
function sc_user_loginname($parm='')
|
||||||
{
|
{
|
||||||
if(ADMIN && getperms("4"))
|
if(ADMIN && getperms("4"))
|
||||||
@@ -428,7 +430,6 @@ class user_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_birthday_icon($parm='')
|
function sc_user_birthday_icon($parm='')
|
||||||
{
|
{
|
||||||
if(defined("USER_BIRTHDAY_ICON"))
|
if(defined("USER_BIRTHDAY_ICON"))
|
||||||
@@ -439,12 +440,11 @@ class user_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
return "<img src='".THEME_ABS."images/user_birthday.png' alt='' style='vertical-align:middle;' /> ";
|
return "<img src='".THEME_ABS."images/user_birthday.png' alt='' style='vertical-align:middle;' /> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "<img src='".e_IMAGE_ABS."user_icons/user_birthday.png' alt='' style='vertical-align:middle;' /> ";
|
return "<img src='".e_IMAGE_ABS."user_icons/user_birthday.png' alt='' style='vertical-align:middle;' /> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_birthday($parm='')
|
function sc_user_birthday($parm='')
|
||||||
{
|
{
|
||||||
if ($this->var['user_birthday'] != "" && $this->var['user_birthday'] != "0000-00-00" && preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/", $this->var['user_birthday'], $regs))
|
if ($this->var['user_birthday'] != "" && $this->var['user_birthday'] != "0000-00-00" && preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/", $this->var['user_birthday'], $regs))
|
||||||
@@ -456,9 +456,8 @@ class user_shortcodes extends e_shortcode
|
|||||||
return "<i>".LAN_USER_33."</i>";
|
return "<i>".LAN_USER_33."</i>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_signature($parm)
|
function sc_user_signature($parm)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
@@ -466,7 +465,6 @@ class user_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sc_user_comments_link($parm)
|
function sc_user_comments_link($parm)
|
||||||
{
|
{
|
||||||
if($this->commentsDisabled)
|
if($this->commentsDisabled)
|
||||||
|
Reference in New Issue
Block a user