本文整理汇总了PHP中create_full_url函数的典型用法代码示例。如果您正苦于以下问题:PHP create_full_url函数的具体用法?PHP create_full_url怎么用?PHP create_full_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_full_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_fbcanonicalurl
/**
* Returns the canonical url pertinent to the content of the page
* - for open graph and like button
*
* @return string, canonical url for the content
*/
function get_fbcanonicalurl()
{
global $vbulletin, $og_array;
static $fbcanonicalurl;
$retval = '';
$skipcache = false;
if (empty($fbcanonicalurl)) {
if (THIS_SCRIPT == 'showthread') {
global $threadinfo;
$fbcanonicalurl = create_full_url(fetch_seo_url('thread|js|nosession', $threadinfo, null, null, null, true));
} else {
if (THIS_SCRIPT == 'entry') {
global $bloginfo;
$fbcanonicalurl = create_full_url(fetch_seo_url('entry|js|nosession', $bloginfo, null, null, null, true));
} else {
if (THIS_SCRIPT == 'vbcms' and isset($vbulletin->vbcms['content_type']) and $vbulletin->vbcms['content_type'] == 'Article') {
$fbcanonicalurl = isset($vbulletin->vbcms['page_url']) ? $vbulletin->vbcms['page_url'] : $og_array['og:url'];
} else {
// do not cache canonical url in this case
$skipcache = true;
$retval = $vbulletin->options['bburl'];
}
}
}
}
($hook = vBulletinHook::fetch_hook('fb_canonical_url')) ? eval($hook) : false;
if ($skipcache) {
return $retval;
} else {
return $fbcanonicalurl;
}
}
示例2: parseTagA
/**
* Parses an <a> tag. Matches URL and EMAIL BB code.
*
* @param string String containing tag attributes
* @param string Text within tag
* @param string Name of HTML tag. Used if one function parses multiple tags
* @param mixed Extra arguments passed in to parsing call or tag rules
*/
protected function parseTagA($aoptions, $text, $tag_name, $args)
{
$href = $this->parseWysiwygTagAttribute('href=', $aoptions);
if (!trim($href)) {
return $this->parseTagByName('a', $text);
}
if (substr($href, 0, 7) == 'mailto:') {
$tag = 'email';
$href = substr($href, 7);
} else {
if (preg_match('#filedata/fetch\\?filedataid=(\\d+)#si', $href, $matches)) {
$tag = 'attach';
unset($href);
// the url uses filedataid and we have a tempid. This will be fixed by fixAttachBBCode() in the text library
if (preg_match('#data-tempid=(\'|")(.*)(\\1)#siU', $aoptions, $dataMatches)) {
$text = $dataMatches[2];
} else {
$text = 'n' . $matches[1];
}
} else {
if (preg_match('#class="[^"]*b-bbcode-user[^"]*"#siU', $aoptions, $matches)) {
$tag = 'user';
// look up the user
$user = vB::getDbAssertor()->getRow('user', array('username' => $text));
$href = $user['userid'];
$text = $user['username'];
} else {
$tag = 'url';
if (!preg_match('#^[a-z0-9]+:#i', $href)) {
// relative URL, prefix it with the URL to this board
$href = create_full_url($href);
}
}
}
}
$tag = strtoupper($tag);
if ($this->isBbcodeTagAllowed($tag)) {
$tag_b = $tag;
if (!empty($href)) {
$tag_b .= "=\"{$href}\"";
}
return "[{$tag_b}]" . $this->parseTagByName('a', $text) . "[/{$tag}]";
} else {
// can't auto link, return a plaintext version
$inner_text = $this->parseTagByName('a', $text);
if ($inner_text != $href) {
return "{$inner_text} ({$href})";
} else {
return $href;
}
}
}
示例3: prepare_profileurl
/**
* Prepares the URL of the User's Profile
*
*/
function prepare_profileurl()
{
if (!isset($this->prepared['profileurl'])) {
$profileurl = create_full_url('member.php?u=' . $this->prepared['userid']);
if (!preg_match('#^[a-z]+://#i', $profileurl)) {
$profileurl = $this->registry->options['bburl'] . '/member.php?u=' . $this->prepared['userid'];
}
$this->prepared['profileurl'] = $profileurl;
}
}
示例4: eval
eval(standard_error(fetch_error('noreason')));
}
$reportobj->do_report($vbulletin->GPC['reason'], $pictureinfo);
$url =& $vbulletin->url;
eval(print_standard_redirect('redirect_reportthanks'));
}
}
// #######################################################################
if ($_REQUEST['do'] == 'picture') {
$vbulletin->input->clean_array_gpc('r', array('pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT, 'commentid' => TYPE_UINT, 'showignored' => TYPE_BOOL));
if (empty($pictureinfo) or $pictureinfo['state'] == 'moderation' and !can_moderate(0, 'canmoderatepictures') and $pictureinfo['userid'] != $vbulletin->userinfo['userid']) {
standard_error(fetch_error('invalidid', $vbphrase['picture'], $vbulletin->options['contactuslink']));
}
$pictureinfo['adddate'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true);
$pictureinfo['addtime'] = vbdate($vbulletin->options['timeformat'], $pictureinfo['dateline']);
$pictureurl = create_full_url("picture.php?albumid={$albuminfo['albumid']}&pictureid={$pictureinfo['pictureid']}");
if (!preg_match('#^[a-z]+://#i', $pictureurl)) {
$pictureurl = $vbulletin->options['bburl'] . "/picture.php?albumid={$albuminfo['albumid']}&pictureid={$pictureinfo['pictureid']}";
}
$pictureinfo['pictureurl'] = htmlspecialchars_uni($pictureurl);
$pictureinfo['caption_censored'] = fetch_censored_text($pictureinfo['caption']);
$show['picture_owner'] = $userinfo['userid'] == $vbulletin->userinfo['userid'];
$show['edit_picture_option'] = ($userinfo['userid'] == $vbulletin->userinfo['userid'] or can_moderate(0, 'caneditalbumpicture'));
$show['add_group_link'] = ($userinfo['userid'] == $vbulletin->userinfo['userid'] and $vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_groups'] and $vbulletin->options['socnet_groups_albums_enabled'] and $vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canviewgroups'] and $vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canjoingroups'] and $pictureinfo['state'] != 'moderation');
$show['reportlink'] = ($vbulletin->userinfo['userid'] and ($vbulletin->options['rpforumid'] or $vbulletin->options['enableemail'] and $vbulletin->options['rpemail']));
$navpictures_sql = $db->query_read_slave("\n\t\tSELECT albumpicture.pictureid\n\t\tFROM " . TABLE_PREFIX . "albumpicture AS albumpicture\n\t\tINNER JOIN " . TABLE_PREFIX . "picture AS picture ON (albumpicture.pictureid = picture.pictureid)\n\t\tWHERE albumpicture.albumid = {$albuminfo['albumid']}\n\t\t" . ((!can_moderate(0, 'canmoderatepictures') and $pictureinfo['userid'] != $vbulletin->userinfo['userid']) ? "AND picture.state = 'visible'" : "") . "\n\t\tORDER BY albumpicture.dateline DESC\n\t");
$pic_location = fetch_picture_location_info($navpictures_sql, $pictureinfo['pictureid']);
($hook = vBulletinHook::fetch_hook('album_picture')) ? eval($hook) : false;
if ($vbulletin->options['pc_enabled'] and $pictureinfo['state'] == 'visible') {
require_once DIR . '/includes/functions_picturecomment.php';
$pagenumber = $vbulletin->GPC['pagenumber'];
示例5: process_attachments
/**
* Constructor - checks that the registry object has been passed correctly.
*
* @param array Information about the content that owns these attachments
* @param array List of attachments belonging to the specifed post
* @param boolean Display download count
* @param boolean View has permissions to download attachments
* @param boolean Viewer has permission to get attachments
* @param boolean Viewer has permission to set thumbnails
*
* @return void
*/
function process_attachments(&$post, &$attachments, $hidecounter = false, $canmod = false, $canget = true, $canseethumb = true, $linkonly = false)
{
global $show, $vbphrase;
if (!empty($attachments)) {
$show['modattachmentlink'] = ($canmod or $post['userid'] == $this->registry->userinfo['userid']);
$show['attachments'] = true;
$show['moderatedattachment'] = $show['thumbnailattachment'] = $show['otherattachment'] = false;
$show['imageattachment'] = $show['imageattachmentlink'] = false;
$attachcount = sizeof($attachments);
$thumbcount = 0;
if (!$this->registry->options['viewattachedimages']) {
$showimagesprev = $this->registry->userinfo['showimages'];
$this->registry->userinfo['showimages'] = false;
}
foreach ($attachments as $attachmentid => $attachment) {
if ($canget and $canseethumb and $attachment['thumbnail_filesize'] == $attachment['filesize']) {
// This is an image that is already thumbnail sized..
$attachment['hasthumbnail'] = 0;
$attachment['forceimage'] = $this->registry->options['viewattachedimages'] ? $this->registry->userinfo['showimages'] : 0;
} else {
if (!$canseethumb) {
$attachment['hasthumbnail'] = 0;
}
}
$show['newwindow'] = $attachment['newwindow'];
$attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachment['filename'], false));
$attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
$attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);
if (vB_Template_Runtime::fetchStyleVar('dirmark')) {
$attachment['filename'] .= vB_Template_Runtime::fetchStyleVar('dirmark');
}
($hook = vBulletinHook::fetch_hook('postbit_attachment')) ? eval($hook) : false;
if ($attachment['state'] == 'visible') {
if ($hidecounter) {
$attachment['counter'] = $vbphrase['n_a'];
$show['views'] = false;
} else {
$show['views'] = true;
}
$lightbox_extensions = array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'bmp');
$ext = $linkonly ? null : $attachment['attachmentextension'];
$attachmenturl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&d={$attachment['dateline']}");
$imageurl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&stc=1&d={$attachment['dateline']}");
$thumburl = create_full_url("attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid={$attachment['attachmentid']}&stc=1&thumb=1&d={$attachment['thumbnail_dateline']}");
switch ($ext) {
case 'gif':
case 'jpg':
case 'jpeg':
case 'jpe':
case 'png':
case 'bmp':
case 'tiff':
case 'tif':
case 'psd':
case 'pdf':
if (!$this->registry->userinfo['showimages']) {
// Special case for PDF - don't list it as an 'image'
if ($attachment['attachmentextension'] == 'pdf') {
$templater = vB_Template::create('postbit_attachment');
$templater->register('attachment', $attachment);
$templater->register('url', $attachmenturl);
$post['otherattachments'] .= $templater->render();
$show['otherattachment'] = true;
} else {
$templater = vB_Template::create('postbit_attachment');
$templater->register('attachment', $attachment);
$templater->register('url', $attachmenturl);
$post['imageattachmentlinks'] .= $templater->render();
$show['imageattachmentlink'] = true;
}
} else {
if ($this->registry->options['viewattachedimages'] == 1 or $this->registry->options['viewattachedimages'] == 2 and $attachcount > 1) {
if ($attachment['hasthumbnail'] or !$canget and !in_array($attachment['attachmentextension'], array('tiff', 'tif', 'psd', 'pdf'))) {
$thumbcount++;
if ($this->registry->options['attachrow'] and $thumbcount >= $this->registry->options['attachrow']) {
$thumbcount = 0;
$show['br'] = true;
} else {
$show['br'] = false;
}
$show['cangetattachment'] = ($canget and in_array($attachment['attachmentextension'], $lightbox_extensions));
$templater = vB_Template::create('postbit_attachmentthumbnail');
$templater->register('attachment', $attachment);
$templater->register('url', $attachmenturl);
$templater->register('pictureurl', $thumburl);
$post['thumbnailattachments'] .= $templater->render();
$show['thumbnailattachment'] = true;
} else {
//.........这里部分代码省略.........
示例6: eval
eval(fetch_email_phrases('activateaccount'));
vbmail($email, $subject, $message, true);
} else {
if ($newusergroupid == 2) {
if ($vbulletin->options['welcomemail']) {
eval(fetch_email_phrases('welcomemail'));
vbmail($email, $subject, $message);
}
}
}
($hook = vBulletinHook::fetch_hook('register_addmember_complete')) ? eval($hook) : false;
if ($vbulletin->GPC['coppauser']) {
$_REQUEST['do'] = 'coppaform';
} else {
if ($vbulletin->options['verifyemail']) {
eval(standard_error(fetch_error('registeremail', $username, $email, create_full_url($vbulletin->url . $vbulletin->session->vars['sessionurl_q'])), '', false));
} else {
$vbulletin->url = str_replace('"', '', $vbulletin->url);
if (!$vbulletin->url) {
$vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
} else {
$vbulletin->url = iif(strpos($vbulletin->url, 'register.php') !== false, $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'], $vbulletin->url);
}
if ($vbulletin->options['moderatenewmembers']) {
eval(standard_error(fetch_error('moderateuser', $username, $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q']), '', false));
} else {
eval(standard_error(fetch_error('registration_complete', $username, $vbulletin->session->vars['sessionurl'], $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php'), '', false));
}
}
}
}
示例7: print_nav_panel
print_nav_panel();
unset($navigation);
echo "</div>\n";
// *************************************************
define('NO_CP_COPYRIGHT', true);
unset($DEVDEBUG);
print_cp_footer();
}
// #############################################################################
// ################################ BUILD FRAMESET #############################
// #############################################################################
if ($_REQUEST['do'] == 'frames' or empty($_REQUEST['do'])) {
$vbulletin->input->clean_array_gpc('r', array('loc' => TYPE_NOHTML));
$navframe = "<frame src=\"index.php?" . $vbulletin->session->vars['sessionurl'] . "do=nav" . iif($vbulletin->GPC['nojs'], '&nojs=1') . "\" name=\"nav\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" border=\"no\" />\n";
$headframe = "<frame src=\"index.php?" . $vbulletin->session->vars['sessionurl'] . "do=head\" name=\"head\" scrolling=\"no\" noresize=\"noresize\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"0\" border=\"no\" />\n";
$mainframe = "<frame src=\"" . iif(!empty($vbulletin->GPC['loc']) and !preg_match('#^[a-z]+:#i', $vbulletin->GPC['loc']), create_full_url($vbulletin->GPC['loc']), "index.php?" . $vbulletin->session->vars['sessionurl'] . "do=home") . "\" name=\"main\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"10\" border=\"no\" />\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php
echo vB_Template_Runtime::fetchStyleVar('textdirection');
?>
" lang="<?php
echo vB_Template_Runtime::fetchStyleVar('languagecode');
?>
">
<head>
<script type="text/javascript">
<!--
// get out of any containing frameset
if (self.parent.frames.length != 0)
{
示例8: if
$output .= $xml->output();
unset($xml);
}
else if (in_array($vbulletin->GPC['type'], array('RSS', 'RSS1', 'RSS2')))
{ // RSS output
// setup the board title
if (empty($title))
{ // just show board title
$rsstitle = $vbulletin->options['bbtitle'];
}
else
{ // show board title plus selection
$rsstitle = $vbulletin->options['bbtitle'] . " - $title";
}
$rssicon = create_full_url(vB_Template_Runtime::fetchStyleVar('imgdir_misc') . '/rss.png');
$headers[] = 'Cache-control: max-age=' . $expires;
$headers[] = 'Expires: ' . gmdate("D, d M Y H:i:s", $expires) . ' GMT';
$headers[] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $lastmodified) . ' GMT';
$headers[] = 'ETag: "' . $cachehash . '"';
$headers[] = 'Content-Type: text/xml' . (vB_Template_Runtime::fetchStyleVar('charset') != '' ? '; charset=' . vB_Template_Runtime::fetchStyleVar('charset') : '');
$output = '<?xml version="1.0" encoding="' . vB_Template_Runtime::fetchStyleVar('charset') . '"?>' . "\r\n\r\n";
# Each specs shared code is entered in full (duplicated) to make it easier to read
switch($vbulletin->GPC['type'])
{
case 'RSS':
require_once(DIR . '/includes/class_xml.php');
$xml = new vB_XML_Builder($vbulletin);
示例9: fetch_seo_url
if ($newpost['visible'] OR can_moderate($foruminfo['forumid'], 'canmoderateposts'))
{
if ($threadview < $threadinfo['lastpost'])
{
$vbulletin->url = fetch_seo_url('thread', $threadinfo, array('p' => $newpost['postid'], 'posted' => 1)) . "#post$newpost[postid]";
}
else
{
$vbulletin->url = fetch_seo_url('thread', $threadinfo, array('p' => $newpost['postid'])) . "#post$newpost[postid]";
}
// if post is not moderated, attempt to publish this new reply to user's Facebook feed
if ($newpost['visible'] AND is_facebookenabled())
{
$fblink = str_ireplace('&', '&', $vbulletin->url);
publishtofacebook_newreply($threadinfo['title'], $newpost['message'], create_full_url($fblink));
}
($hook = vBulletinHook::fetch_hook('newreply_post_complete')) ? eval($hook) : false;
eval(print_standard_redirect('redirect_postthanks', true, $forceredirect));
}
else
{
$vbulletin->url = fetch_seo_url('forum', $foruminfo);
($hook = vBulletinHook::fetch_hook('newreply_post_complete')) ? eval($hook) : false;
eval(print_standard_redirect('redirect_postthanks_moderate', true, true));
}
}
} // end if
}
示例10: datamanager_init
// init user data manager
$displaygroupid = ($user['displaygroupid'] > 0 and $user['displaygroupid'] != $user['usergroupid']) ? $user['displaygroupid'] : 2;
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_CP);
$userdata->set_existing($user);
$userdata->set('usergroupid', 2);
$userdata->set_usertitle($user['customtitle'] ? $user['usertitle'] : '', false, $vbulletin->usergroupcache["{$displaygroupid}"], $vbulletin->usergroupcache['2']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle'] ? true : false, false);
$userdata->save();
if ($vbulletin->GPC['send_validated']) {
if (!isset($evalemail_validated["{$user['languageid']}"])) {
//note that we pass the "all languages" flag as true all the time because if the function does
//caching internally and is not smart enough to check if the language requested the second time
//was cached on the first pass -- so we make sure that we load and cache all language version
//in case the second user has a different language from the first
$text_message = fetch_phrase('moderation_validated', 'emailbody', '', true, true, $chosenlanguage, true);
$text_subject = fetch_phrase('moderation_validated', 'emailsubject', '', true, true, $chosenlanguage);
$text_message = construct_phrase($text_message, create_full_url(fetch_seo_url('forumhome|nosession', array()), true));
$evalemail_validated["{$user['languageid']}"] = '
$message = "' . $text_message . '";
$subject = "' . $text_subject . '";
';
}
eval($evalemail_validated["{$user['languageid']}"]);
vbmail($user['email'], $subject, $message, true);
}
if ($vbulletin->options['welcomepm'] and $fromuser and !$user['posts']) {
if (!isset($evalpm_validated["{$user['languageid']}"])) {
//note that we pass the "all languages" flag as true all the time because if the function does
//caching internally and is not smart enough to check if the language requested the second time
//was cached on the first pass -- so we make sure that we load and cache all language version
//in case the second user has a different language from the first
$text_message = fetch_phrase('welcomepm', 'emailbody', '', true, true, $chosenlanguage);
示例11: parse_wysiwyg_anchor
function parse_wysiwyg_anchor($aoptions, $text)
{
$href = parse_wysiwyg_tag_attribute('href=', $aoptions);
if (!trim($href)) {
return parse_wysiwyg_recurse('a', $text, 'parse_wysiwyg_anchor');
}
if (substr($href, 0, 7) == 'mailto:') {
$tag = 'email';
$href = substr($href, 7);
} else {
$tag = 'url';
if (!preg_match('#^[a-z0-9]+:#i', $href)) {
// relative URL, prefix it with the URL to this board
$href = create_full_url($href);
}
}
$tag = strtoupper($tag);
return "[{$tag}=\"{$href}\"]" . parse_wysiwyg_recurse('a', $text, 'parse_wysiwyg_anchor') . "[/{$tag}]";
}
示例12: parse_tag_a
/**
* Parses an <a> tag. Matches URL and EMAIL BB code.
*
* @param string String containing tag attributes
* @param string Text within tag
* @param string Name of HTML tag. Used if one function parses multiple tags
* @param mixed Extra arguments passed in to parsing call or tag rules
*/
protected function parse_tag_a($aoptions, $text, $tag_name, $args)
{
$href = $this->parse_wysiwyg_tag_attribute('href=', $aoptions);
if (!trim($href))
{
return $this->parse_tag_by_name('a', $text);
}
if (substr($href, 0, 7) == 'mailto:')
{
$tag = 'email';
$href = substr($href, 7);
}
else
{
$tag = 'url';
if (!preg_match('#^[a-z0-9]+:#i', $href))
{
// relative URL, prefix it with the URL to this board
$href = create_full_url($href);
}
}
$tag = strtoupper($tag);
if ($this->is_bbcode_tag_allowed($tag))
{
return "[$tag=\"$href\"]" . $this->parse_tag_by_name('a', $text) . "[/$tag]";
}
else
{
// can't auto link, return a plaintext version
$inner_text = $this->parse_tag_by_name('a', $text);
if ($inner_text != $href)
{
return "$inner_text ($href)";
}
else
{
return $href;
}
}
}
示例13: standard_error
}
if ($group['membertype'] != 'member' and !can_moderate(0, 'caneditgrouppicture')) {
if ($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canjoingroups'] and can_join_group($group)) {
standard_error(fetch_error('must_be_group_member_view_add_pictures_join_x', 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'do=join&groupid=' . $group['groupid']));
} else {
standard_error(fetch_error('must_be_group_member_view_add_pictures'));
}
}
$pictureinfo = fetch_socialgroup_picture($vbulletin->GPC['attachmentid'], $group['groupid']);
if (!$pictureinfo) {
standard_error(fetch_error('invalidid', $vbphrase['picture'], $vbulletin->options['contactuslink']));
}
$pictureinfo['adddate'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true);
$pictureinfo['addtime'] = vbdate($vbulletin->options['timeformat'], $pictureinfo['dateline']);
$pictureinfo['caption_html'] = nl2br(fetch_word_wrapped_string(fetch_censored_text($pictureinfo['caption'])));
$pictureurl = create_full_url("attachment.php?attachmentid={$pictureinfo['attachmentid']}");
if (!preg_match('#^[a-z]+://#i', $pictureurl)) {
$pictureurl = $vbulletin->options['bburl'] . "/attachment.php?attachmentid={$pictureinfo['attachmentid']}";
}
$pictureinfo['pictureurl'] = $pictureurl;
$navpictures_sql = $db->query_read_slave("\r\n\t\tSELECT\r\n\t\t\ta.attachmentid\r\n\t\tFROM " . TABLE_PREFIX . "attachment AS a\r\n\t\tINNER JOIN " . TABLE_PREFIX . "socialgroupmember AS socialgroupmember ON\r\n\t\t\t(socialgroupmember.userid = a.userid AND socialgroupmember.groupid = {$group['groupid']} AND socialgroupmember.type = 'member')\r\n\t\tWHERE\r\n\t\t\ta.contentid = {$group['groupid']}\r\n\t\t\t\tAND\r\n\t\t\ta.contenttypeid = {$contenttypeid}\r\n\t\tORDER BY a.dateline DESC\r\n\t");
$pic_location = fetch_picture_location_info($navpictures_sql, $pictureinfo['attachmentid']);
$db->free_result($navpictures_sql);
($hook = vBulletinHook::fetch_hook('group_picture')) ? eval($hook) : false;
$show['edit_picture_option'] = ($pictureinfo['userid'] == $vbulletin->userinfo['userid'] or can_moderate(0, 'caneditgrouppicture'));
$show['remove_picture_option'] = ($pictureinfo['userid'] == $vbulletin->userinfo['userid'] or fetch_socialgroup_modperm('canremovepicture', $group));
$show['reportlink'] = ($vbulletin->userinfo['userid'] and ($vbulletin->options['rpforumid'] or $vbulletin->options['enableemail'] and $vbulletin->options['rpemail']));
if ($vbulletin->options['pc_enabled']) {
require_once DIR . '/includes/functions_picturecomment.php';
$pagenumber = $vbulletin->GPC['pagenumber'];
$perpage = $vbulletin->GPC['perpage'];
示例14: process_display
/**
* Sets up different display variables for the Group Message
*
* @access protected
*/
function process_display()
{
global $show, $vbphrase;
// Simplify moderation for templating
$this->item['picturecount'] = vb_number_format($this->item['visible']);
// Get cover image info
$this->item['coverthumburl'] = $this->item['attachmentid'] ? 'attachment.php?' . $this->registry->session->vars['sessionurl'] . "albumid={$this->item['albumid']}&attachmentid={$this->item['attachmentid']}&thumb=1&d={$this->item['thumbnail_dateline']}" : '';
$this->item['coverdimensions'] = $this->item['thumbnail_width'] ? "width=\"{$this->item[thumbnail_width]}px\" height=\"{$this->item[thumbnail_height]}px\"" : '';
if (defined('VB_API') and VB_API === true) {
if ($this->item['coverthumburl']) {
$this->item['pictureurl'] = create_full_url($this->item['coverthumburl']);
} else {
$this->item['pictureurl'] = '';
}
}
// Display album type
if ('private' == $this->item['state']) {
$show['personalalbum'] = true;
$this->item['albumtype'] = $vbphrase['private_album_paren'];
} else {
if ('profile' == $this->item['state']) {
$show['personalalbum'] = true;
$this->item['albumtype'] = $vbphrase['profile_album_paren'];
} else {
$show['personalalbum'] = false;
}
}
// Show moderation details
if ($this->item['moderation'] and (can_moderate(0, 'canmoderatepictures') or $vbulletin->userinfo['userid'] == $this->item['userid'])) {
$show['moderated'] = true;
$this->item['moderatedcount'] = vb_number_format($this->item['moderation']);
} else {
$show['moderated'] = false;
}
}
示例15: eval
} else {
if ($vbulletin->GPC['message'] == '') {
eval(standard_error(fetch_error('nomessage')));
}
if ($perform_floodcheck) {
require_once DIR . '/includes/class_floodcheck.php';
$floodcheck = new vB_FloodCheck($vbulletin, 'user', 'emailstamp');
$floodcheck->commit_key($vbulletin->userinfo['userid'], TIMENOW, TIMENOW - $vbulletin->options['emailfloodtime']);
if ($floodcheck->is_flooding()) {
eval(standard_error(fetch_error('emailfloodcheck', $vbulletin->options['emailfloodtime'], $floodcheck->flood_wait())));
}
}
($hook = vBulletinHook::fetch_hook('sendmessage_domailmember')) ? eval($hook) : false;
//magic variables for for phrase eval
$message = fetch_censored_text($vbulletin->GPC['message']);
$forumhomelink = create_full_url(fetch_seo_url('forumhome|nosession', array()), true);
eval(fetch_email_phrases('usermessage', $userinfo['languageid']));
//note that $message is set via the run via eval from fetch_email_phrases.
vbmail($userinfo['email'], fetch_censored_text($vbulletin->GPC['emailsubject']), $message, false, $vbulletin->userinfo['email'], '', $vbulletin->userinfo['username']);
// parse this next line with eval:
$sendtoname = $userinfo['username'];
print_standard_redirect(array('redirect_sentemail', $sendtoname));
}
}
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 58373 $
|| ####################################################################
\*======================================================================*/