vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Template Group (https://vborg.vbsupport.ru/showthread.php?t=170231)

John3971 02-11-2008 04:20 PM

Template Group
 
hey i have made a plugin with some templates in it and i wonder how i can get thoose template into a group that i name and not be a single template.

Opserty 02-11-2008 06:10 PM

AdminCP > Plugins & Products > Add New Plugin

Hook Location: template_groups
PHP Code:
PHP Code:

$only['tempprefix'] = 'Some Template Group'

tempprefix is the prefix of the templates e.g. you could have

tempprefix_somepageone
tempprefix_somepagetwo
tempprefix_somepagethree

and they will all appear under the template group "Some Template Group".

Or you can see the 2nd half of this article, I think its essentially the same as what I have posted above. Manage Templates

John3971 02-24-2008 08:31 PM

i don?t really understand i can?t get it to work.
if i wan?t this templates:
vBNews
vBNews_addnews
vBNews_newsbits
vBNews_singlenews
vBNews_printnews
vBNews_editnews
vBNews_commentbits
vBNews_commentbox


in a template group named vBNews how do i fix that?

i tried this:

$only['vBNews'] = 'vBNews';
$only['vBNews_commentbits'] = 'vBNews';
$only['vBNews_commentbox'] = 'vBNews';
$only['vBNews_editnews'] = 'vBNews';
$only['vBNews_newsbits'] = 'vBNews';
$only['vBNews_printnews'] = 'vBNews';
$only['vBNews_singlenews'] = 'vBNews';

with the title "vBNews Template Group" and active in product vbnews

MoT3rror 02-24-2008 11:58 PM

You only need
PHP Code:

$only['tempprefix'] = 'vBNews'


John3971 02-25-2008 06:45 AM

Quote:

Originally Posted by MoT3rror (Post 1450354)
You only need
PHP Code:

$only['tempprefix'] = 'vBNews'


a ok thanks. gonna try it.

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

it still doesn?t work.

Opserty 02-25-2008 02:19 PM

No, no, no. tempprefix is the template prefix and the string is the template name (i.e. the work for it.
PHP Code:

// A default vB template:
$only['showthread'] = 'Showthread';

// Your one:
$only['vBNews'] = 'vBNews';

/**
 * If that doesn't work you may need to try:
 * $only['vbnews'] = 'vBNews';
 */ 


John3971 02-25-2008 03:34 PM

Quote:

Originally Posted by Opserty (Post 1450714)
No, no, no. tempprefix is the template prefix and the string is the template name (i.e. the work for it.
PHP Code:

// A default vB template:
$only['showthread'] = 'Showthread';

// Your one:
$only['vBNews'] = 'vBNews';

/**
 * If that doesn't work you may need to try:
 * $only['vbnews'] = 'vBNews';
 */ 


i tried the second and it worked. thanks..


All times are GMT. The time now is 11:51 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.00997 seconds
  • Memory Usage 1,736KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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