PDA

View Full Version : template driven pages


Jakeman
04-12-2004, 07:34 PM
Re: http://www.vbulletin.com/forum/showthread.php?t=101325

Create a PHP file with this code. Change the red code appropriately. This will display a page within your forum layout where the page contents are the contents of the template you specify.


<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>

fonzerelli_79
04-12-2004, 08:08 PM
thanks jake

for some reason the $navbar variable wont work - is there something i have to include in the php code to be able to include the navbar template

Jakeman
04-12-2004, 11:34 PM
Try adding this code before the last eval line:


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


This will at least call the template. I'm not sure how the nav location will be reported since it's an external script.

fonzerelli_79
04-12-2004, 11:38 PM
yeah that worked - thanks

filburt1
04-13-2004, 12:40 AM
Try adding this code before the last eval line:


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


This will at least call the template. I'm not sure how the nav location will be reported since it's an external script.

$navbits = array("" => "The Foo Page");

blairwarlock
04-19-2004, 02:27 AM
$navbits = array("" => "The Foo Page");


When inserting this variable, I get a nested link with the main home page at the top. However, the open folder icon below it shows no text next to it. Shouldn't it read "The Foo Page" (or whatever text you use)?

lazserus
04-22-2004, 05:02 AM
Please pardon my ignorance, but what I'm getting from this is that this creates the option to stick any current (or custom) template into an entirely new page with a vBulletin theme. This is all well and good (from my retarded little standpoint), but I'm not too keen on custom making a template w/o guidance. My webmaster and myself are testing this hack and the setup is simple enough but we're having problems adding content. :ermm: It's just that we don't quite understand vB3 yet. Any guidence?

fonzerelli_79
04-22-2004, 09:07 AM
When inserting this variable, I get a nested link with the main home page at the top. However, the open folder icon below it shows no text next to it. Shouldn't it read "The Foo Page" (or whatever text you use)?

use this instead

$navbits[lastelement] = "The Foo Page";

:)

hollyboy
05-01-2004, 09:58 AM
<a href="http://www.interfans.org/forum/rules.php" target="_blank">http://www.interfans.org/forum/rules.php</a>

I get this error:
Warning: chdir(): No such file or directory (errno 2) in /home/interfan/public_html/forum/rules.php on line 4

And what do I have to add in the new template?

Boofo
05-01-2004, 01:41 PM
http://www.interfans.org/forum/rules.php

I get this error:
Warning: chdir(): No such file or directory (errno 2) in /home/interfan/public_html/forum/rules.php on line 4


And what do I have to add in the new template?

Try this:

$navbits = array();
$navbits[$parent] = 'Forum Rules';

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

Chnage Forum Rules to what you want the navtitle to say.

hollyboy
05-01-2004, 03:02 PM
where do I have to copy that?
Sorry not very confident with php

Boofo
05-01-2004, 03:07 PM
Put it instead of this:

$navbits[lastelement] = "The Foo Page";

or whatever else you used for that line. ;)

hollyboy
05-01-2004, 04:21 PM
I don't know what u r talking about...:(
My code is this one:

<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>

Boofo
05-01-2004, 04:25 PM
I don't know what u r talking about...:(
My code is this one:

<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>

Put the code I gave you right BEFORE this line:

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

hollyboy
05-01-2004, 05:26 PM
<a href="http://www.interfans.org/forum/rules.php" target="_blank">http://www.interfans.org/forum/rules.php</a>
error
I am getting confused about the code to use now. Can u please say exaclty all the code I have to have in my rules.php page.
Thanks

Boofo
05-01-2004, 05:31 PM
Here's what I use for my rules.php file:

<?php

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

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

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

);

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

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

$navbits = array();
$navbits[$parent] = 'Forum Rules';

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

?>

