网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > vBulletin技术交流
User Name
Password
 
FAQ Members List Calendar Cheap Glasses Mark Forums Read

vBulletin技术交流 主要讨论vBulletin的安装使用、模板风格、插件以及小技巧等。

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   IP: 117.95.49.197
Old 2009-07-12, 12:54 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default How do I create a new template in Vbulletin?

For example, how do I creat a privacy policy page in vbulletin?
Step1:
Admin Control Panel > Styles & Templates > Style Manager > From the drop down behind the style you want to add a new template too, click on the drop down box and select ‘Add new template’.

Step2:
create a new php file in your editor of choice, or notepad.
place the following code into it:

<?php// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'privacy');

// ################### 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(
'privacy',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'Privacy Policy';

$navbits = construct_navbits($navbits);

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('privacy') . '");');

?>

save and upload to your root forum directory (same location as showthread.php, etc) calling it ‘privacy.php’
Step3:
Go to the style Manager in the ACP. From your skin (and you will have to do this for each skin if they aren’t inherited) Select ‘Add New Template’ from the drop down.
Name the template ‘privacy’ THIS MUST MATCH what is in the php file, so if you change it here, you must change it there as well.

place the following code into the template. Note again, this contains the code that I used for my policy. I Highly suggest you edit some of it at the very least Also, change YOURSITENAME to your site name.
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Privacy Policy - $vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" id="top">Privacy Policy</td>
</tr>
<tr>
<td class="alt1">
<div style="width: 80%; margin: 0 auto;">
<ul>
<li>YOURSITENAME recognizes that you care about the personal information that is held about you and how that is used.</li>
<li>This privacy policy applies to all personal data, submitted by you, to the YOURSITENAME web site.</li>
<li>By registering to YOURSITENAME you need to submit a chosen name and contact information, more specifically an e-mail address. No extremely personal information, such as Social Security or Credit Card numbers are stored by us.</li>
<li>YOURSITENAME also stores and reads cookies to and from your computer. Cookies are alphanumeric identifiers that we transfer to your computer's hard drive through your Web browser to enable our forums and general website features to recognize your browser for when you return to this web site. By using this website, you agree that both the webserver, and any trusted 3rd party we chose, such as advertising networks, may place a tracking cookie on your machine and access it at any time during your session. In general, cookies are safe and are not a security issue when being used from 'trusted' internet sites, such as YOURSITENAME. For information on how to manage cookies in your browser, please visit <a href="http://www.aboutcookies.org/Default.aspx?page=2" rel="nofollow">AboutCookies.org</a></li>
<li>YOURSITENAME will not sell, transmit or distribute any data held without your prior permission or consent, unless required to do so under relevant United States legislation.</li>
<li>All other information provided by you goes into a "public profile" and is entirely optional, all information held in that profile is held there at your own risk. This info is edited via your Control Panel in the forums.</li>
<li>You have a legal right for the personal information held at YOURSITENAME to be updated if it is incorrect or deleted if you choose. Most of this can be done through your Control Panel in the forums. If you are having issues with this, please contact us if you need help.</li>
<li>YOURSITENAME will take all reasonable effort to ensure that all personal information about you submitted is maintained secure on our server. However, we make no warranty to this.</li>
<li>This site is intended for individuals over the age of 13. Any information collected is intended to be of individuals over the age of 13. According to <a href="http://www.ftc.gov/coppa/index.html">COPPA</a>, our site does NOT cater to children. "Operators of commercial websites or online services directed to children under 13 that collect personal information from children" require a COPPA agreement and privacy policy. Since we do not cater to this age group, no COPPA exists on YOURSITENAME</li>
<li>This Privacy Policy may be modified at any time without notice. It is your responsibility to check this page for updates or changes. If you have any questions regarding your privacy, then <a href="/sendmessage.php">Contact Us</a></li>
</ul>
</div>
</td>
</tr>
</table>

$footer

</body>
</html>


Step4:
I know you didn’t edit it yet… go back and edit your template with YOUR policy
Step5:
Optional: Create a CRR to make privacy.php look nice, like yourdomain.com/privacy/ or any other variety you chose.
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
x-cart Template Editing Guide for 4.1.x topvip X-Cart 0 2009-04-15 11:42 PM
Template Editing Guide for 4.1.x topvip X-Cart 0 2009-03-10 08:12 AM
【发布】vBulletin 3.6.1 简繁中文增强修正版 smiling vBulletin技术交流 0 2006-10-15 10:21 PM
Starting your AdSense Business using Free Blogs smiling Google Adsense 1 2006-03-02 11:21 AM
如何在本机上安装vBulletin [转载] sunshine 服务器环境搭建 0 2006-01-11 05:42 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 12:28 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.