PDA

View Full Version : How to add your own template group


Logikos
04 Oct 2004, 08:09
If you would like to keep your AdminCp Area nice and clean like i do and are looking for a way to group all those custom templates that say arcade_XXXX all over the place, well lets put them in its own group.

Open includes/adminfunctions_template.php

Scroll ALL the way to the bottom and you will see the following:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Above the 'aaa' => 'AAA Old Backup' You can place your groups name.

For instance if you installed the arcade hack all there templates say:

arcade_blah
arcade_blah
arcade_blah
arcade_blah

Then you would add the following above 'aaa' => 'AAA Old Backup':



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Then you would add a new phrase call arcade_hack_templates with the text Arcade Hack Templates.

Now the 'arcade => part means which templates are we going to put in this group. And only the templates that start with arcade. and the $vbphrase['arcade_hack_templates'] part is the name of the catogory/group your templates will be under.

So now you should be able to make your own. Hope this is usefull for new hackers! :)

You can download the tutorial in a .txt format below.

nexialys
04 Oct 2004, 12:01
Hum... Live_Wire.. this was released months ago.. ;)

Logikos
04 Oct 2004, 20:02
Well i did a search in the Modification Hints and Tips forum and couldn't find anything.

nexialys
04 Oct 2004, 21:56
hum.. ya... i know... someone moved it...

AnhTuanCool
04 Oct 2004, 22:02
That's okay, I saved it Live Wire :)

Dean C
04 Oct 2004, 22:15
Thanks for posting this up Ken - hopefully it'll help a few people :)

Logikos
04 Oct 2004, 22:27
Thanks everyone, got a few more usefull ones i'll be posting.

Revan
07 Oct 2004, 00:46
Well, it wont ever work ;)


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Syntax Error Heaven ;)


Plus, vBulletin automatically suffixes the phrases (be they vb'ed or not) with "Templates", so yours would read "Arcade Hack Templates Templates", if you included "Templates" in the vbphrase you add
:)

Logikos
07 Oct 2004, 01:21
ahh small typo with the ' opps. fixed.

DS MrSinister
01 Nov 2004, 17:32
i cant get this to work for me. For some reason.

KW802
01 Nov 2004, 18:16
Now if somebody could only get the "adv_portal" templates do do that for vBa CMPS I'd be happy. :p

Logikos
01 Nov 2004, 18:44
Now if somebody could only get the "adv_portal" templates do do that for vBa CMPS I'd be happy. :p
Thats not hard, if you read the first post you will know how to do that.

Find:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Below Add:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Add new phrase:
vbadvanced_cmps_templates
vBadvanced CMPS Templates

Done!

KW802
01 Nov 2004, 18:49
Thats not hard, if you read the first post you will know how to do that. <snip>Actually, mine already looks like.....

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


If the code you posted on your site is working to group the CMPS templates then I must've screwed something else up somewhere.

Knowing how to do it isn't the problem..... why it isn't working is. ;)

DS MrSinister
01 Nov 2004, 19:35
thanks for the help.. now i Just can't get the adv_portal templates to move. Like the ones i have added.

any ideas on it?

Natch
04 Nov 2004, 02:44
I get this problem sas well, but others with the same hack installed have it working (/me points @ Boofo and Dark_Wizard) ... so I dunno what it is: the file mods are the same...

venomx
25 Feb 2005, 10:08
This works on some but not others. Not sure why...

squawell
25 Feb 2005, 11:59
This works on some but not others. Not sure why...
agree that...sometimes works but sometimes not ...so strange:ermm:

deathemperor
25 Feb 2005, 13:59
it works for most of the cases, the only time I saw it doesn't work is when using for adv_portal. all of else works for me.

teamgofast
27 Feb 2005, 16:03
this is a great tip, cleans things up nicely, now what to do with the custom adv_portal templates?

macooper
27 May 2005, 23:33
I just tried this for the geek article system, and it didn't work. However, I noticed that all the templates started 'GAS_', so I used the code



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



which turned out to be the problem. Even though the templates started in uppercase, I had to list the filter phrase in lowercase like this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Then everything worked as expected. As it wasn't obvious to me that I should always use lowercase for the filter, I thought I'd add this note.

zetetic
30 May 2005, 08:26
Regarding it not working with the adv_portal templates, Brian at vBadvanced said in this post (http://www.vbadvanced.com/forum/showthread.php?t=3757) that because of the way vBulletin handles things, new templates won't be grouped with the others. Maybe they'll have this fixed in 3.5...

craiovaforum
25 Feb 2009, 22:51
Heh, it's version 3.8 and almost 4 years passed without any changes. This is a big issue for boards like mine with alot of modifications and templates that start with adv_portal.

Wired1
02 Apr 2009, 21:07
Heh, it's version 3.8 and almost 4 years passed without any changes. This is a big issue for boards like mine with alot of modifications and templates that start with adv_portal.

I'd guess you could do this with the hook that now exists (untested):
if (class_exists('vBulletinHook'))
{
($hook = vBulletinHook::fetch_hook('template_groups')) ? eval($hook) : false;
}

Just make a plugin that appends a line to the end of the afforementioned array?

ChrisHasenpflug
09 Aug 2009, 00:24
I'd guess you could do this with the hook that now exists (untested):

Just make a plugin that appends a line to the end of the afforementioned array?

Yup, you can. Make a plugin for the "template_group" hook as follows:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Just did this, and it works.