vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   extra page (https://vborg.vbsupport.ru/showthread.php?t=116347)

gamelandz 05-22-2006 03:17 AM

extra page
 
I am trying to create an extra page following these directions....

https://vborg.vbsupport.ru/showthread.php?t=62164

but i am having trouble getting the page to show...any help on this?

thanks,
gamelandz

Logikos 05-22-2006 03:31 AM

Thats an outdated tutorial. Here is a quick 3.5 version.

Lets name the page first. We will call it.. hmmm... Lets call it aboutus. The first thing we need to do is create the PHP file for this page. Here is the basic code you need to make a vBulletin powered page.

PHP Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''NAME_OF_THE_FILE');

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

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

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

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





// #############################################################################
// draw navbar
$navbits = array();
$navbits[''] = "NAME_OF_THE_FILE";
$navbits construct_navbits($navbits);

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

?>

There are 2 things you need to edit with the above code. The two things are the following text.

1. NAME_OF_THE_FILE (This is the name of the file with out the .php extention)
2. NAME_OF_THE_FILE_TEMPLATE (This is the name of the template we're going to use)
Lets name the file aboutus.php and edit where it says NAME_OF_THE_FILE to aboutus. Lets name the template aboutus. Now you code should look like this.

PHP Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''aboutus');

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

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

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

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





// #############################################################################
// draw navbar
$navbits = array();
$navbits[''] = "About Us";
$navbits construct_navbits($navbits);

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

?>

Upload that to your forums directory. When you go to your site you going to see a blank white page. This is because you went ahead of me. :p You need to create the template. Since
PHP Code:

eval('print_output("' fetch_template('aboutus') . '");'); 

is looking for the aboutus template, then we should make one. Here is the basic core template code.

HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
        <!-- no cache headers -->
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="-1" />
        <meta http-equiv="Cache-Control" content="no-cache" />
        <!-- end no cache headers -->
        $headinclude
        <title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header
$navbar

<!-- main -->
Hey look mom, I'm on the web! :)
<!-- /main -->

$footer
</body>
</html>

Now you can go shot over to that page and admire what you just created. :) Hope this helps.

Welp. I just found This Page. Guess next time we both should search. hehe. :p

gamelandz 05-22-2006 06:41 PM

how do i delete a tempalte after i create it?...you know if i create a aboutus.php template...how do i delete it?

thx,
gamelandz

Rich 05-22-2006 07:14 PM

Revert that template and poof, its gone.

gamelandz 05-22-2006 07:16 PM

well that was easy enough

hey rich...are there any good classifieds scripts to integrate into vB 3.5.4?

Rich 05-22-2006 09:17 PM

There is a classifieds script located on this site. Its a lite version, but has potential.


All times are GMT. The time now is 08:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01098 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete