![]() |
I was getting my templates ready to upgrade to 2.2.2 and I came up with this idea. vbLinks set it's templates as part of the default set and needed to be changed over to custom templates.
the default templates are seperated into groups, but when you make a bunch of custom templates, wouldn't it be nice to have them be grouped as well? Anyway, it was really easy. open template.php and scroll down to the "Start Modify" section you'll see $only['calendar'] = 'Calendar'; $only['emailsubject'] = 'Email Subject'; etc. they are set up like this $only['**begining of template title**'] = '**Group Title**'; name your template something like links_firsttemplate links_secondtempate then with all the other $only[*] lines add $only['links'] = 'vbLinks'; links is the begining of all the links templates and vbLinks is the title for the group of templates maybe later I'll make a admin cp form to add the group titles but for now just add them to template.php just making these changes would make the new groups show up under the default templates, but to make them appear in the custom section find PHP Code:
PHP Code:
thats it. now your custom template will be grouped as well. whats real nice is say you added some custom templates that should be grouped with the default ones like new error message, postbit, or getinfo templates, they will not only get grouped with that group name under custom templates, but when you expand the default postbit templates, the custom postbit templates will be expanded as well. If I missed something let me know. |
Nice idea. I was wondering about this the other day. Thanks for sharing the hack, I look forward to installing and using it shortly.
|
Well done, Mutt! My template listings are so much cleaner now. :)
|
screen shot!
|
OK, here's a screen shot. I didn't think you'd need one. it looks just like the Default templates are organized
|
Evil's Advocate question: does it work with FireFly's TBS hack ?
I make an extensive use of it and wouldn't create uncompatibilities... ;) Thnx |
Quote:
I'm gonna install this hack myself soon (since I pretty much have more custom templates than default... I think ;)). Oh, and I think it's Devil's advocate. ;) :) |
Working great, good hack. :)
|
It appears that if you group the last template under a category the category is not closed and this what happens (attached).
I couldn't care less but just thought I'd let you know. :) |
Quote:
MisTYPO! Actually I didn't realize that groups are built only at displaying time... Though they where folders of templates... ;) Sorry for such a silly question Thnx |
All times are GMT. The time now is 11:19 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|