• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vB_Template_Runtime类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vB_Template_Runtime的典型用法代码示例。如果您正苦于以下问题:PHP vB_Template_Runtime类的具体用法?PHP vB_Template_Runtime怎么用?PHP vB_Template_Runtime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了vB_Template_Runtime类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: print_statistic_result

function print_statistic_result($date, $bar, $value, $width)
{
    global $vbulletin;
    $bgclass = fetch_row_bgclass();
    $style = 'width:' . $width . '%; ' . 'height:' . vB_Template_Runtime::fetchStyleVar('pollbar_height') . '; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('pollbar_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('pollbar' . $bar . '_background') . '; ';
    echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n";
    echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '">&nbsp;</div></td>' . "\n";
    echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n";
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:9,代码来源:adminfunctions_stats.php


示例2: print_statistic_result

function print_statistic_result($date, $bar, $value, $width)
{
    global $vbulletin;
    $bgclass = fetch_row_bgclass();
    $style = 'width:' . $width . '%; ' . 'height: 23px; ' . 'border:' . vB_Template_Runtime::fetchStyleVar('poll_result_border') . '; ' . 'background:' . vB_Template_Runtime::fetchStyleVar('poll_result_color_' . str_pad(strval(intval($bar)), 2, '0', STR_PAD_LEFT)) . '; ';
    echo '<tr><td width="0" class="' . $bgclass . '">' . $date . "</td>\n";
    echo '<td width="100%" class="' . $bgclass . '" nowrap="nowrap"><div style="' . $style . '">&nbsp;</div></td>' . "\n";
    echo '<td width="0%" class="' . $bgclass . '" nowrap="nowrap">' . $value . "</td></tr>\n";
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:9,代码来源:adminfunctions_stats.php


示例3: show_inline_mod_login

/**
* Shows the form for inline mod authentication.
*/
function show_inline_mod_login($showerror = false)
{
    global $vbulletin, $vbphrase, $show;
    $show['inlinemod_form'] = true;
    $show['passworderror'] = $showerror;
    if (!$showerror) {
        $vbulletin->url = SCRIPTPATH;
    }
    $forumHome = vB_Library::instance('content_channel')->getForumHomeChannel();
    eval(standard_error(fetch_error('nopermission_loggedin', $vbulletin->userinfo['username'], vB_Template_Runtime::fetchStyleVar('right'), vB::getCurrentSession()->get('sessionurl'), $vbulletin->userinfo['securitytoken'], vB5_Route::buildUrl($forumHome['routeid'] . 'home|fullurl'))));
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:14,代码来源:modfunctions.php


示例4: str

function str($str, $amp = false)
{
    global $vbulletin;
    if ($amp) {
        $str = str_replace('&amp;', '&', $str);
    }
    $charset = vB_Template_Runtime::fetchStyleVar('charset');
    if ($charset == '') {
        $charset = 'ISO-8859-1';
    }
    return to_utf8($str, $charset);
}
开发者ID:reima,项目名称:restful-vb,代码行数:12,代码来源:functions.php


示例5: output

 public function output()
 {
     global $vbulletin, $db;
     // Smilies
     $result = $db->query_read_slave("\n\t\t\tSELECT smilietext AS text, smiliepath AS path, smilie.title, smilieid,\n\t\t\t\timagecategory.title AS category\n\t\t\tFROM " . TABLE_PREFIX . "smilie AS smilie\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)\n\t\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t\t");
     $categories = array();
     while ($smilie = $db->fetch_array($result)) {
         $categories[$smilie['category']][] = $smilie;
     }
     $data = array('bburl' => $vbulletin->options['bburl'], 'smilies' => $categories, 'logo' => vB_Template_Runtime::fetchStyleVar('titleimage'), 'colors' => array('titletext' => vB_Template_Runtime::fetchStyleVar('navbar_tab_color'), 'primarytext' => vB_Template_Runtime::fetchStyleVar('link_color'), 'secondarytext' => vB_Template_Runtime::fetchStyleVar('forumbits_text_color'), 'bodytext' => vB_Template_Runtime::fetchStyleVar('postbit_color'), 'highlighttext' => vB_Template_Runtime::fetchStyleVar('body_color'), 'background' => vB_Template_Runtime::fetchStyleVar('forumhead_background.backgroundColor'), 'foreground' => vB_Template_Runtime::fetchStyleVar('forumrow_background.backgroundColor'), 'buttoncolor' => vB_Template_Runtime::fetchStyleVar('control_background.backgroundColor'), 'highlightcolor' => vB_Template_Runtime::fetchStyleVar('notices_background.backgroundColor')));
     return $data;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:12,代码来源:api_mobilepublisher.php


示例6: vB_XML_Builder

 function vB_XML_Builder($content_type = null, $charset = null)
 {
     if ($content_type) {
         $this->content_type = $content_type;
     }
     if ($charset == null) {
         $userinfo = vB_User::fetchUserinfo();
         $charset = !empty($userinfo['lang_charset']) ? $userinfo['lang_charset'] : vB_Template_Runtime::fetchStyleVar('charset');
         if (empty($charset)) {
             $charset = 'utf-8';
         }
     }
     $this->charset = strtolower($charset) == 'iso-8859-1' ? 'windows-1252' : $charset;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:14,代码来源:builder.php


示例7: processed_output

 public function processed_output()
 {
     $output = $this->output();
     if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) {
         global $vbulletin;
         $charset = $vbulletin->userinfo['lang_charset'];
     }
     $lower_charset = strtolower($charset);
     if ($lower_charset != 'utf-8') {
         // Browsers tend to interpret character set iso-8859-1 as windows-1252
         if ($lower_charset == 'iso-8859-1') {
             $lower_charset = 'windows-1252';
         }
         $this->processregistered($output, $lower_charset);
     }
     return $output;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:17,代码来源:class_api.php


示例8: file_download

function file_download($filestring, $filename, $filetype = 'application/octet-stream')
{
    if (!isset($isIE)) {
        static $isIE;
        $isIE = iif(is_browser('ie') or is_browser('opera'), true, false);
    }
    if ($isIE and $filetype == 'application/octet-stream') {
        $filetype = 'application/octetstream';
    }
    if (preg_match('~&#([0-9]+);~', $filename)) {
        if (function_exists('iconv')) {
            $filename = @iconv(vB_Template_Runtime::fetchStyleVar('charset'), 'UTF-8//IGNORE', $filename);
        }
        $filename = preg_replace_callback('~&#([0-9]+);~', 'convert_int_to_utf8_callback', $filename);
        $filename_charset = 'utf-8';
    } else {
        $filename_charset = vB_Template_Runtime::fetchStyleVar('charset');
    }
    $filename = preg_replace('#[\\r\\n]#', '', $filename);
    // Opera and IE have not a clue about this, mozilla puts on incorrect extensions.
    if (is_browser('mozilla')) {
        $filename = "filename*=" . $filename_charset . "''" . rawurlencode($filename);
    } else {
        // other browsers seem to want names in UTF-8
        if ($filename_charset != 'utf-8' and function_exists('iconv')) {
            $filename = @iconv($filename_charset, 'UTF-8//IGNORE', $filename);
        }
        // Should just make this (!is_browser('ie'))
        if (is_browser('opera') or is_browser('konqueror') or is_browser('safari')) {
            // Opera / konqueror does not support encoded file names
            $filename = 'filename="' . str_replace('"', '', $filename) . '"';
        } else {
            // encode the filename to stay within spec
            $filename = 'filename="' . rawurlencode($filename) . '"';
        }
    }
    header('Content-Type: ' . $filetype);
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Disposition: attachment; ' . $filename);
    header('Content-Length: ' . strlen($filestring));
    header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    echo $filestring;
    exit;
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:45,代码来源:functions_file.php


示例9: construct_nav_group

function construct_nav_group($title, $nav_file = 'vbulletin')
{
    // creates a <select> or <table> for the left panel of index.php
    // (depending on value of $cpnavjs)
    global $_NAV, $_NAVPREFS, $vbulletin, $vbphrase, $options, $groupid;
    static $localphrase, $navlinks;
    if (VB_AREA == 'AdminCP') {
        if (!isset($groupid)) {
            $groupid = array();
            $navlinks = implode(',', $_NAVPREFS);
            $localphrase = array('expand_group' => $vbphrase['expand_group'], 'collapse_group' => $vbphrase['collapse_group']);
        }
        if (!isset($groupid["{$nav_file}"])) {
            $groupid["{$nav_file}"] = 0;
        }
        if (in_array("{$nav_file}_" . $groupid["{$nav_file}"], $_NAVPREFS)) {
            $dowhat = 'collapse';
            $style = '';
            $tooltip = $localphrase['collapse_group'];
        } else {
            $dowhat = 'expand';
            $style = 'display:none';
            $tooltip = $localphrase['expand_group'];
        }
        $_NAV .= "\n\t<a name=\"grp{$nav_file}_{$groupid[$nav_file]}\"></a>\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"navtitle\" ondblclick=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); return false;\">\n\t\t<tr>\n\t\t\t<td><strong>{$title}</strong></td>\n\t\t\t<td align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\n\t\t\t\t<a href=\"index.php?" . $vbulletin->session->vars['sessionurl'] . "do=buildnavprefs&amp;nojs=" . $vbulletin->GPC['nojs'] . "&amp;prefs={$navlinks}&amp;dowhat={$dowhat}&amp;id={$nav_file}_{$groupid[$nav_file]}#grp{$nav_file}_{$groupid[$nav_file]}\" target=\"_self\"\n\t\t\t\t\tonclick=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); return false;\"\n\t\t\t\t\toncontextmenu=\"toggle_group('{$nav_file}_{$groupid[$nav_file]}'); save_group_prefs('{$nav_file}_{$groupid[$nav_file]}'); return false\"\n\t\t\t\t><img src=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/cp_{$dowhat}.gif\" title=\"{$tooltip}\" id=\"button_{$nav_file}_{$groupid[$nav_file]}\" alt=\"+\" border=\"0\" /></a>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>";
        $_NAV .= "\n\t\t<div id=\"group_{$nav_file}_{$groupid[$nav_file]}\" class=\"navgroup\" style=\"{$style}\">\n";
    } else {
        $_NAV .= "\n\t\n\t\t<div class=\"navtitle\">{$title}</div>\n\t\t<div class=\"navgroup\">\n";
    }
    foreach ($options as $link) {
        $_NAV .= $link;
    }
    $_NAV .= "\t\t</div>\n";
    $options = array();
    ++$groupid[$nav_file];
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:36,代码来源:adminfunctions_navpanel.php


示例10: getCharset

 /**
  * Fetches the charset being used by the templater.
  *
  * @return string
  */
 public function getCharset()
 {
     $charset = $this->charset;
     if ($charset == null) {
         if (!($charset = vB_Template_Runtime::fetchStyleVar('charset'))) {
             $charset = vB::$vbulletin->userinfo['lang_charset'];
         }
     }
     return $charset;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:15,代码来源:templater.php


示例11: preg_replace

            $options['productdisable'] = $vbphrase['disable'];
        } else {
            $options['productenable'] = $vbphrase['enable'];
        }
        $options['productexport'] = $vbphrase['export'];
        $options['productdelete'] = $vbphrase['uninstall'];
        $safeid = preg_replace('#[^a-z0-9_]#', '', $product['productid']);
        if (file_exists(DIR . '/includes/version_' . $safeid . '.php')) {
            include_once DIR . '/includes/version_' . $safeid . '.php';
        }
        $define_name = 'FILE_VERSION_' . strtoupper($safeid);
        if (defined($define_name) and constant($define_name) !== '') {
            $product['version'] = constant($define_name);
        }
        $i++;
        print_cells_row(array($title, htmlspecialchars_uni($product['version']), htmlspecialchars_uni($product['description']), "<div align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\r\n\t\t\t\t<select name=\"s{$product['productid']}\" id=\"prodsel{$i}\" onchange=\"js_page_jump({$i}, '{$product['productid']}')\" class=\"bginput\">\r\n\t\t\t\t\t" . construct_select_options($options) . "\r\n\t\t\t\t</select>&nbsp;<input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_page_jump({$i}, '{$product['productid']}');\" />\r\n\t\t\t</div>"), false, '', -2);
    }
    print_table_footer();
    echo '<p align="center">' . construct_link_code($vbphrase['add_import_product'], "plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=productadd") . '</p>';
}
// #############################################################################
if ($_REQUEST['do'] == 'productversioncheck') {
    $vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR));
    $product = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "product\r\n\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t");
    if (!$product or empty($product['versioncheckurl'])) {
        print_stop_message('invalid_product_specified');
    }
    $version_url = @parse_url($product['versioncheckurl']);
    if (!$version_url) {
        print_stop_message('invalid_version_check_url_specified');
    }
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:plugin.php


示例12: docompare3_print_control_form

	function docompare3_print_control_form($inline, $wrap)
	{
		global $vbphrase, $vbulletin;

		$editlink = '?do=edit&amp;templateid=' . $vbulletin->GPC['templateid'] .
			'&amp;group=&amp;searchstring=&amp;expandset=5&amp;showmerge=1';

		print_form_header('template', 'docompare3', false, true, 'cpform', '90%', '', false);
		construct_hidden_code('templateid', $vbulletin->GPC['templateid']);
		construct_hidden_code('wrap', $wrap);
		construct_hidden_code('inline', $inline);

		print_table_header($vbphrase['display_options']);
		print_table_footer(2,
			'<div style="float:' . vB_Template_Runtime::fetchStyleVar('right') . '"><a href="' . $editlink . '" style="font-weight: bold">' . $vbphrase['merge_edit_link'] . '</a></div>
			<div align="' . vB_Template_Runtime::fetchStyleVar('left') . '"><input type="submit" name="switch_inline" class="submit" value="' . ($inline ? $vbphrase['view_side_by_side'] : $vbphrase['view_inline']) . '" accesskey="r" />
			<input type="submit" name="switch_wrapping" class="submit" value="' . ($wrap ? $vbphrase['disable_wrapping'] : $vbphrase['enable_wrapping']) . '" accesskey="s" /></div>'
		);
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:19,代码来源:template.php


示例13: array

 if ($vbulletin->userinfo['userid'] > 0) {
     $pollvotes = $db->query_read_slave("\n\t\t\tSELECT voteoption\n\t\t\tFROM " . TABLE_PREFIX . "pollvote\n\t\t\tWHERE userid = " . $vbulletin->userinfo['userid'] . " AND pollid = {$pollid}\n\t\t");
     if ($db->num_rows($pollvotes) > 0) {
         $uservoted = 1;
     }
 }
 if ($showresults or $uservoted) {
     if ($uservoted) {
         $uservote = array();
         while ($pollvote = $db->fetch_array($pollvotes)) {
             $uservote["{$pollvote['voteoption']}"] = 1;
         }
     }
 }
 $left = vB_Template_Runtime::fetchStyleVar('left');
 $right = vB_Template_Runtime::fetchStyleVar('right');
 $option['open'] = $left[0];
 $option['close'] = $right[0];
 foreach ($splitvotes as $index => $value) {
     $arrayindex = $index + 1;
     $option['uservote'] = iif($uservote["{$arrayindex}"], true, false);
     $option['question'] = $bbcode_parser->parse($splitoptions["{$index}"], $forum['forumid'], true);
     // public link
     if ($pollinfo['public'] and $value) {
         $option['votes'] = '<a href="' . fetch_seo_url('poll', $pollinfo, array('do' => 'showresults')) . '">' . vb_number_format($value) . '</a>';
     } else {
         $option['votes'] = vb_number_format($value);
         //get the vote count for the option
     }
     $option['number'] = $counter;
     //number of the option
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php


示例14: foreach

    foreach ($result as $permission) {
        $npermscache[$permission['nodeid']][$permission['groupid']] = $permission;
    }
    // get usergroup default permissions
    $permissions = array();
    $usergroupcache = vB::getDatastore()->getValue('usergroupcache');
    foreach ($usergroupcache as $usergroupid => $usergroup) {
        $permissions["{$usergroupid}"] = $usergroup['forumpermissions'];
    }
    //build_channel_permissions();
    ?>
<center>
<div class="tborder" style="width: 100%">
<div class="alt1" style="padding: 8px">
<div class="darkbg" style="padding: 4px; border: 2px inset; text-align: <?php 
    echo vB_Template_Runtime::fetchStyleVar('left');
    ?>
">
<?php 
    // run the display function
    if ($vbulletin->options['cp_collapse_forums']) {
        ?>
	<script type="text/javascript">
	<!--
	function js_forum_jump(nodeid)
	{
		if (forumid > 0)
		{
			window.location = 'forumpermission.php?do=modify&n=' + nodeid;
		}
	}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:forumpermission.php


示例15: fetch_socialgroupicon_url

/**
 * Prepares the appropriate url for a group icon.
 * The url is based on whether fileavatars are in use, and whether a thumb is required.
 *
 * @param array mixed $groupinfo				- GroupInfo array of the group to fetch the icon for
 * @param boolean $thumb						- Whether to return a thumb url
 * @param boolean $path							- Whether to fetch the path or the url
 * @param boolean $force_file					- Always get the file path as if it existed
 */
function fetch_socialgroupicon_url($groupinfo, $thumb = false, $path = false, $force_file = false)
{
    global $vbulletin;
    $iconurl = false;
    if ($vbulletin->options['sg_enablesocialgroupicons']) {
        if (!$groupinfo['icondateline']) {
            return vB_Template_Runtime::fetchStyleVar('unknownsgicon');
        }
        if ($vbulletin->options['usefilegroupicon'] or $force_file) {
            $iconurl = ($path ? $vbulletin->options['groupiconpath'] : $vbulletin->options['groupiconurl']) . ($thumb ? '/thumbs' : '') . '/socialgroupicon' . '_' . $groupinfo['groupid'] . '_' . $groupinfo['icondateline'] . '.gif';
        } else {
            $iconurl = 'image.php?' . vB::getCurrentSession()->get('sessionurl') . 'groupid=' . $groupinfo['groupid'] . '&amp;dateline=' . $groupinfo['icondateline'] . ($thumb ? '&amp;type=groupthumb' : '');
        }
    }
    return $iconurl;
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:25,代码来源:functions_socialgroup.php


示例16: vB_XML_Builder

 function vB_XML_Builder(&$registry, $content_type = null, $charset = null)
 {
     if (is_object($registry)) {
         $this->registry =& $registry;
     } else {
         trigger_error("vB_XML_Builder::Registry object is not an object", E_USER_ERROR);
     }
     if ($content_type) {
         $this->content_type = $content_type;
     }
     if ($charset == null) {
         $charset = $this->registry->userinfo['lang_charset'] ? $this->registry->userinfo['lang_charset'] : vB_Template_Runtime::fetchStyleVar('charset');
     }
     $this->charset = strtolower($charset) == 'iso-8859-1' ? 'windows-1252' : $charset;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:15,代码来源:class_xml.php


示例17: 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 {
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:attach.php


示例18: tagcp_format_tag_entry

function tagcp_format_tag_entry($tag, $synonyms_in_list)
{
	global $vbulletin;

	$tagdm = datamanager_init('tag', $vbulletin, ERRTYPE_ARRAY);
	$tagdm->set_existing($tag);

	if (!$synonyms_in_list)
	{
		$label = $tag['tagtext'];

		$synonyms = $tagdm->fetch_synonyms();
		if (count($synonyms))
		{
			$list_id = 'synlist_' . $tag['tagid'];
			$synonym_list = '<span class="cbsubgroup-trigger" onclick="return js_show_synlist(this, \'' . $list_id . '\')">' .
			'<img src="../cpstyles/' . $vbulletin->options['cpstylefolder']  . '/collapse_generic_collapsed.gif" />'.
			'</span>';

			$synonym_list .= '<ul class="cbsubgroup" id="' . $list_id . '" style="display:none">';
			foreach ($synonyms as $synonym)
			{
				$synonym_list .= '<li>' .
					format_tag_list_item($synonym->fetch_field('tagid'), $synonym->fetch_field('tagtext')) .
				'</li>';
			}
			$synonym_list .= '</ul>';
		}
	}
	else
	{
	 	$canonical = $tagdm->fetch_canonical_tag();
		if ($canonical)
		{
			$label = '<i>' . $tag['tagtext'] . '</i> (' . $canonical->fetch_field('tagtext') . ')';
		}
		else
		{
			$label = $tag['tagtext'];
		}


		$synonym_list = '';
	}

	$tag_item_text = format_tag_list_item($tag['tagid'], $label);

	return '<div id="tag' . $tag['tagid'] . '" class="alt1" style="float:' .
		vB_Template_Runtime::fetchStyleVar('left') . ';clear:' . vB_Template_Runtime::fetchStyleVar('left') . '">' . "\n" .
		$tag_item_text . "\n" . $synonym_list . "\n" .
	'</div>';
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:52,代码来源:tag.php


示例19: fetch_touser_string

             $pm['touser'] = fetch_touser_string($pm);
             $pm['folder'] = $foldernames["{$pm['folder']}"];
             $pm['message'] = preg_replace("/(\r\n|\r|\n)/s", "\r\n", $pm['message']);
             $pm['message'] = fetch_censored_text($pm['message']);
             unset($pm['folder']);
             ($hook = vBulletinHook::fetch_hook('private_downloadpm_bit')) ? eval($hook) : false;
             $xml->add_group('privatemessage');
             foreach ($pm as $key => $val) {
                 $xml->add_tag($key, $val);
             }
             $xml->close_group();
         }
         $xml->close_group();
     }
     $xml->close_group();
     $doc = "<?xml version=\"1.0\" encoding=\"" . vB_Template_Runtime::fetchStyleVar('charset') . "\"?>\r\n\r\n";
     $doc .= "<!-- " . $vbulletin->options['bbtitle'] . ';' . $vbulletin->options['bburl'] . " -->\r\n";
     // replace --/---/... with underscores for valid XML comments
     $doc .= '<!-- ' . construct_phrase($vbphrase['private_message_dump_for_user_x_y'], preg_replace('#(-(?=-)|(?<=-)-)#', '_', $vbulletin->userinfo['username']), vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], TIMENOW)) . " -->\r\n\r\n";
     $doc .= $xml->output();
     $xml = null;
     // download the file
     file_download($doc, str_replace(array('\\', '/'), '-', "{$vbphrase['dump_privatemessages']}-" . $vbulletin->userinfo['username'] . "-" . vbdate($vbulletin->options['dateformat'], TIMENOW) . '.xml'), 'text/xml');
     break;
     // *****************************
     // download as CSV
 // *****************************
 // download as CSV
 case 'csv':
     // column headers
     $csv = "{$vbphrase['date']},{$vbphrase['folder']},{$vbphrase['title']},{$vbphrase['dump_from']},{$vbphrase['dump_to']},{$vbphrase['message']}\r\n";
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:private.php


示例20: fetch_iconinfo

function fetch_iconinfo($iconid = 0)
{
    global $vbulletin, $vbphrase, $vbulletin;
    $iconid = intval($iconid);
    switch ($iconid) {
        case -1:
            DEVDEBUG('returning poll icon');
            return array('iconpath' => vB_Template_Runtime::fetchStyleVar('imgdir_misc') . "/poll_posticon.gif", 'title' => $vbphrase['poll']);
        case 0:
            if (!empty($vbulletin->options['showdeficon'])) {
                DEVDEBUG("returning default icon");
                return array('iconpath' => $vbulletin->options['showdeficon'], 'title' => '');
            } else {
                return false;
            }
        default:
            if ($vbulletin->iconcache !== null) {
                // we can get the icon info from the template cache
                DEVDEBUG("returning iconid:{$iconid} from the template cache");
                return $vbulletin->iconcache["{$iconid}"];
            } else {
                // we have to get the icon from a query
                DEVDEBUG("QUERYING iconid:{$iconid})");
                return $vbulletin->db->query_first_slave("\n\t\t\t\t\tSELECT title, iconpath\n\t\t\t\t\tFROM " . TABLE_PREFIX . "icon\n\t\t\t\t\tWHERE iconid = {$iconid}\n\t\t\t\t");
            }
    }
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:functions_forumlist.php



注:本文中的vB_Template_Runtime类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vB_Types类代码示例发布时间:2022-05-23
下一篇:
PHP vB_Template类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap