vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

SVTBlackLight01 05-09-2004 05:08 PM

Quote:

Originally Posted by iKwak
Is there a way that you can add new pages on your index directory rather than the forum directory?

This should get you started.

https://vborg.vbsupport.ru/showpost....2&postcount=23

All your menu links will need to be absolute instead of relative too.

cinq 05-10-2004 01:20 PM

I used your code :

PHP Code:

chdir('/usr/home/mydomain/www/forum');
require(
'./global.php'); 

But it still does not function properly, i am still getting js errors and images are not showing.
I have this .php file outside my forum directory too.

any help ?

caislander 05-10-2004 04:41 PM

Anybody,

I can't get phrases created via the phrase manager to show up? Any ideas what i might have done wrong ? here is the info in my template if it helps :)

As always Thanks for any assistance :0

airlinebuzz 05-20-2004 12:42 AM

I am trying to make a rather large template (950 lines of code), for a page using this "hack" and when I try to save and reload the template in the Control Panel it won't refresh like it saved and the changes don't load when I go to the page. Is there a maximum template size limit that I am bumping into?

airlinebuzz 05-23-2004 02:45 AM

bump

Skyline_GT 06-02-2004 12:29 AM

great:)
love it

SVTBlackLight01 06-02-2004 01:29 AM

Quote:

Originally Posted by cinq
I used your code :

PHP Code:

chdir('/usr/home/mydomain/www/forum');
require(
'./global.php'); 

But it still does not function properly, i am still getting js errors and images are not showing.
I have this .php file outside my forum directory too.

any help ?

All the js references in the headinclude template need to have an absolute path.

Code:

<script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_global.js"></script>
<if condition="$show['popups']"><script type="text/javascript" src="$vboptions[bburl]/clientscript/vbulletin_menu.js"></script></if>


Cold Steel 06-06-2004 07:10 PM

I'd like to do something a little different with this:

I have a PHP file as instructed, but I only want to include a header and footer (I've already set up templates for those). For the main page I want to include another page.

This is what I tried in the PHP file:

Code:

<snip>
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('extrapage_top') . '");');
include("extrapage_contents.html");
eval('print_output("' . fetch_template('extrapage_bottom') . '");');
?>

Except it only shows the information from the template extrapage_top.

It doesn't show extrapage_contents.html, nor does it show the code from the template extrapage_bottom.

What am I doing wrong?

SVTBlackLight01 06-07-2004 02:11 PM

Includes have to go in the phpinclude_start template. Use the example as a guide:

Code:

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();

All you have to add to your template is the variable for the page you want to include ($header in the example).

Cold Steel 06-08-2004 07:41 AM

Excellent - worked like a charm. Thanks!


All times are GMT. The time now is 05:25 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.01660 seconds
  • Memory Usage 1,746KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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