Vbulletin de yeni bir sayfa nasıl oluşturabilirim diyenler için aşağıdaki adımları izlemesini öneririm...
Öncelikle editör programları ile yeni bir sayfa oluşturun. Bu sayfanın adını deneme.php olarak belirleyin.... Sonraki adım ise aşagıda vereceğim kodları bu yeni oluşturduğunuz dosyanın içerine ekleyin...
Alıntı:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
// change the line below to the actual filename without ".php" extention.
// the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation.
define('THIS_SCRIPT', 'test');
// #################### 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(
// change the lines below to the list of actual templates used in the script
'test_mytesttemplate1',
'test_mytesttemplate22',
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$navbits = array();
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_mytesttemplate1') . '");');
?>
Daha sonrası admincpde yeni bir template oluşturmanız gerekiyor.
Alıntı:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td class="tcat">My Custom Page Title</td>
</tr>
<tr>
<td class="alt1">Other Bluff...</td>
</tr>
</table>
$footer
</body>
</html>
sadece üyelerin yaptığınız sayfaları görmesini istiyorsanız
Alıntı:
if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}
Veya sadece admin yetkisindekilerin görmesini istiyor isen
Alıntı:
if (!is_member_of($vbulletin->userinfo, 6)
{
print_no_permission();
}
Ziyaretçilere Template de kapatmak için ise
Alıntı:
<if condition="!$bbuserinfo['userid']">
Lütfen kayıt olun
<else />
Foruma hoş geldin $bbuserinfo[username]
</if>
Eğer belli bir gurubun yazıları görmesini istiyor isen
Alıntı:
<if condition="is_member_of($bbuserinfo, 6)">
Sayın Admin hoş geldin
<else />
Siteye hoş geldiniz.
</if>
Öncelikle editör programları ile yeni bir sayfa oluşturun. Bu sayfanın adını deneme.php olarak belirleyin.... Sonraki adım ise aşagıda vereceğim kodları bu yeni oluşturduğunuz dosyanın içerine ekleyin...
Alıntı:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
// change the line below to the actual filename without ".php" extention.
// the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation.
define('THIS_SCRIPT', 'test');
// #################### 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(
// change the lines below to the list of actual templates used in the script
'test_mytesttemplate1',
'test_mytesttemplate22',
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$navbits = array();
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_mytesttemplate1') . '");');
?>
Daha sonrası admincpde yeni bir template oluşturmanız gerekiyor.
Alıntı:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td class="tcat">My Custom Page Title</td>
</tr>
<tr>
<td class="alt1">Other Bluff...</td>
</tr>
</table>
$footer
</body>
</html>
sadece üyelerin yaptığınız sayfaları görmesini istiyorsanız
Alıntı:
if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}
Veya sadece admin yetkisindekilerin görmesini istiyor isen
Alıntı:
if (!is_member_of($vbulletin->userinfo, 6)
{
print_no_permission();
}
Ziyaretçilere Template de kapatmak için ise
Alıntı:
<if condition="!$bbuserinfo['userid']">
Lütfen kayıt olun
<else />
Foruma hoş geldin $bbuserinfo[username]
</if>
Eğer belli bir gurubun yazıları görmesini istiyor isen
Alıntı:
<if condition="is_member_of($bbuserinfo, 6)">
Sayın Admin hoş geldin
<else />
Siteye hoş geldiniz.
</if>