vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How can I create template groups ? (https://vborg.vbsupport.ru/showthread.php?t=153247)

mihai11 07-24-2007 01:46 PM

How can I create template groups ?
 
1 Attachment(s)
Hi,

Please take a look at the attached image. As you can see, a style can contain templates & template groups.

Example of templates (from the attached image) are: "send_to_friend", "shell_blank", "spacer_close", "spacer_open", "TEST", "TEST2", "TEST3" etc.

Example of template groups are "Search templates", "Show groups templates", "Show thread templates", "Smilie popup templates", "Sunscribed threads templates" aso.

How can I define a group of templates ? I want to put all my templates in such a group. For example, I want to put "TEST", "TEST2", "TEST3" in a group called "TESTING".

Regards,
Razvan

Princeton 07-24-2007 01:58 PM

you will need to create a plugin

HOOK LOCATION: template_groups
TEXT: $only['template_prefix'] = 'TITLE OF GROUP';

FYI
- your templates should all have the same prefix eg. mytemp_threadbit, MYTEMP_SHELL, etc, etc
- you must add new templates to the MASTER STYLE

mihai11 07-24-2007 02:26 PM

Quote:

Originally Posted by Princeton (Post 1300200)
you will need to create a plugin

HOOK LOCATION: template_groups
TEXT: $only['template_prefix'] = 'TITLE OF GROUP';


FYI
- your templates should all have the same prefix eg. mytemp_threadbit, MYTEMP_SHELL, etc, etc
- you must add new templates to the MASTER STYLE

This is not complicated, but I hate to create a plugin just for this functionality. (currently, plugins are disabled on my board because my board is "clean" - no plugins or hacks)

I am thinking to use a common prefix.

Kirk Y 07-24-2007 06:07 PM

I'd hardly consider a board with plugins enabled "dirty". Properly used, Plugins are very efficient and safe.

squishi 09-05-2008 07:54 AM

I tried to do this in 3.7.3 and it did not group the templates.

Okay, got it working. For future reference:
The prefix should not include the underscore.


All times are GMT. The time now is 08:06 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.01073 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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