vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   custom template (https://vborg.vbsupport.ru/showthread.php?t=145638)

XxBuLLeTz 04-24-2007 02:06 AM

custom template
 
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:
PHP Code:

$only['TEMPLATEPREFIX'] = 'Gorup Name'

For example:
PHP Code:

$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

Quote:

Originally Posted by Dismounted (Post 1237593)
Hook 'template_groups', insert:
PHP Code:

$only['TEMPLATEPREFIX'] = 'Gorup Name'

For example:
PHP Code:

$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

Quote:

Originally Posted by Dismounted (Post 1242907)
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:
PHP Code:

require_once('./global.php'); 

Add above (Change forum to your directory):
PHP Code:

chdir('./forum/'); 


XxBuLLeTz 05-07-2007 06:49 PM

Quote:

Originally Posted by Dismounted (Post 1243003)
Find:
PHP Code:

require_once('./global.php'); 

Add above (Change forum to your directory):
PHP Code:

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 Code:

<?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 Code:

<?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 :).


All times are GMT. The time now is 01:11 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.02082 seconds
  • Memory Usage 1,765KB
  • 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
  • (10)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete