View Full Version : custom template
XxBuLLeTz
04-24-2007, 02:06 AM
is there anyway i can create groups for custom templates...i would want it to be named leagues and then have registration, participants, etc, under that group.
ill do an example..
FORUMHOME TEMPLATES >> (when you click that, this comes up:
FORUMHOME HOME
FORUMHOME_event
FORUMHOME_forumbit
etc.
I want to know how to make a group like FORUMHOME TEMPLATES...execpt i want mine to be called leagues, and when you click that, other custom templates pop up.
XxBuLLeTz
04-25-2007, 09:46 PM
bump
XxBuLLeTz
04-28-2007, 06:24 PM
some1 help me!
Dismounted
04-29-2007, 12:45 PM
Hook 'template_groups', insert:
$only['TEMPLATEPREFIX'] = 'Gorup Name';
For example:
$only['test'] = 'Test';
That would show any template prefixed with test (ie. test_event) under the heading 'Test Templates'.
XxBuLLeTz
05-06-2007, 11:28 PM
Hook 'template_groups', insert:
$only['TEMPLATEPREFIX'] = 'Gorup Name';
For example:
$only['test'] = 'Test';
That would show any template prefixed with test (ie. test_event) under the heading 'Test Templates'.Thanks alot. How would I add more than one template to the group?
I have one more question. Is there anyway I can create a custom page that doesnt have to be on the root directory.
Dismounted
05-07-2007, 06:05 AM
1./ Just add templates with test_ prefix.
2./ Yes, change all ./'s to ../
XxBuLLeTz
05-07-2007, 09:56 AM
1./ Just add templates with test_ prefix.
2./ Yes, change all ./'s to ../I dont understand what you mean by change all ./'s to ../
Im using this hack, https://vborg.vbsupport.ru/showthread.php?t=62164 so where would i add the the file thats not in the directory?
Dismounted
05-07-2007, 12:07 PM
Find:
require_once('./global.php');
Add above (Change forum to your directory):
chdir('./forum/');
XxBuLLeTz
05-07-2007, 06:49 PM
Find:
require_once('./global.php');
Add above (Change forum to your directory):
chdir('./forum/');that didnt work for me...could you show me an example...
just say the template name is: main
and the file name is: gowboards.com/tournaments/main.php
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // 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('./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') . '");');
?>
thanks...I really appreciate it.
Dismounted
05-08-2007, 07:48 AM
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // 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 ############################
chdir('../');
require_once('./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') . '");');
?>
Sometimes, common sense comes into play :).
XxBuLLeTz
05-09-2007, 02:16 AM
yay! I got it...but theres only one problem...the images arent coming up. (and the links arent working)
Dismounted
05-09-2007, 07:05 AM
You'll need ABSOLUTE links to images, the style manager is your friend.
XxBuLLeTz
05-09-2007, 10:01 AM
You'll need ABSOLUTE links to images, the style manager is your friend.yea, i got taht for the images...is there something like that for the links, b/c the only way I see you can do it is by editing every single template. Is there anyway you can direct every link to an absolute link.
Dismounted
05-09-2007, 11:32 AM
Style Manager > Edit Style Settings
Note that this only works if your style uses the inbuilt variables for images.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.