hollyboy
05-01-2004, 08:38 PM
now I get this http://www.interfans.org/forum/rules.php?
:(

Scrub
05-01-2004, 08:53 PM
What is in the template you're trying to call?

hollyboy
05-01-2004, 09:22 PM
I have to put the rules of my forum, but I don't know how.

Synicide
05-01-2004, 09:24 PM
Here's what I use for my rules.php file:

<?php

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

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

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

);

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

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

$navbits = array();
$navbits[$parent] = 'Forum Rules';

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

?>
That's the way I laid out my templates (per Gary W's method) and it worked perfectly. :]

hollyboy
05-01-2004, 09:52 PM
should I copy this?
and in the template?

Oleks
05-31-2004, 05:07 AM
Re: http://www.vbulletin.com/forum/showthread.php?t=101325

Create a PHP file with this code. Change the red code appropriately. This will display a page within your forum layout where the page contents are the contents of the template you specify.


<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>






Jakeman,
This php file is working fine.

But, I wand to display ?control panel?. I mean this
Board "tree" and Welcome, UserName
User CP FAQ Members List Calendar New Posts Search Quick Links Log Out

How I can do this? What I should add to your code?

Thank you.

Allen Mead
09-09-2004, 06:13 PM
Hello,

I'm having a little trouble with this. I've created a php file called Untitled.php which can be seen here:

http://www.astra-mk2.com/Untitled.php

contents of the file are as follows:

<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

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

?>


I can work out how to change the title but not how to insert an html page myhtmlpage.html

The code that's above works beautifully, but it's just the linking to an html as the template and everything that it uses is as I want it.

Any help would be much appreciated.

Allen Mead
09-09-2004, 09:52 PM
Sorry, I'm a bit thick when it comes to this sort of thing.

I think i've nailed it down a bit further.

Do i understand it right that I need a script? How and what? and that I obviously need to create the file. Should this have the php or html extension?

Cheers in advanced

Allen Mead
09-10-2004, 11:24 AM
Anyone fancy helping the thick??? :nervous:

Dean C
09-10-2004, 01:54 PM
php extension :)

Allen Mead
09-10-2004, 07:00 PM
still not getting anywhere no matter what i change here, nothing happens

eval('$HTML = "' . fetch_template('name of template') . '";');

Lets say I change it to

eval('$HTML = "' . fetch_template('./Articles/Articles_Main.php') . '";');

still nothing happens, so obviously i need to change something else but what?

I know I'm terrible, I really need things spelt out!

Allen Mead
09-11-2004, 05:51 PM
Anyone??

Allen Mead
09-13-2004, 06:49 PM
hmmm, I've had me another go at this, still can't get it, I give up

Allen Mead
09-15-2004, 05:48 PM
Right, I'm having another pop at this and at the mo, I still can't get it to work this is what I have:

<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'Articles_Main');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('./forum/Articles_Main.php') . '";');

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

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

?>

Can anyone see where I am going wrong?

Cheers

Allen Mead
09-21-2004, 05:21 PM
I take it no-one knows then?

Allen Mead
10-04-2004, 06:58 PM
--------------------------------------------------------------------------------

Right, that's it, i still can't get it to work!!! I'll pay for someone to do this for me as long as it's not stupid money. If anyone is interested???

Allen Mead
10-13-2004, 07:39 PM
Sorted!! :cool: :cool: Thanks to a guy called David Robinson from Freelancers.net

Well chuffed. You can see a test page here if you're interested http://www.astra-mk2.com/untitled.php

blue_chi
10-13-2004, 09:50 PM
Allen,

I am having the same exact problem with my file. Could you please guide me on how to insert my HTML page into it?

Allen Mead
10-14-2004, 01:41 AM
Yep no problem blue chi.

This is what has been done with mine:

create your html pages as normal. Then create a template with vbulletin here:

admincp/styles & Templates/Style Manager/Add New Template

call it what you want, mine is html_poloshirts. Copy all the html code into this template.

eg:

