vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Creating Template Categories? (https://vborg.vbsupport.ru/showthread.php?t=116874)

Reven 05-27-2006 10:13 PM

Creating Template Categories?
 
I've searched a bit, but I've not found anything to do with this, as I don't exactly know what keywords to look for.

How do I go about grouping custom templates together within a template 'category'? So for instance currently in the Style Manager for any style we get 'Forum Home Templates', and within this we get various templates to do with the forum home. How would I group templates together under a name such as the example - 'Forum Home Templates'?

e.g.

Before expaning:

Custom Templates >>

After expanding:

Custom Templates <<
---- Custom Template 1
---- Custom Template 2
---- Custom Template 3

I've seen it done with v3arcade and vBadvanced CMPS, but I can't find a way of doing it...

Cheers.

Adrian Schneider 05-27-2006 10:17 PM

I don't understand...

Grouping them? or having it more recursive?

Rich 05-27-2006 10:19 PM

I think he wants to group his custom templates.

Adrian Schneider 05-27-2006 10:19 PM

Anyway, if you just want to group some custom templates, create a plugin using the template_groups hook...
PHP Code:

// for adding one group:
$only['your_prefix'] = 'Your Group Title';

// For Multiple Groups
$only array_merge($only, array(
    
'prefix_A' => 'Title A',
    
'prefix_B' => 'Title B'
)); 

Note that it automatically adds "Templates" onto the end of your title.

Reven 05-29-2006 01:31 PM

Is there something I need to do to get it to work, simialr to rebuilding the bitfields after adding ACP sidebar links, or should it work instantly?

peterska2 05-29-2006 01:56 PM

It should work next time you open your style manager.

Reven 05-31-2006 06:41 PM

Ah, turns out that if you have an underslash at the end of the array level like so:

PHP Code:

$only['your_prefix_'] = 'Your Group Title'

It doesn't work. I guess that's logical.

Thanks, guys.


All times are GMT. The time now is 11:46 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.02014 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)bbcode_php_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