vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding Pages (https://vborg.vbsupport.ru/showthread.php?t=83091)

Charged 06-14-2005 08:49 PM

Adding Pages
 
Just wondered if there is an easy way to add pages using the same style as done on the forum

Can I just make a template called "page1" for example in the customer template area and then simply link to page1.php and it come up?

Also if that is possible as the froum is in a subfolder of domain.com/forum/ would that page link from domain.com/forum/page1.php or can I have it be domain.com/page1.php

or even better domain.com/page1/index.php ?

So I basically want to be able to add bits like $header and $footer to other pages to make page creation that bit easier.

I'd also like to be able to make the main domain.com use a forum marked news to have a news posting on the front page, any hints tips or where to look for help would be appreciated

And I just realised this should have been in the questions forum, so if someone wants to move it there ;]

Andreas 06-15-2005 04:06 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=62164</a>

Except the WOL part, it's still the same in vBulletin 3.5

Charged 06-16-2005 11:06 PM

cheers Kirby looks like its just what i was after ;]

dsotmoon 10-11-2005 05:38 PM

is there a way to do this outside the forum directory?

Andreas 10-11-2005 05:49 PM

Yes.
require_once('/path/to/forum/global.php');

dsotmoon 10-11-2005 06:16 PM

this is what i have but i cant get it to work outside the forum directory

Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test.php'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
   
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'test',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('/home/fullsize/public_html/forum/global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'Test Page';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('test') . '");');

?>


Adrian Schneider 10-11-2005 06:18 PM

PHP Code:

chdir('/path/to/forums');
require_once(
'./global.php'); 


dsotmoon 10-11-2005 06:27 PM

Quote:

Originally Posted by SirAdrian
PHP Code:

chdir('/path/to/forums');
require_once(
'./global.php'); 


ok, that got me a little closer...

outside the forum ... edit

inside the forum ... edit

the latter looks exactly the way i want it to look outside the forum, both are using the same 'test' template

Andreas 10-11-2005 06:30 PM

You must adjust the path for the CSS.

dsotmoon 10-11-2005 06:44 PM

Quote:

Originally Posted by KirbyDE
You must adjust the path for the CSS.

thank you Kirby and sirAdrian, got it working perfectly now

thanks again!


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