<!-- saved from url=(0022)http://internet.e-mail -->
<!-- saved from url=(0022)http://internet.e-mail -->
<br><table border="0">
<tr>
<td colspan="3"><font face="Arial, Helvetica, sans-serif"><b><i><img src="Merchandise/Poloshirts/dealer_stripes.gif" width="32" height="18"><font size="5">Astra-mk2.com</font></i><font size="5">
Merchandise</font></b></font></td>
</tr>
<tr>
<td colspan="3" height="24">&nbsp;</td>
</tr>
<tr>
<td colspan="3" height="66">
<p align="left"><font face="Arial, Helvetica, sans-serif" size="3">We would
like you to bare in mind that we are not out to make large profits on
the goods that are forsale. As <i>Astra-mk2.com</i> is <b>not</b> a company
and is run in Steve's and Allen's spare time, all profits get put back
into the website to keep it running.</font></p>
</td>
</tr>
<tr>
<td colspan="3" height="35" valign="bottom">
<div align="left"><font face="Arial, Helvetica, sans-serif" size="3">The
following items are available from Astra-mk2.com.</font></div>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td width="54%" height="81" valign="top">
<div align="left"><font face="Arial, Helvetica, sans-serif" size="3">Polo
Shirts - Black with the website logo embroidered on the front left breast
(your name underneath is optional). Main website sponsor embrodered on
the back across the shoulders.</font></div>
</td>
<td colspan="2" height="268" rowspan="2">
<div align="center"><font face="Arial, Helvetica, sans-serif"></font><font face="Arial, Helvetica, sans-serif"><img src="Merchandise/Poloshirts/Polo_shirt_front.jpg" width="269" height="283"></font></div>
</td>
</tr>
<tr>
<td width="54%" height="133" valign="top">
<p align="left"><font face="Arial, Helvetica, sans-serif" size="3">Polo
Shirts are available in the following sizes:-<br>
L, XL <b>only.<br>
<br>
&pound;TBA</b> <br>
P+P &pound;2.00<b><br>
</b>Optional Name under logo on front of shirt<b> <br>
&pound;1.76</b></font></p>
</td>
</tr>
<tr>
<td width="54%" height="273">&nbsp;</td>
<td colspan="2" height="273">
<div align="center"><img src="Merchandise/Poloshirts/Polo_shirt_back.jpg" width="267" height="266"></div>
</td>
</tr>
<tr>
<td width="54%" height="81">&nbsp;</td>
<td colspan="2" height="81">
<div align="right"><img src="Merchandise/Poloshirts/logo_front.jpg" width="173" height="80"></div>
</td>
</tr>
<tr>
<td width="54%">&nbsp;</td>
<td width="3%">&nbsp;</td>
<td width="43%">&nbsp;</td>
</tr>
</table>

<br>


Create the php file that will reference this new template you created, eg:

untitled.php

<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('html_poloshirts') . '";');

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

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

Don't forget you will need to change your forum root folder if different to mine and obviously the title page.

You can put this file wherever you want really, doesn't make any difference. Oh, don't forget to upload any images referenced in the new template created. Once done, just replicate for the various pages you want.

blue_chi
10-14-2004, 11:19 PM
Thanks so much allen, I managed to get the file show my HTML content. But I was trying to use the PHP include() function, but it doesn't seem to work. Any ideas of how to fix this?

blue_chi
10-14-2004, 11:38 PM
OK, I just realised that PHP is not allowed in templates, that's a whole differrent issue then. :S

Mile-O-Phile
11-25-2004, 11:26 AM
<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>




I've stripped my version of this code to:

<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
//define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Talk History Test";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . $bbuserinfo[username] . '";');
eval('print_output("' . $bbuserinfo[username]. '");');
?>

This is because I only want to get the username from the forum to display on an independent web page. However, it keeps on creating a new HTML page with the user's name. So, I'd like to be able to convert it into a function (called get_form_user() ) that I can call at any time to insert the name into text within my webpages.

Any ideas?

Mile-O-Phile
11-30-2004, 02:49 PM
I've stripped my version of this code to:

