if(!empty($newsid))
{
//Code to show news article
}
You can just put in the code in this section to get news article.
don?t think you understood what i meant i want it to be taken from a template and i don?t know how i fix the code for that?
i tried it like this:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'index');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// pre-cache templates used by all actions
$globaltemplates = array(
'vbnewsbit',
'vbnewslist',
'vbaddnews',
'vbsinglenews',
);
// ######################### REQUIRE BACK-END ############################
GLOBAL $parser;
require_once('./includes/class_bbcode.php');
require_once('./global.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
// ######################## START MAIN SCRIPT ############################
$newslimit = $vbulletin->input->clean($vbulletin->options['newslimit'], TYPE_INT);
//Check if in usergroup 6
if(is_member_of($vbulletin->userinfo, 6))//Change 6 to usergroup ID you want to restrict to
{
//Code to use if usergroup 6
if ($_REQUEST['do'] == 'add')
{
eval('$vbaddnews .= "' . fetch_template('') . '";');