vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   template driven pages (https://vborg.vbsupport.ru/showthread.php?t=63792)

hollyboy 05-01-2004 09:52 PM

should I copy this?
and in the template?

Oleks 05-31-2004 05:07 AM

Quote:

Originally Posted by Jakeman
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.

Code:

<?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 Code:

<?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

PHP Code:

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

Lets say I change it to

PHP Code:

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 Code:

<?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


All times are GMT. The time now is 07:59 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.01111 seconds
  • Memory Usage 1,758KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete