The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Quote:
I get some of this but not the "wrap blocks of code" part. what code? BTW this is a question about this hack/mod: https://vborg.vbsupport.ru/showthread.php?t=98009 |
|
#2
|
||||
|
||||
|
bump
|
|
#3
|
||||
|
||||
|
The blocks of code are whatever you want displayed in the even that request is issued.
For example, I made a Rules page that contains my site's Legal Policy, Privacy Policy, and the Forum Rules. Code:
// Grab template for legal information
if ($_REQUEST['do'] == 'legal')
{
eval('print_output("' . fetch_template('rules_legal') . '");');
}
// Or grab template for privacy
elseif ($_REQUEST['do'] == 'privacy')
{
eval('print_output("' . fetch_template('rules_privacy') . '");');
}
// Template for main rules page if no 'do' statement
else
{
eval('print_output("' . fetch_template('rules_siterules') . '");');
}
Hope that helps. |
|
#4
|
||||
|
||||
|
Thanks!
Is there a way that you can view the page name? example: First custom page : Rules A sub page in rules: Copyright Policy could you make it so somone could type in yoursite.net/copyright.php rather than the rules.php?do=copyright ? Thanks for your help. |
|
#5
|
||||
|
||||
|
Just make a custom page called copyright.php like is done in the Custom Page Tutorial.
|
|
#6
|
||||
|
||||
|
I ment as a sub page.
|
|
#7
|
||||
|
||||
|
Code:
// Grab template for legal information
if ($_REQUEST['do'] == 'copyright')
{
eval('print_output("' . fetch_template('copyright_template') . '");');
}
// Template for main rules page if no 'do' statement
else
{
eval('print_output("' . fetch_template('rules_template') . '");');
}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|