Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2008, 06:49 PM
gemmo gemmo is offline
 
Join Date: Dec 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 01-05-2008, 07:00 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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.
Reply With Quote
  #3  
Old 01-05-2008, 08:04 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Slightly newer version: https://vborg.vbsupport.ru/showthread.php?t=98009
Reply With Quote
  #4  
Old 01-08-2008, 12:36 PM
gemmo gemmo is offline
 
Join Date: Dec 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']
Reply With Quote
  #5  
Old 01-08-2008, 02:45 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:52 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.05171 seconds
  • Memory Usage 2,198KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete