View Full Version : Adding a new page
diades
10-20-2002, 06:44 PM
Hi people
I found this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>$bbtitle - About</title>
$headinclude
</head>
<body>
$header
<p>Your code here!!!!!</p>
$footer
</body>
</html>
And make the new file about.php:
<?php
error_reporting(7);
require("./global.php");
eval("dooutput(\"".gettemplate('aboutmain')."\");");
?>
and used it to run a new page that I have created. The new page comes up ok but absolutely no content (I did change the template names accordingly).
Also, I would like to have it read the names of some other templates that are used within, can anyone shed some light please?
NTLDR
10-20-2002, 06:57 PM
Originally posted by diades
Also, I would like to have it read the names of some other templates that are used within, can anyone shed some light please?
Not sure I understand what your saying for this part ;)
And try c-prompts extra page driven by forum templates hack to do this if you haven't allready seen it :)
diades
10-20-2002, 07:09 PM
Hi NTLDR
Thanks for the reply!
Regarding:
Also, I would like to have it read the names of some other templates that are used within, can anyone shed some light please?
I have found that custom templates (bits not complete pages) have to be called also?
I have searched for the recommened therad in the hacks db but nothing came up (I also tried combinations etc., and have also searched on c-prompts in the members db in the hopes that, like yourself, there would be a libnk in the sig but both searches came up empty.
Erwin
10-20-2002, 07:29 PM
diades - your code should work, as long as you name the custom template correctly - make sure the name is "aboutmain". Make sure "aboutmain" is in the all your templatesets especially your default templateset.
diades
10-20-2002, 07:37 PM
Hi Erwin
"Make sure "aboutmain" is in the all your templatesets especially your default templateset."
I actually have this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>$bbtitle - About</title>
$headinclude
</head>
<body>
$header
$mainscript
$preloads
<p>Your code here!!!!!</p>
$footer
</body>
</html>
where the two lines in yellow are also custom templates(bits)
And links.php3:
<?php
error_reporting(7);
require("./global.php");
eval("dooutput(\"".gettemplate('links')."\");");
?>
It is called with:
"{forumlink}/links.php3?s=">
where links is the master page template.
I am only using it on one template at the moment to get it operational but, yes, I will naturally spread it accross when it is.
diades
10-21-2002, 02:54 PM
Hi Guys
Would it help if I posted the script/markup that I am actually using?
Erwin
10-21-2002, 10:34 PM
If $mainscript and $preloads are templates being called, you need to define these variables in the php file using dooutput.
diades
10-22-2002, 10:24 PM
Hi
No luck so far!
We found c_prompts hack eventually and, after trying mine to no avail, I decided to use that hack verbatim the only difference being:
<p>Privacy Test</p> as content
all that I get is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
We are running 2.2.7 if that makes any difference
diades
10-25-2002, 10:00 PM
We sorted thanks, used a different method
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.