The Arcive of vBulletin Modifications Site. |
|
trying to use templates for something else Details »»
|
|||||||||||||||||||||||||
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? Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
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");
eval($gettemplate['template']);
|
|
#3
|
||||
|
||||
|
THAT DID IT!!
Thanks so much. I'll go write up some directions. |
|
#4
|
||||
|
||||
|
![]() |
|
|