当前位置: 首页>>代码示例>>PHP>>正文


PHP fetch_template函数代码示例

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


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

示例1: output_token

 /**
  * Returns the HTML to be displayed to the user for Human Verification
  *
  * @param	string	Passed to template
  *
  * @return 	string	HTML to output
  *
  */
 function output_token($var_prefix = 'humanverify')
 {
     global $vbphrase, $stylevar, $show;
     $vbulletin =& $this->registry;
     $humanverify = $this->generate_token();
     eval('$output = "' . fetch_template('humanverify_image') . '";');
     return $output;
 }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:16,代码来源:class_humanverify_image.php

示例2: output_token

 /**
  * Returns the HTML to be displayed to the user for Human Verification
  *
  * @param	string	Passed to template
  *
  * @return 	string	HTML to output
  *
  */
 function output_token($var_prefix = 'humanverify')
 {
     global $vbphrase, $stylevar, $show;
     $vbulletin =& $this->registry;
     $humanverify = $this->generate_token();
     require_once DIR . '/includes/functions_misc.php';
     $humanverify['question'] = fetch_phrase('question' . $humanverify['answer'], 'hvquestion', '', false, true, $this->registry->userinfo['languageid'], false);
     eval('$output = "' . fetch_template('humanverify_question') . '";');
     return $output;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:class_humanverify_question.php

示例3: generate_form_html

 /**
  * Generates HTML for the subscription form page
  *
  * @param	string		Hash used to indicate the transaction within vBulletin
  * @param	string		The cost of this payment
  * @param	string		The currency of this payment
  * @param	array		Information regarding the subscription that is being purchased
  * @param	array		Information about the user who is purchasing this subscription
  * @param	array		Array containing specific data about the cost and time for the specific subscription period
  *
  * @return	array		Compiled form information
  */
 function generate_form_html($hash, $cost, $currency, $subinfo, $userinfo, $timeinfo)
 {
     global $vbphrase, $vbulletin, $stylevar, $show;
     $form['action'] = 'https://bill.ccbill.com/jpost/signup.cgi';
     $form['method'] = 'post';
     // load settings into array so the template system can access them
     $settings =& $this->settings;
     $settings['email'] = htmlspecialchars_uni($this->registry->userinfo['email']);
     $subinfo['ccbillsubid'] = $timeinfo['ccbillsubid'];
     eval('$form[\'hiddenfields\'] .= "' . fetch_template('subscription_payment_ccbill') . '";');
     return $form;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:24,代码来源:class_ccbill.php

示例4: build_history_bit

/**
* Builds the history bit for a selected history point
*
* @param	array	Array of information for this histoy point
* @param	object	BB code parser
*
* @return	string	History bit HTML
*/
function build_history_bit($history, &$bbcode)
{
    global $vbulletin, $vbphrase, $show, $stylevar;
    $history['editdate'] = vbdate($vbulletin->options['dateformat'], $history['dateline'], true);
    $history['edittime'] = vbdate($vbulletin->options['timeformat'], $history['dateline']);
    $history['message'] = $bbcode->parse($history['pagetext'], 'pt');
    if ($history['reason'] === '') {
        $history['reason'] = $vbphrase['n_a'];
    }
    ($hook = vBulletinHook::fetch_hook('project_historybit')) ? eval($hook) : false;
    eval('$edit_history = "' . fetch_template('pt_historybit') . '";');
    return $edit_history;
}
开发者ID:holandacz,项目名称:nb4,代码行数:21,代码来源:functions_pt_notehistory.php

示例5: print_users

function print_users($usergroupid, $userarray)
{
    global $bgclass, $vbphrase;
    $out = '';
    uksort($userarray, 'strnatcasecmp');
    // alphabetically sort usernames
    foreach ($userarray as $user) {
        exec_switch_bg();
        $user = process_showgroups_userinfo($user);
        eval('$out .= "' . fetch_template('showgroups_adminbit') . '";');
    }
    return $out;
}
开发者ID:holandacz,项目名称:nb4,代码行数:13,代码来源:showgroups.php

示例6: doAction

 function doAction($action)
 {
     global $kbank, $vbulletin, $bbuserinfo, $permissions, $KBANK_HOOK_NAME;
     if ($action == 'enable') {
         $item = $this->data;
         eval('$tmp = "' . fetch_template('kbank_template_announce_enable') . '";');
         eval(standard_error($tmp));
     }
     if ($action == 'do_enable') {
         if ($this->ready2Enable()) {
             $vbulletin->input->clean_array_gpc('r', array('url' => TYPE_NOHTML, 'text' => TYPE_NOHTML));
             if (strlen($vbulletin->GPC['text']) > $this->itemtypedata['options']['text_max']) {
                 $vbulletin->GPC['text'] = substr($vbulletin->GPC['text'], 0, $this->itemtypedata['options']['text_max']) . '..';
             }
             $url_cutoff = array('javascript:', 'ftp://');
             $vbulletin->GPC['url'] = str_replace($url_cutoff, '', $vbulletin->GPC['url']);
             if (substr($vbulletin->GPC['url'], 0, 7) != 'http://') {
                 $vbulletin->GPC['url'] = 'http://' . $vbulletin->GPC['url'];
             }
             $item_new = array('status' => KBANK_ITEM_ENABLED, 'expire_time' => iif(!$this->data['options']['enabled'], iif($this->data['options']['duration'] > 0, TIMENOW + $this->data['options']['duration'] * 24 * 60 * 60, -1), $this->data['expire_time']), 'options' => serialize(array('url' => $vbulletin->GPC['url'], 'text' => $vbulletin->GPC['text'], 'enabled' => 1)));
             $vbulletin->db->query_write(fetch_query_sql($item_new, 'kbank_items', "WHERE itemid = {$this->data['itemid']}"));
             //Update datastore
             updateAnnounceCache();
         }
     }
     if ($this->data['status'] == KBANK_ITEM_ENABLED and ($action == 'sell' or $action == 'gift')) {
         //Update datastore
         updateAnnounceCache();
     }
     if ($action == 'disable') {
         if ($this->ready2Disable()) {
             $item_new = array('status' => KBANK_ITEM_AVAILABLE);
             $vbulletin->db->query_write(fetch_query_sql($item_new, 'kbank_items', "WHERE itemid = {$this->data[itemid]}"));
             //Update datastore
             updateAnnounceCache();
         }
     }
     if ($action == 'work_real' && $KBANK_HOOK_NAME == KBANK_GLOBAL_START) {
         global $kbank_announces;
         $kbank_announces[] = array('url' => $this->data['options']['url'], 'text' => $vbulletin->kbankBBCodeParser->parse_bbcode($this->data['options']['text'], true), 'owner' => getUsername($this->data));
     }
     return parent::doAction($action);
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:43,代码来源:announce.kbank.php

示例7: construct_faq_item

function construct_faq_item($faq, $find = '')
{
    global $vbulletin, $stylevar, $ifaqcache, $faqbits, $faqlinks, $show, $vbphrase;
    $faq['text'] = trim($faq['text']);
    if (is_array($find) and !empty($find)) {
        $faq['title'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "process_highlight_faq('\\2', \$find, '\\1', '<u>\\\\1</u>')", $faq['title']);
        $faq['text'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "process_highlight_faq('\\2', \$find, '\\1', '<span class=\"highlight\">\\\\1</span>')", $faq['text']);
    }
    $faqsublinks = '';
    if (is_array($ifaqcache["{$faq['faqname']}"])) {
        foreach ($ifaqcache["{$faq['faqname']}"] as $subfaq) {
            if ($subfaq['displayorder'] > 0) {
                eval('$faqsublinks .= "' . fetch_template('faqbit_link') . '";');
            }
        }
    }
    $show['faqsublinks'] = iif($faqsublinks, true, false);
    $show['faqtext'] = iif($faq['text'], true, false);
    ($hook = vBulletinHook::fetch_hook('faq_item_display')) ? eval($hook) : false;
    eval('$faqbits .= "' . fetch_template('faqbit') . '";');
}
开发者ID:holandacz,项目名称:nb4,代码行数:21,代码来源:functions_faq.php

示例8: process_new_subscribed_issues

/**
* Shows the new subscribed PT issues in the user CP
*
* @return	string	Printable issue bits
*/
function process_new_subscribed_issues()
{
    global $vbulletin, $show, $stylevar, $vbphrase, $template_hook, $vbcollapse;
    if (!($vbulletin->userinfo['permissions']['ptpermissions'] & $vbulletin->bf_ugp_ptpermissions['canviewprojecttools'])) {
        return '';
    }
    $perms_query = build_issue_permissions_query($vbulletin->userinfo);
    if (!$perms_query) {
        return '';
    }
    $marking = ($vbulletin->options['threadmarking'] and $vbulletin->userinfo['userid']);
    if ($marking) {
        $issueview_sql = "IF(issueread IS NOT NULL, issueread, " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . ")";
        $issueview_sql2 = "IF(projectread IS NOT NULL, projectread, " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . ")";
    } else {
        $issueview = max(intval(fetch_bbarray_cookie('issue_lastview', $issue['issueid'])), intval(fetch_bbarray_cookie('issue_lastview', $issue['projectid'] . $issue['issuetypeid'])));
        if (!$issueview) {
            $issueview = $vbulletin->userinfo['lastvisit'];
        }
        $issueview_sql = intval($issueview);
        $issueview_sql2 = '';
    }
    build_issue_private_lastpost_sql_all($vbulletin->userinfo, $private_lastpost_join, $private_lastpost_fields);
    $replycount_clause = fetch_private_replycount_clause($vbulletin->userinfo);
    $subscriptions = $vbulletin->db->query_read("\r\n\t\tSELECT issue.*, issuesubscribe.subscribetype,\r\n\t\t\tproject.title_clean\r\n\t\t\t" . ($marking ? ", issueread.readtime AS issueread, projectread.readtime AS projectread" : '') . "\r\n\t\t\t" . ($private_lastpost_fields ? ", {$private_lastpost_fields}" : '') . "\r\n\t\t\t" . ($replycount_clause ? ", {$replycount_clause} AS replycount" : '') . "\r\n\t\tFROM " . TABLE_PREFIX . "pt_issuesubscribe AS issuesubscribe\r\n\t\tINNER JOIN " . TABLE_PREFIX . "pt_issue AS issue ON (issue.issueid = issuesubscribe.issueid)\r\n\t\tINNER JOIN " . TABLE_PREFIX . "pt_project AS project ON (project.projectid = issue.projectid)\r\n\t\t" . ($marking ? "\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pt_issueread AS issueread ON (issueread.issueid = issue.issueid AND issueread.userid = " . $vbulletin->userinfo['userid'] . ")\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pt_projectread as projectread ON (projectread.projectid = issue.projectid AND projectread.userid = " . $vbulletin->userinfo['userid'] . " AND projectread.issuetypeid = issue.issuetypeid)\r\n\t\t" : '') . "\r\n\t\t{$private_lastpost_join}\r\n\t\tWHERE issuesubscribe.userid = " . $vbulletin->userinfo['userid'] . "\r\n\t\t\tAND (" . implode(' OR ', $perms_query) . ")\r\n\t\tHAVING lastpost > " . intval(TIMENOW - $vbulletin->options['markinglimit'] * 86400) . "\r\n\t\t\tAND lastpost > " . $issueview_sql . "\r\n\t\t\t" . (!empty($issueview_sql2) ? " AND lastpost > " . $issueview_sql2 : '') . "\r\n\t\tORDER BY lastpost DESC\r\n\t");
    $show['issuebit_project_title'] = true;
    $subscriptionbits = '';
    while ($issue = $vbulletin->db->fetch_array($subscriptions)) {
        $issue = prepare_issue($issue);
        eval('$subscriptionbits .= "' . fetch_template('pt_issuebit') . '";');
    }
    if (!$subscriptionbits) {
        return '';
    }
    eval('$return = "' . fetch_template('pt_usercp_subscriptions') . '";');
    return $return;
}
开发者ID:holandacz,项目名称:nb4,代码行数:42,代码来源:functions_pt_usercp.php

示例9: fetch_prefix_html

/**
* Returns HTML of options/optgroups for direct display in a template for the
* selected forum.
*
* @param	integer	Forum ID to show prefixes from
* @param	string	Selected prefix ID
*
* @return	string	HTML to output
*/
function fetch_prefix_html($forumid, $selectedid = '')
{
    global $vbulletin, $stylevar, $vbphrase;
    $prefix_options = '';
    if ($prefixsets = fetch_prefix_array($forumid)) {
        foreach ($prefixsets as $prefixsetid => $prefixes) {
            $optgroup_options = '';
            foreach ($prefixes as $prefixid) {
                $optionvalue = $prefixid;
                $optiontitle = htmlspecialchars_uni($vbphrase["prefix_{$prefixid}_title_plain"]);
                $optionselected = $prefixid == $selectedid ? ' selected="selected"' : '';
                eval('$optgroup_options .= "' . fetch_template('option') . '";');
            }
            // if there's only 1 prefix set available, we don't want to show the optgroup
            if (sizeof($prefixsets) > 1) {
                $optgroup_label = htmlspecialchars_uni($vbphrase["prefixset_{$prefixsetid}_title"]);
                eval('$prefix_options .= "' . fetch_template('optgroup') . '";');
            } else {
                $prefix_options = $optgroup_options;
            }
        }
    }
    return $prefix_options;
}
开发者ID:holandacz,项目名称:nb4,代码行数:33,代码来源:functions_prefix.php

示例10: eval

    eval('$navbar = "' . fetch_template('navbar') . '";');
    eval('print_output("' . fetch_template('custom_' . $template_name) . '");');
}
$_REQUEST['do'] = 'showsmilies';
// ############################### start show smilies ###############################
if ($_REQUEST['do'] == 'showsmilies') {
    $smiliebits = '';
    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_start')) ? eval($hook) : false;
    $smilies = $db->query_read_slave("\n\t\tSELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category\n\t\tFROM " . TABLE_PREFIX . "smilie AS smilie\n\t\tLEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)\n\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t");
    while ($smilie = $db->fetch_array($smilies)) {
        $smilie['title'] = htmlspecialchars_uni($smilie['title']);
        if ($smilie['category'] != $lastcat) {
            ($hook = vBulletinHook::fetch_hook('misc_smilieslist_category')) ? eval($hook) : false;
            eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";');
        }
        exec_switch_bg();
        ($hook = vBulletinHook::fetch_hook('misc_smilieslist_smilie')) ? eval($hook) : false;
        eval('$smiliebits .= "' . fetch_template('help_smilies_smilie') . '";');
        $lastcat = $smilie['category'];
    }
    $navbits = construct_navbits(array('faq.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'], '' => $vbphrase['smilie_list']));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_complete')) ? eval($hook) : false;
    eval('print_output("' . fetch_template('help_smilies') . '");');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:41, Fri Oct 10th 2008
|| # CVS: $RCSfile$ - $Revision: 27128 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:misc.php

示例11: build_datastore

    build_datastore('maxloggedin', serialize($vbulletin->maxloggedin), 1);
}
$recordusers = $vbulletin->maxloggedin['maxonline'];
$recorddate = vbdate($vbulletin->options['dateformat'], $vbulletin->maxloggedin['maxonlinedate'], true);
$recordtime = vbdate($vbulletin->options['timeformat'], $vbulletin->maxloggedin['maxonlinedate']);
$currenttime = vbdate($vbulletin->options['timeformat']);
$metarefresh = '';
$show['refresh'] = false;
if ($vbulletin->options['WOLrefresh']) {
    $show['refresh'] = true;
    $refreshargs = ($vbulletin->GPC['who'] ? '&amp;who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&amp;ua=1' : '');
    $refreshargs_js = ($vbulletin->GPC['who'] ? '&who=' . $vbulletin->GPC['who'] : '') . ($vbulletin->GPC['ua'] ? '&ua=1' : '');
    $refreshtime = $vbulletin->options['WOLrefresh'] * 10;
}
$frmjmpsel['wol'] = ' selected="selected" class="fjsel"';
construct_forum_jump();
$pagenav = construct_page_nav($pagenumber, $perpage, $totalonline, 'online.php?' . $vbulletin->session->vars['sessionurl'] . "sort={$sortfield}&amp;order={$sortorder}&amp;pp={$perpage}" . iif($vbulletin->GPC['who'], '&amp;who=' . $vbulletin->GPC['who']) . iif($vbulletin->GPC['ua'], '&amp;ua=1'));
$numbervisible += $numberinvisible;
$colspan = 2;
$colspan = iif($show['ip'], $colspan + 1, $colspan);
$colspan = iif($vbulletin->options['showimicons'], $colspan + 1, $colspan);
($hook = vBulletinHook::fetch_hook('online_complete')) ? eval($hook) : false;
$navbits = construct_navbits(array('' => $vbphrase['whos_online']));
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('WHOSONLINE') . '");');
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26760 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:online.php

