vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to create an extra .php page ? (https://vborg.vbsupport.ru/showthread.php?t=65710)

Oleks 05-31-2004 10:20 PM

How to create an extra .php page ?
 
1 Attachment(s)
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

Quote:

Originally Posted by assassingod

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....77&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 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

Quote:

Originally Posted by assassingod
If you are trying add the navbar in your page, like in yours screenshot then use this code:
PHP 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

Quote:

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


All times are GMT. The time now is 07:33 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.00989 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete