本文整理汇总了PHP中cmsPage::getMetaSearchLink方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsPage::getMetaSearchLink方法的具体用法?PHP cmsPage::getMetaSearchLink怎么用?PHP cmsPage::getMetaSearchLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsPage
的用法示例。
在下文中一共展示了cmsPage::getMetaSearchLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUser
public function getUser($login){
if(is_numeric($login)){
$where = "u.id = '{$login}'";
} else {
$where = "u.login = '{$login}'";
}
$sql = "SELECT
u.*,
u.status as status_text,
u.rating as user_rating,
p.id as pid, p.city, p.description, p.showmail, p.showbirth, p.showicq,
p.karma, p.imageurl, p.allow_who,
p.gender as gender, p.formsdata, p.signature,
p.email_newmsg, p.cm_subscribe,
g.title as grp,
g.alias as group_alias,
b.user_id as banned,
IFNULL(ui.login, '') as inv_login,
IFNULL(ui.nickname, '') as inv_nickname
FROM cms_users u
INNER JOIN cms_user_profiles p ON p.user_id = u.id
INNER JOIN cms_user_groups g ON g.id = u.group_id
LEFT JOIN cms_banlist b ON b.user_id = u.id AND b.status = 1
LEFT JOIN cms_users ui ON ui.id = u.invited_by
WHERE u.is_locked = 0 AND {$where}
ORDER BY id DESC LIMIT 1";
$result = $this->inDB->query($sql);
if (!$this->inDB->num_rows($result)){ return false; }
$user = $this->inDB->fetch_assoc($result);
global $_LANG;
$user['avatar'] = cmsUser::getUserAvatarUrl($user['id'], 'big', $user['imageurl'], $user['is_deleted']);
$user['status_date'] = cmsCore::dateDiffNow($user['status_date']);
$user['flogdate'] = cmsUser::getOnlineStatus($user['id'], $user['logdate']);
$user['fregdate'] = cmsCore::dateFormat($user['regdate']);
$user['fbirthdate'] = cmsCore::dateFormat($user['birthdate']);
$user['cityurl'] = urlencode($user['city']);
$user['profile_link'] = HOST . cmsUser::getProfileURL($user['login']);
$user['fdescription'] = cmsPage::getMetaSearchLink('/users/hobby/', $user['description']);
$user['formsdata'] = cmsCore::yamlToArray($user['formsdata']);
if ($user['gender']) {
switch ($user['gender']){
case 'm': $user['fgender'] = $_LANG['MALES']; break;
case 'f': $user['fgender'] = $_LANG['FEMALES']; break;
default: $user['fgender'] = '';
}
}
return cmsCore::callEvent('GET_USER', $user);
}
示例2: getFormFieldValue
/**
* Возвращает значение поля формы
* @param array $form_field Массив поля формы
* @return string html
*/
public function getFormFieldValue($form_field)
{
if (in_array($form_field['kind'], $this->kinds)) {
$method_name = 'get' . icms_ucfirst($form_field['kind']) . 'Value';
if (method_exists($this, $method_name)) {
return call_user_func_array(array($this, $method_name), array($form_field));
}
return !empty($form_field['config']['text_is_link']) && $form_field['config']['text_link_prefix'] ? cmsPage::getMetaSearchLink($form_field['config']['text_link_prefix'], $this->getFieldValue($form_field['id'])) : $this->getFieldValue($form_field['id']);
}
}