示例12: array

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="30" >
<style type="text/css" media="all"> 
<!-- 
body { 
   margin-left: 0px; 
   margin-top: 0px; 
   margin-right: 0px; 
   margin-bottom: 0px; 
} 
object, embed {
\twidth: 100%;
\theight: 100%;
}
--> 
</style>
</head>
<center>
{$footer_ad}
</center>
EOF;
exit;
$navbits = array();
$navbits[$parent] = 'ad_footerEnd Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('ad_footerEnd') . '");');
$footer_ad;
?>
 
开发者ID:holandacz,项目名称:nb4,代码行数:29,代码来源:autorefresh_footer.php

示例13: fetch_tagcloud


//.........这里部分代码省略.........
                break;
        }
    }
    if (!is_array($cloud) or $cloud['dateline'] < TIMENOW - 60 * $vbulletin->options['tagcloud_cachetime']) {
        if ($type == 'search') {
            $tags_result = $vbulletin->db->query_read_slave("\n\t\t\t\tSELECT tagsearch.tagid, tag.tagtext, COUNT(*) AS searchcount\n\t\t\t\tFROM " . TABLE_PREFIX . "tagsearch AS tagsearch\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "tag AS tag ON (tagsearch.tagid = tag.tagid)\n\t\t\t\t" . ($vbulletin->options['tagcloud_searchhistory'] ? "WHERE tagsearch.dateline > " . (TIMENOW - 60 * 60 * 24 * $vbulletin->options['tagcloud_searchhistory']) : '') . "\n\t\t\t\tGROUP BY tagsearch.tagid, tag.tagtext\n\t\t\t\tORDER BY searchcount DESC\n\t\t\t\tLIMIT " . $vbulletin->options['tagcloud_tags']);
        } else {
            if (!$vbulletin->options['tagcloud_usergroup']) {
                $perm_limit = false;
            } else {
                $forums = array();
                $perm_limit = true;
                foreach ($vbulletin->forumcache as $forumid => $forum) {
                    // -1 for live permission checking
                    $perm_array = $vbulletin->options['tagcloud_usergroup'] == -1 ? $vbulletin->userinfo['forumpermissions']["{$forumid}"] : $forum['permissions'][$vbulletin->options['tagcloud_usergroup']];
                    if ($perm_array & $vbulletin->bf_ugp_forumpermissions['canview'] and $perm_array & $vbulletin->bf_ugp_forumpermissions['canviewthreads'] and $perm_array & $vbulletin->bf_ugp_forumpermissions['canviewothers']) {
                        $forums[] = intval($forumid);
                    }
                }
            }
            if (!$perm_limit or $forums) {
                $tags_result = $vbulletin->db->query_read_slave("\n\t\t\t\t\tSELECT tagthread.tagid, tag.tagtext, COUNT(*) AS searchcount\n\t\t\t\t\tFROM " . TABLE_PREFIX . "tagthread AS tagthread\n\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "tag AS tag ON (tagthread.tagid = tag.tagid)\n\t\t\t\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (tagthread.threadid = thread.threadid)\n\t\t\t\t\tWHERE thread.open <> 10\n\t\t\t\t\t\tAND thread.visible = 1\n\t\t\t\t\t" . ($perm_limit ? "AND thread.forumid IN (" . implode(',', $forums) . ")" : '') . "\n\t\t\t\t\t" . ($vbulletin->options['tagcloud_usagehistory'] ? "AND tagthread.dateline > " . (TIMENOW - 60 * 60 * 24 * $vbulletin->options['tagcloud_usagehistory']) : '') . "\n\t\t\t\t\tGROUP BY tagthread.tagid, tag.tagtext\n\t\t\t\t\tORDER BY searchcount DESC\n\t\t\t\t\tLIMIT " . $vbulletin->options['tagcloud_tags']);
            }
        }
        $total = 0;
        $count = 0;
        if (!empty($tags_result)) {
            $count = $vbulletin->db->num_rows($tags_result);
            while ($currenttag = $vbulletin->db->fetch_array($tags_result)) {
                $tags["{$currenttag['tagtext']}"] = $currenttag;
                $total += $currenttag['searchcount'];
            }
            $vbulletin->db->free_result($tags_result);
        }
        $final_tags = array();
        if ($count > 0) {
            // calculate the standard deviation
            $mean = $total / $count;
            $summation = 0;
            foreach ($tags as $tagtext => $tagvalue) {
                $summation += pow($tagvalue['searchcount'] - $mean, 2);
            }
            $sd = sqrt($summation / $count);
            uksort($tags, 'strnatcasecmp');
            if ($sd) {
                $sdtags = array();
                $lowestsds = 0;
                $highestsds = 0;
                // find the max and min standard deviations
                foreach ($tags as $tagtext => $currenttag) {
                    $tags["{$tagtext}"]['deviation'] = $currenttag['searchcount'] - $mean;
                    $tags["{$tagtext}"]['sds'] = $tags["{$tagtext}"]['deviation'] / $sd;
                    $sdtags[] = $tags["{$tagtext}"];
                    if ($tags["{$tagtext}"]['sds'] < $lowestsds) {
                        $lowestsds = $tags["{$tagtext}"]['sds'];
                    }
                    if ($tags["{$tagtext}"]['sds'] > $highestsds) {
                        $highestsds = $tags["{$tagtext}"]['sds'];
                    }
                }
                $levels = $vbulletin->options['tagcloud_levels'];
                foreach ($sdtags as $thistag) {
                    // normalize the std devs to 0 - 1, then map back to 1 - #levls
                    $thistag['level'] = round(($thistag['sds'] - $lowestsds) / ($highestsds - $lowestsds) * ($levels - 1)) + 1;
                    $thistag['tagtext_url'] = urlencode(unhtmlspecialchars($thistag['tagtext']));
                    $final_tags[] = $thistag;
                }
            } else {
                foreach ($tags as $tagtext => $tagarr) {
                    $final_tags[] = array('tagid' => $tagarr['tagid'], 'tagtext' => $tagtext, 'tagtext_url' => urlencode(unhtmlspecialchars($tagtext)), 'level' => round($vbulletin->options['tagcloud_levels'] / 2));
                }
            }
        }
        $cloud = array('tags' => $final_tags, 'count' => sizeof($final_tags), 'dateline' => TIMENOW);
        if ($cacheable) {
            if ($type == 'search') {
                $vbulletin->searchcloud = $cloud;
                build_datastore('searchcloud', serialize($cloud), 1);
            } else {
                $vbulletin->tagcloud = $cloud;
                build_datastore('tagcloud', serialize($cloud), 1);
            }
        }
    }
    if (empty($cloud['tags'])) {
        return '';
    }
    $cloud['links'] = '';
    foreach ($cloud['tags'] as $thistag) {
        ($hook = vBulletinHook::fetch_hook('tag_cloud_bit')) ? eval($hook) : false;
        eval('$cloud[\'links\'] .= "' . fetch_template('tag_cloud_link') . '";');
    }
    $cloud['count'] = vb_number_format($cloud['count']);
    if ($type == 'search') {
        eval('$cloud_html .= "' . fetch_template('tag_cloud_box_search') . '";');
    } else {
        eval('$cloud_html .= "' . fetch_template('tag_cloud_box') . '";');
    }
    return $cloud_html;
}
开发者ID:holandacz,项目名称:nb4,代码行数:101,代码来源:functions_search.php

示例14: eval

    if (!$attachmentinfo['visible'] and !can_moderate($attachmentinfo['forumid'], 'canmoderateattachments') and $attachmentinfo['userid'] != $vbulletin->userinfo['userid']) {
        eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
    }
}
// handle lightbox requests
if ($_REQUEST['do'] == 'lightbox') {
    require_once DIR . '/includes/class_xml.php';
    $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
    if (in_array(strtolower($attachmentinfo['extension']), array('jpg', 'jpeg', 'jpe', 'gif', 'png'))) {
        $uniqueid = $vbulletin->GPC['uniqueid'];
        $imagelink = 'attachment.php?' . $vbulletin->session->vars['sessionurl'] . 'attachmentid=' . $attachmentinfo['attachmentid'] . '&d=' . $attachmentinfo['dateline'];
        $attachmentinfo['date_string'] = vbdate($vbulletin->options['dateformat'], $attachmentinfo['dateline']);
        $attachmentinfo['time_string'] = vbdate($vbulletin->options['timeformat'], $attachmentinfo['dateline']);
        $show['newwindow'] = $attachmentinfo['newwindow'] ? true : false;
        ($hook = vBulletinHook::fetch_hook('attachment_lightbox')) ? eval($hook) : false;
        eval('$html = "' . fetch_template('lightbox', 0, 0) . '";');
        $xml->add_group('img');
        $xml->add_tag('html', process_replacement_vars($html));
        $xml->add_tag('link', $imagelink);
        $xml->add_tag('name', $attachmentinfo['filename']);
        $xml->add_tag('date', $attachmentinfo['date_string']);
        $xml->add_tag('time', $attachmentinfo['time_string']);
        $xml->close_group();
    } else {
        $xml->add_group('errormessage');
        $xml->add_tag('error', 'notimage');
        $xml->add_tag('extension', $attachmentinfo['extension']);
        $xml->close_group();
    }
    $xml->print_xml();
    exit;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:attachment.php

示例15: count

                                $profilefield['height'] = count($data);
                            }
                            foreach ($data as $key => $val) {
                                if ($vbulletin->userinfo["{$profilefieldname}"] & pow(2, $key)) {
                                    $selected = 'selected="selected"';
                                } else {
                                    $selected = '';
                                }
                                $key++;
                                eval('$selectbits .= "' . fetch_template('userfield_select_option') . '";');
                            }
                            eval('$custom_field_holder = "' . fetch_template('userfield_select_multiple') . '";');
                        }
                    }
                }
            }
        }
    }
    if ($profilefield['required'] == 2) {
        // not required to be filled in but still show
        $profile_variable =& $customfields_other;
    } else {
        // required to be filled in
        if ($profilefield['form']) {
            $profile_variable =& $customfields_option;
        } else {
            $profile_variable =& $customfields_profile;
        }
    }
    eval('$profile_variable .= "' . fetch_template('userfield_wrapper') . '";');
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:custom_fields.php


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