• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn Hướng dẫn tạo trang riêngtrong vbb 4

xmen94

New Member
Vip
This is an updated article
on how to create your
own vbulletin powered
page. It's only for use
with vB4.
This is NOT my work. I'm
posting this from another
thread where vB Style
took the time to write
this out. And his work is
based on the article by
Gary King here - How to
create your own
vBulletin-powered page!
(uses vB templates)
Instructions to Create
your Own Page:
1. Create the php page:
- Create a new file,
whatever you want to
call it (let's say test.php).
- Open up test.php and
add the following
(replace TEST with
whatever template you
want to show):
PHP Code:
<?php
// ###############
######## SET PHP
ENVIRONMENT ######
#################
####
error_reporting(E_ALL &
~E_NOTICE);
// ###############
##### DEFINE
IMPORTANT CONSTANTS
#################
######
define('THIS_SCRIPT',
'test');
define('CSRF_
PROTECTION', true);
// change this depending
on your filename
// ###############
#### 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
('TEST',
);
// pre-cache templates
used by specific actions
$actiontemplates = array
();
// ###############
########## REQUIRE
BACK-END #########
#################
##
// if your page is outside
of your normal vb
forums directory, you
should change directories
by uncommenting the
next line
// chdir ('/path/to/your/
forums');
require_once('./
global.php');
// ###############
#################
#################
#################
#####
// ###############
######### START
MAIN SCRIPT ########
#################
###
// ###############
#################
#################
#################
#####
$navbits = construct_
navbits(array('' => 'Test
Page'));
$navbar = render_
navbar_template($
navbits);
// ###### YOUR
CUSTOM CODE GOES
HERE #####
$pagetitle = 'My Page
Title';
// ###### NOW YOUR
TEMPLATE IS BEING
RENDERED ######
$templater = vB_
Template::create('TEST');
$templater->register_
page_templates();
$templater->register
('navbar', $navbar);
$templater->register
('pagetitle', $pagetitle);
print_output($templater-
>render());
?>
- Be sure to change
'TEST' to the actual
template name, and
change 'test' to the
filename or a unique
name for the page. Also,
change 'Test Page' and
'My Page Title' to
whatever you want to
show in the navbits, such
as 'Viewing Member
Profile' (just an example).
2. Create the
Template:
- If you are in debug
mode, create the
template in your MASTER
STYLE so it shows up in
all your styles, otherwise
make sure you create the
template in the style you
are using. If following the
page above, call the
template TEST with the
following content:
HTML Code:
{vb:stylevar htmldoctype}
<html xmlns="http://
www.w3.org/1999/
xhtml" dir="{vb:stylevar
textdirection}"
lang="{vb:stylevar
languagecode}"
id="vbulletin_html">
<head>
<title>{vb:raw
vboptions.bbtitle} -
{vb:raw pagetitle} </title>
{vb:raw headinclude}
{vb:raw headinclude_
bottom}
</head>
<body>
{vb:raw header}
{vb:raw navbar}
<div id="pagetitle">
<h1>{vb:raw
pagetitle}</h1>
</div>
<h2
class="blockhead">Title<
/h2>
<div
class="blockbody
settings_form_border">
<div
class="blocksubhead">
DuyK_1</div>
<div
class="blockbody">
<div
class="blockrow">
DuyK</br>
DuyK</br>
DuyK</br>
DuyK</br>
DuyK</br>
</div>
</
div>
</div>
{vb:raw footer}
</body>
</html>
Instructions to Add
your Page to the Who's
Online List (WOL):
Create two plugins using
the following hooks.
Replace mypage and
similar with your
information.
1. hook location -
online_location_
process:
PHP Code:
switch ($filename)
{
case 'test.php':
$userinfo['activity'] =
'mypage';
break;
// add more cases here
if you have more than
one custom page. no
need for multiple
plugins. one plugin can
handle all.
}
2. hook location online_
location_unknown:
PHP Code:
switch ($userinfo
['activity'])
{
case 'mypage':
$userinfo['where'] = '<a
href="test.php?'.$
vbulletin->session->vars
[sessionurl].'">My Page</
a>';
$userinfo['action'] =
"Viewing My Page";
$handled = true;
break;
// add more cases here if
you have more than one
custom page. no need
for multiple plugins. one
plugin can handle all.
}
Resource: vBulletin.org

----------> Bổ sung bài viết lúc 13:28 PM <----------> Bài viết trước lúc 13:27 PM <----------

Nguon:
DAICA
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
V Hướng dẫn tạo logo giống Xenforo Xenforo 4
dammechiase Dowload phần mềm UltraISO Mới nhất phần mềm tạo ổ đĩa ảo mới nhất full key bản chuẩn kèm hướng dẫn Phần mềm 0
Admin Hướng dẫn tạo con vật thật sự trên màn hình điện thoại bằng Animal 4D+ Thảo luận chung 0
Admin Hướng dẫn tạo video karaoke đơn giản và chi tiết nhất 2019 Video, clip 4
SuperTroll Share Hướng dẫn tự tạo App Android để truy cập vào wapsite của mình Android, iOS 0
V Hướng Dẫn Tạo Forum Trên Xtgem Wap builder, wapego, xtgem, wen.ru, wapka, wap4 1
B Hỏi Adm hướng dẫn mình tạo filelist đơn giản cho wap xtgem với? HTML & CSS 2
A Xin hướng dẫn tạo forum xenforo chi tiết dễ hiểu Thảo luận wap việt 4
D Share Hướng dẫn tạo cấu trúc php sửdụng hàm GET hoặc POST All Shared Scripts 0
H Hướng dẫn Hướng dẫn tạo chuyên mục cho Xenforo Xenforo 0
Admin Hướng dẫn chi tiết tạo paypal bằng hình ảnh Thảo luận chung 1
roboconz Hướng dẫn Hướng dẫn ae tạo tên miền .tk đây Mã nguồn wap 4
nhokzodanh Share hướng dẫn tạo wap upload wapka Wap builder, wapego, xtgem, wen.ru, wapka, wap4 2
G : [b]Hướng dẫn chi tiết tạo logo[/b] Hình ảnh 0
Yeukodamnoi Hướng dẫn cách chế tạo súng hơi Ý tưởng, góp ý, sáng kiến mới của thành viên 10
H Hỏi Tạo domen.tk trên điện thoại được ko anh em ơi.nếu được xin a e hướng dẫn nhé! Thanks rất nhiều.tớ v Hosting & Domain Share 5
H Hướng dẫn tạo Sitemap cho các blogger sử dụng Blogspot Thảo luận SEO 0
N Hướng dẫn Hướng dẫn tạo database trên cPanel Hosting / Domain 0
Della007 Hỏi Xin anh thắng hướng dẫn tạo database host directadmin Hỏi đáp về domain & hosting 3
2 Thảo luận Mong A thắng hay congtu24, kidbloob và pro john trên host cp11 tạo top hướng dẫn chi tiết Johncms 10
H Hướng dẫn tạo subdomain Hướng dẫn Tạo Subdomain Hosting & Domain Free 0
yeuthenao [Share] Hướng dẫn sử dụng PSD để tạo Logo Video, clip 0
L Hỏi Ae nào hướng dẫn mình tạo page tren facebook tks Thảo luận SEO 2
Yeukodamnoi Share zip html hướng dẫn tạo wap Mã nguồn wap 6
Admin [Full HD 1080] Hướng dẫn tạo add-on Xenforo 1/9 - Creating your own add-on Xenforo 0
A Help Wapka xin hướng dẫn tạo phần trang nhanh Wap builder, wapego, xtgem, wen.ru, wapka, wap4 1
Admin Hướng dẫn sử dụng PSD để tạo logo + PSD Thiết kế đồ họa 2
Admin Hướng dẫn tạo ổ USB flash cài đặt Windows 8 Sử dụng, chia sẻ, hỏi đáp 0
Admin Hướng dẫn tạo javascript tự động thay đổi hình ảnh, link JavaScript / Ajax 2
K Hướng Dẫn Tạo Ảnh Nền Cho Chatbox Trong Vbb Mã nguồn web 1
K [Hướng Dẫn] Edit Templeate Tạo Tcat Ảnh Cho Riêng Từng Box Mã nguồn web 0
Admin Hướng dẫn tạo Banner Flash chuyển ảnh Kiến thức lập trình 0
Admin Hướng dẫn tạo phân vùng chủ trong Ubuntu Sử dụng, chia sẻ, hỏi đáp 0
Admin [Hướng dẫn] tạo giao diện 2 cột, 3 cột HTML & CSS 0
T Xin hướng dẫn tạo user database trên mobile Kiến thức lập trình 4
N Help Xin hướng dẫn tạo subdomain ở host khác nhau Hỏi đáp về domain & hosting 0
Admin Video hướng dẫn tạo user/password admin khi người share code ko đưa thông tin này Mã nguồn web 7
Admin Hướng dẫn tạo hình nền chatbox - ngầu hơn Vbulletin 1
Admin Hướng dẫn tạo database trong cpanel PHP 3
congtust24 Hướng dẫn tạo logo ở header style mobile HTML & CSS 32
Admin Hướng dẫn tạo giao diện timeline HTML & CSS 0
N Xin hướng dẫn tạo banner cho profile Thảo luận chung 4
M Hướng dẫn tạo đầu trọc vĩnh viễn cho ai chưa biết Ý tưởng, góp ý, sáng kiến mới của thành viên 0
Kidblood Hướng dẫn tạo phòng chát ngoài trang chủ yourwap.eu Wap builder, wapego, xtgem, wen.ru, wapka, wap4 17
Admin Hướng dẫn tạo block (quảng cáo 1 bên hông forum vbb4) Vbulletin 0
Admin Hướng dẫn tạo quảng cáo chạy dọc 2 bên forum vbb Vbulletin 0
Admin Hướng dẫn tạo prefix (tiền tố) cho vbb4.x.x Add-ons 0
Admin Hướng dẫn tạo trang hiển thị trình duyệt khi truy cập PHP 0
Admin Hướng dẫn tạo logo team chi tiết từ a đến z Thủ thuật ĐTDĐ 17
Admin Hướng dẫn tạo đường dẫn topic style mobile Vbulletin 0

Similar threads

New posts New threads New resources

Back
Top