PDA

View Full Version : Making new pages


ultimatearco
15 Nov 2008, 07:07
Hello all,
In this tutorial i'm going to show you how to make extra pages
Note:

Go into your Admincp, klick Styles & Templates, klick Style Manager, klick your template that your'e working with, hover your mouse to the dropdown menu and klick, klick Add Template

Give your template a name:
(like gallerytemplate)
and add this code to it:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$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">Tutorials</td>
</tr>
<tr>
<td class="alt1">
<!-- html code here -->
PUT THE HTML CODE YOU WANT HERE
<!-- end of html code -->
</td>
</tr>
</table>
$footer
</body>
</html>

Search for:
<!-- html code here -->
and add some stuff like:
<p>Hello, this is my gallery</p><br>
<img src="yourimages" border="0"></img><br>
<p>^^My favorite picture^^
You can allways do anything else ;)

Now save it, were nothing with that
Now we are going to make the PHP file
Open notepad
add this code in it
<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'privacy'); // 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(
'privacytemplate',
);

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

);

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

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

$navbits = array();
$navbits[$parent] = 'name';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('templatename') . '");');

?>
Note: Allways put this on the root directory of the forum otherwise you will have problems with the images
Find: define('THIS_SCRIPT', 'scriptname'); // change this depending on your filename
Change privacy (keep the ' ') to the name of your file (without .php after it)

Find: $navbits[$parent] = 'name';
Change name (keep the ' ') to whatever you want

Find: eval('print_output("' . fetch_template('templatename') . '");');
Change templatename (keep the ' ') to the template you just made

Save it to whatever you want (Make sure its the same name as in edit 1 (scriptname) and with .php after it)

Upload it to your webserver and your'e done!

If you want it to appear it into your navbar i suggest to:
Use my Navbar Edit mod (http://www.vbulletin.org/forum/showthread.php?t=194704) (for all vB versions) (Manual code changes)
Or to download the double navigation bar mod

ultimatearco
15 Nov 2008, 07:08
Note if you find a bug, please report it to me

Version history:
1.0.0 I came up with this idea

ultimatearco
15 Nov 2008, 07:08
Reserved 2

Princeton
15 Nov 2008, 16:17
moved to articles

ultimatearco
28 Nov 2008, 06:48
Thanks, but why is this not a mod??

tunistunis
28 Nov 2008, 09:41
not works for me

RLShare
03 Dec 2008, 08:05
Um... This same thing was posted before...........
http://www.vbulletin.org/forum/showthread.php?t=62164

dismas
03 Dec 2008, 08:14
Um... This same thing was posted before...........
http://www.vbulletin.org/forum/showthread.php?t=62164

I'm glad I'm not the only one who was thinking the same thing. What's the point of having a second article about the same thing?

Gamelobby
10 Apr 2009, 22:35
These codes aren't the same as the other one..?
What does it do different.? (besides the other one is from 2004, and this is from 2008)
Does it work the same on 3.0+ as it does on 2.0+.?

I would like to have a small/simple webpage on this html page is that possible.?
Here is what i have.. just an image for now but just so you get the idea.
www.gamelobby.com/Forum/test.php

Is this possible..?

TheLastSuperman
11 Apr 2009, 03:05
Yes :D

Now all you do is edit the code in between the html tags i.e.

<!-- html code here -->
PUT THE HTML CODE YOU WANT HERE
<!-- end of html code -->

Put the code you have created for your "inner" page where it says put the html code you want here. I assume if you used this one that is where you placed your <img> code for the image you have there now? Give it a try and also have you check this out --> http://www.vbulletin.org/forum/showthread.php?t=186644 ? Besides the install non-experienced owners find this is easier than recreating new templates 24/7 :D

S-MAN

drew82
11 Apr 2009, 03:13
ok I've created a new homepage and added a link in my navigation, but how do I make the homepage my homepage when someone goes to mysite.com

my vb is installed in the root of my site, but want to use the forum as a link page and my vbpowered homepage as my homepage

someone please help

ragtek
15 Apr 2009, 16:07
Isn't this just the same as: http://www.vbulletin.org/forum/showthread.php?t=62164 ??

Do we realy need 2 same articles?