vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using header, navbar, and footer on custom html pages? (https://vborg.vbsupport.ru/showthread.php?t=88543)

RobFerrari 02-27-2004 01:03 AM

Using header, navbar, and footer on custom html pages?
 
I want to use the vB header, navbar, and footer on some of my custom (non forum) pages.

Should I create custom php and call those templates and bring in my other html pages?

Is there an easier way? Like having the templates called from my html?

What's the easiest way to do this?

Thank you,
rob

tomp 03-02-2004 08:56 AM

with mine i created custom php pages and called the the templates

RobFerrari 03-02-2004 01:35 PM

Quote:

Originally Posted by tomp
with mine i created custom php pages and called the the templates

I'm pretty new to hacking with vB and PHP. What is the way you call the template?

Thank you,
rob

tomp 03-02-2004 01:39 PM

hey, ok heres how i did it

i created a template in my admin cp called links for example

then i made a new php file called links.php which had the following code in it:

<?php

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('links (or whatever your template is called)') . '");');
?>

i uploaded that into my forum directory and then created a link in my navigation bar to link.php

Hope this was some help :)

RobFerrari 04-11-2004 11:34 PM

Quote:

Originally Posted by tomp
hey, ok heres how i did it

i created a template in my admin cp called links for example

then i made a new php file called links.php which had the following code in it:

<?php

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('links (or whatever your template is called)') . '");');
?>

i uploaded that into my forum directory and then created a link in my navigation bar to link.php

Hope this was some help :)

I'm just now getting around to doing this. It's not working exactly yet. Here's what I put in a new file called consultants.php and uploaded to the forum directory...

Code:

<?php

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('consultants') . '");');
?>

I created a new template called consultants and is called fine from above, however, the navbar isn't working. Because it's in a sub directory under "Navigation / Breadcrumb Templates"? How about the $navbar piece, I don't understand that part.

Thanks,
rob

Tony G 04-12-2004 03:29 AM

In the template you created, put in your XHTML code and where you want the navbar to display, place the variable $navbar there and it should call the navbar template.

Make sure it's $navbar and not just navbar on it's own.

RobFerrari 04-14-2004 06:01 PM

Quote:

Originally Posted by Tony
In the template you created, put in your XHTML code and where you want the navbar to display, place the variable $navbar there and it should call the navbar template.

Make sure it's $navbar and not just navbar on it's own.

Thank you! Dumb mistake on my part, thanks for the help. Works perfect now.

RobFerrari 04-22-2004 02:54 AM

Quote:

Originally Posted by tomp
Hope this was some help :)

Does anyone know the best way through HTML or PHP to "include" an html page?

I just want to reference the html page and be able to make easy page changes there and not through the template interface.

Thank you,
rob

RobFerrari 05-02-2004 10:46 PM

Does anyone know the best way through HTML or PHP to "include" an html page?

I just want to reference the html page and be able to make easy page changes there and not through the template interface.

Thank you,
rob


All times are GMT. The time now is 03:53 PM.

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.01027 seconds
  • Memory Usage 1,732KB
  • 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_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