PDA

View Full Version : How to create an extra .php page ?


Oleks
05-31-2004, 10:20 PM
Hi,
I’d like to create an extra .php page which will contain Board’s headers, footers and this part (please see an attachment)? Can somebody help me?

Thank you.

assassingod
05-31-2004, 10:22 PM
Here you go:
https://vborg.vbsupport.ru/showthread.php?t=63792
:)

Oleks
05-31-2004, 10:36 PM
Here you go:
https://vborg.vbsupport.ru/showthread.php?t=63792
:)

assassingod,
I am aware of this code. But, this .php file is not displaying part of the headers. I am talking about that part (please, see an attachment to my post #1).

Or maybe I can not make it works.

How I should modify this code to display
?User CP FAQ Members List Calendar New Posts Search Quick Links Log Out?
(please, see an attachment to my post #1)?

Thank you.

assassingod
05-31-2004, 10:41 PM
https://vborg.vbsupport.ru/showpost.php?p=499577&postcount=3 (It was the 3rd post in that thread:))

Oleks
05-31-2004, 11:23 PM
assassingod,
It is works if to change
eval('$HTML = "' . fetch_template('name of template') . '";');
to
eval('$HTML = "' . fetch_template('navbar') . '";');

I'd like to add some text or HTML code into that new page.
But, I can not figure out how and where to insert text or any HTML code in that extra page. What I should add to this code? Please, help.

<?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('navbar') . '";');

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

?>

Thank you.

assassingod
05-31-2004, 11:44 PM
If you are trying add the navbar in your page, like in yours screenshot then use this 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('$navbar = "' . fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template('yourtemplate') . '";');

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

?>

Then in your template, just use $navbar to get it up.

Oleks
05-31-2004, 11:54 PM
If you are trying add the navbar in your page, like in yours screenshot then use this 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('$navbar = "' . fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template('yourtemplate') . '";');

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

?>

Then in your template, just use $navbar to get it up.



Thank you.
Thank you.
and Thank you.

assassingod
05-31-2004, 11:57 PM
You're welcome:)

Oleks
12-13-2004, 12:32 PM
You're welcome:)

Hi assassingod,
I?d like to thank you for the help.
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.