The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
<font color="darkgreen">How the heck do you create a template group? I searched the API docs and the site but nothing comes up.</font>
|
#2
|
||||
|
||||
![]()
in template_groups hook add..
$only['mytemplates'] = 'My Templates'; tips * prepend all your template names with "mytemplates" * save all templates in MASTER STYLE |
#3
|
||||
|
||||
![]()
But thats just it. I found this
https://vborg.vbsupport.ru/showthread.php?t=70165 which showed me that file to use and there is a hook there at the bottom Code:
($hook = vBulletinHook::fetch_hook('template_groups')) ? eval($hook) : false; Im sure there is a way but after that would having it as a plugin create an issue as its not really physically in the table? Thanks --------------- Added [DATE]1192423255[/DATE] at [TIME]1192423255[/TIME] --------------- Hmm, how about like this having the plugin use global_start. Code:
eval('$template_hook[template_groups] .= "' . array_push($only, 'item6' => $vbphrase['item6']) . '";'); |
#4
|
||||
|
||||
![]()
that article is a few years old, probably doesn't do it the same way.
You don't need any file edits, just name all your templates with the same prefix and create the plugin as Princeton said. |
#5
|
||||
|
||||
![]()
<font color="darkgreen">Yes, I didnt even notice that. Guess too many hours on the computer today lol.
What would be the hook to use for this plugin? global_start? or cache_templates or parse_tempaltes etc? I did name a few of my templates already like that and placed them in the User Control Panel Templates group with naming them usercp_blah but I now have to move them into this new group once the plugin is completed and I assume that will break some of my code in the php pages too. Oh well I guess I can fix it later. </font> |
#6
|
||||
|
||||
![]() Quote:
hook location is: "template_groups" under General Administration |
#7
|
||||
|
||||
![]()
Son of a ... I have been looking throughout all the templates groups looking for it. Guess I passed through the admin stuff thinking it would be somewhere else.
Now I am not sure whats going on but it removed my vBAdvanced tempalte group and they are all at parent level with no new template group that I specified. Is my code ok? Thanks ![]() --------------- Added [DATE]1192425307[/DATE] at [TIME]1192425307[/TIME] --------------- Code:
eval('$template_hook[template_groups] .= "' . array_push($only, 'testgroup' => 'Test Group') . '";'); --------------- Added [DATE]1192429143[/DATE] at [TIME]1192429143[/TIME] --------------- I checked out vBA's hook to see how they do it and theirs is like this... Code:
$only['adv_portal'] = $vbphrase['group_adv_cmps']; Code:
$only['test'] = 'Test'; ![]() --------------- Added [DATE]1192431724[/DATE] at [TIME]1192431724[/TIME] --------------- I got it working with the code that was similar to vBA but the template group never showed up until I modified one template that was eventually going to go into it. Guess the template group will not show unless there is at lease one template in it. Since thats the case, I wonder how you are supossed to do it without modifying the template record? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|