i am really sorry to being noob, but i couldnt. Can you create a small example? This is really too important for me becuase i want to create my VB-powered custom page.
i tried this, and of course it doesnt work;
Quote:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'bugs');
define('NO_REGISTER_GLOBALS', 1);
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'shell_blank'
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
$html = <<< HTML
<!-- html starts here -->
require_once('./global.php');
$forumchoice = array();
foreach (array_keys($vbulletin->forumcache) AS $forumid)
{
$forumid = intval($forumid);
$forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
if (isset($vbulletin->forumcache["$forumid"]) AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND verify_forum_password($forumid, $vbulletin->forumcache["$forumid"]['password'], false))
{
$forumchoice[] = $forumid;
}
}
$datecut = TIMENOW - (7*24*60*60);
$hottopics = $db->query_read("SELECT * FROM ".TABLE_PREFIX."thread WHERE dateline > $datecut AND forumid IN (". implode(',', $forumchoice) . ") AND open=1 ORDER BY replycount DESC LIMIT 10");
$topicstring = "";
while($hottopic = $db->fetch_array($hottopics))
{
$topicstring.="<b>»</b> <a href='showthread.php?t=".$hottopic[threadid]."'>".$hottopic[title]."</a> - $hottopic[replycount] replies<br />";
}
eval('$hottopics = "' . fetch_template('hottopics') . '";');
<!-- html ends here -->
HTML;
$navbits["mycookies2.php"] = 'Photo Gallery';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
$pagetitle = "Photo Gallery";
eval('print_output("' . fetch_template('shell_blank') . '");');
?>
|