![]() |
trying to use templates for something else
A little while back I posted a hack for grouping custom templates. I wanted to make an easy way to add new groups and thought that would be real easy.
I used phpmyadmin to insert a a new template called templategroups with a templateset id of -2 then I set the template field to $only['links'] = 'Links'; $only['eventcalendar'] = 'Event Calendar'; $only['activetopics'] = 'Active Topics'; then I wanted to grab that template info and stick it in template.php right after $only['vbcode'] = 'vB Code'; $only['whosonline'] = 'Who\'s Online'; $only['showgroup'] = 'Show Groups'; that way I could edit the template to add new groups without having to edit template.php again. i tried several variations of like these eval (gettemplate("templategroups")); gettemplate("templategroups"); gettemplate("templategroups",0); but nothing worked. could I get a little help here people? |
Because the templatesetid is -2 gettemplate() won't grab it, you need to use your own query:
Code:
$gettemplate = $DB_site->query_first("SELECT template FROM template WHERE title='templategroups' AND templatesetid=-2"); |
THAT DID IT!!
Thanks so much. I'll go write up some directions. |
:)
|
All times are GMT. The time now is 08:52 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:
|