vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Create new page (https://vborg.vbsupport.ru/showthread.php?t=167036)

gemmo 01-05-2008 06:49 PM

Create new page
 
Hi, I'm looking for the code to create a separate page with vB header, footer, CSS etc, that will contain my site's Terms and Conditions. I want to link to it from the navbar, and I've found the code to do that, but not how to create the actual page.

Is there a recent thread that dealt with this, I only found one that was nearly 4 years old?

SEOvB 01-05-2008 07:00 PM

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

Old, but still works.

Opserty 01-05-2008 08:04 PM

Slightly newer version: https://vborg.vbsupport.ru/showthread.php?t=98009

gemmo 01-08-2008 12:36 PM

Thanks guys. Could I just check a couple of things with you.

First change: define('THIS_SCRIPT', 'test');

Do I just change 'test' to the name of my new page, or do I have to change 'THIS_SCRIPT' to anything too?

Second change:

// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_mytesttemplate1') . '");');

I'm lost on this bit. Which template should I use? What I want is to create a page for my Terms and Conditions that looks just like all the other vB pages.

Thanks v much for your help...

--------------- Added [DATE]1199803581[/DATE] at [TIME]1199803581[/TIME] ---------------

OK, I read on... I'm guessing I don't need to change 'THIS_SCRIPT', just 'test'. And then it shows me how to make the template.

But if this section tells you where to put it, I'm stuck here: 'Using vBulletin-powered scripts outside vBulletin Directory'. 1) ie which directory do I FTP the file and the template to?

2) Where do I find this code: require_once('./global.php'); ?

3) And where would I find any relative links: Also, make sure you add the following code in the beginning of any relative links:

Code:

$vbulletin->options['homeurl']

Opserty 01-08-2008 02:45 PM

1) Templates are stored in the database... AdminCP > Styles & Templates > Style Manager > Add New Template.

2) No sure what you mean by "where do I find this code"...
Use this in place of what you said:
PHP Code:

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

3) It refers to any file locations you use in script, just try it without if it doesn't work then try it with it.

You'll learn more through trial and error then anyone can teach you ;)


All times are GMT. The time now is 01:13 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.00963 seconds
  • Memory Usage 1,720KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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