<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
//define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Talk History Test";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . $bbuserinfo[username] . '";');
eval('print_output("' . $bbuserinfo[username]. '");');
?>

This is because I only want to get the username from the forum to display on an independent web page. However, it keeps on creating a new HTML page with the user's name. So, I'd like to be able to convert it into a function (called get_form_user() ) that I can call at any time to insert the name into text within my webpages.

Any ideas?
*BUMP* :(

Andreas
11-30-2004, 02:58 PM
If you just want the username you don't need to load the whole vB backend.
Just check the cookies (bbuserid, bbpassword) and query table user

Oleks
12-13-2004, 07:07 PM
Hi,
This code works fine on Linux server.
I am trying to use the same code on Windows server and I have an error.

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Domains\myDomain.net\wwwroot\includes\init.php on line 506

Warning: implode() [function.implode]: Bad arguments. in C:\Domains\myDomain.net\wwwroot\includes\init.php on line 511

Unable to add cookies, header already sent.
File: C:\Domains\myDomain.net\wwwroot\includes\init.php
Line: 506

Do you have an idea why it is different for Windows server and how to solve this problem?

Thank you.

traderx
12-16-2004, 06:11 AM
I am not sure if this would work with what I am trying to do.

I found a glossary script from http://glossword.info and I want it to look like the rest of my forum/site at www.4xtraders.com/forum. I plan on using the script at http://www.4xtraders.com/forum/glossary/. If you are to look at my main page and my glossary page, I am not able to have the header and footer (also the left and right columns). I would like to know how and what I need to do to be able to have my glossary script inserted into my header and footer.

This glossary script also uses a header, footer and a index (actually called indexpage.html... all from it's template folder) to display the terms.

Any help would be great as this is the best glossary that I have found unless any one else is using or has seen one better that can be intergrated to use vb's template layout

Thanks to all that reply

Mile-O-Phile
12-21-2004, 11:55 AM
If you just want the username you don't need to load the whole vB backend.
Just check the cookies (bbuserid, bbpassword) and query table user

Yes, but I have no idea how to do that from the code I posted above. All I'd like is a function that I can call or something that will give me the username.

Oleks
05-11-2005, 01:17 PM
Hi,
This script works fine on Linux server, but I have a problem with this script on Windows server. Dose somebody knows what is the difference?

Script works on Linux server without
//chdir('/patsh');

What patsh I should setup for chdir for Windows server?

chdir('c:/domain.com/wwwroot');
chdir('c:/domain.com');
chdir('domain.com');

I will appreciate your help.

Acedeal
07-17-2005, 10:06 AM
Does anyone have an example of;
calling a template inside another templete

Php code

<?php
include('includes/common.php');
$page_title = 'home';
include('featured.php');
include('stats.php');

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);

// #################### DEFINE IMPORTANT CONSTANTS #######################


define('THIS_SCRIPT', 'index');

$globaltemplates = array(
'PLAYER_INDEX_BODY',
'PLAYER_FAQ_BODY',
'PLAYER_FEATURED_BODY',
'PLAYER_LIST_BODY',
'PLAYER_LIST_EDIT_BODY',
'PLAYER_PLAY_BODY',
'PLAYER_FETCH',
'PLAYER_STATS',
'PLAYER_VIEW_ART_BODY',
'PLAYER_VIEW_ART_EDIT',
'PLAYER_VIEW_BODY',
'PLAYER_VEIW_EDIT',
'forumhome_moderator'
);

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

//NO CLUE WHAT"S THIS FOR
// what are actiontemplates ?

chdir('../../vb');
require_once('global.php');

// ## this calls to print out one main template ##
$pagetitle = "$vboptions[bbtitle]PLAYER INDEX";
$navbits[""] = $pagetitle;
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$VBPLAYER_STATS = "' . fetch_template('PLAYER_STATS') . '";');

eval('print_output("' . fetch_template('PLAYER_INDEX_BODY') . '");');
?>


That setups up the PHP (which works)

I have a template that does--and displays what I want it to

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<html>
<head>
<meta name="description" content="$foruminfo[description]" />
<title>$vboptions[bbtitle] - VB xxxx Index</title>
$headinclude
</head>
<body>
<!-- logo -->
<!--
<a name="top"></a>
-->
$_phpinclude_output
$header
$navbar
<br>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a class="nav" href="[bburl]">Forum Index</a>
-> <a href="{other_INDEX}" class="nav">somewhere Index</a></span></td>
</tr>
</table>
<table width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td valign="top">
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thead">Welcome to <i>xxxx</i></th>
</tr>
<tr>
<td class="alt1" width="500"><span class="gen">SOME TEXT HERE.<br />You can learn <a href="{X_FAQ}">more about xxxx</a> in the 'help' section.<br />
<br />What are you waiting for? <a href=".....">Start</a>!</span></td>
</tr>
</table>
<br />

{XXX_FEATURES}
</td>
<td valign="top">
{XXXX_STATS}
</td>
</tr>
</table>
$footer


where XXX_FEATURES is in the above template , is where I need to display some sql that is called in antother template same with the place holder called xxx_Stats
what would be the syntax for adding (or pulling the data) from the other template?

the xxx_features template has

<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thTop">Features</th>
</tr>

<tr>
<td class="catLeft"><span class="cattitle">Featured</span></td>
</tr>
<tr>
<td class="row1"><span class="genmed">
<!-- BEGIN feat -->
* <a class="genmed" href="{feat_xxx.U_VIEWxxxST}">{feat_xxx.XXXX_NAME}</a>
- <a class="genmed" href="{feat_xxxx.U_VIEWYYY}">{feat_xxx.YYYY_TITLE}</a>&nbsp;&nbsp;
{feat_xxx.YYYY_DESC}<br/>
<!-- END feat_s -->
</span>
</td>
</tr>



<tr>
<th class="thTop">List Features</th>
</tr>

<tr>
<td class="catLeft"><span class="cattitle">Featured lists</span></td>
</tr>
<tr>
<td class="row1"><span class="genmed">
<!-- BEGIN feat_pl -->
* <a class="genmed" href="{feat_pl.U_VIEWPL}">{feat_pl.PL_TITLE}</a>&nbsp;&nbsp;
{feat_pl.PL_DESC}<br/>
<!-- END feat_pl -->
</span>
</td>
</tr>

<tr>
<td class="catLeft"><span class="cattitle">in play</span></td>
</tr>
<tr>
<td class="row1"><span class="genmed">
<!-- BEGIN upl_YYYs -->
* <a class="genmed" href="{upl_YYYY.U_VIEWART}">{upl_YYYY.ARTIST_NAME}</a>
- <span class="genmed" href="{upl_YYYY.U_VIEWYYYY}">{upl_YYYY.YYYY_TITLE}</a><br/>
<!-- END upl_songs -->
</span></td>
</tr>

</table>

which has all the display info for the sql querries.
Trying to port a bunch of old stuff from my phpbb forums
At a lose on how vb pulls data from template to template

Hope you guys can help
Thanks in advance!!
TB

UManiac
02-09-2006, 03:04 AM
I'm having some problems as well - can;t get a couple of phrases to show...

This is my php file (ruelsPop.php)

<?php

// GO TO FORUM DIR
chdir('/home/journal/public_html/forums');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'rulesPop');

$phrasegroups = array(

);

require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('Forum_Rules') . '";');

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

?>

This is my Forum_Rules template:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[forum_rules]</td>
</tr>

<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div align="left">
$vbphrase[forum_rules_description]
</div>
</div>
</td>
</tr>
</table>

And this is my generic shell:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[registration]</title>
</head>
<body class="article">

$HTML

</body>
</html>

Notice I have no navbar, header, footer - just a very simple page. But I can;t get the phrases to display...

Any ideas?