vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Organize your templates! (https://vborg.vbsupport.ru/showthread.php?t=63519)

magnus 04-05-2004 10:00 PM

Organize your templates!
 
If you're like me, you like to try to keep your board as organized as possible. Which, is why the following little tip comes in handy for hacks that add a dozen or so custom templates. (ie. vBindex, v3arcade, etc..)

In includes/adminfunctions_template.php:

Find:
PHP Code:

    'subscription' => $vbphrase['group_paid_subscriptions'], 

Add BELOW:
PHP Code:

    'XXprefixXX' => 'XXtitleXX'

Change "XXprefixXX" to whatever the template prefixes are, for example, the Arcade templates all begin with "arcade", so, you would put "arcade" as the prefix.

Change "XXtitleXX" to what you want the category to be called, don't add "Templates" to the name, because vB will do that for you. For example, if you put "arcade" as the title, it will read "Arcade Templates" in the Edit Templates section.

Get it? Good. :)

magnus 04-06-2004 01:56 AM

Err.. this should be in Modification Hints and Tips, could a moderator please move it for me? :)

Link14716 04-06-2004 03:21 AM

Quote:

Originally Posted by magnus
Err.. this should be in Modification Hints and Tips, could a moderator please move it for me? :)

Although technically it is a mini-mod as well, heh. ;)

Red Blaze 04-06-2004 04:15 AM

Ahh, now it looks less painful to see all those templates. Thanks! ^_^

Fi_InCogNiTo 04-06-2004 04:25 AM

Wow, beautiful tip there!

As my wife says, so small, but damn it's so usefull!!!

/me clicks install

Red Blaze 04-06-2004 04:55 AM

Quote:

Originally Posted by Fi_InCogNiTo
so small, but damn it's so usefull

that.... that sounds wrong man. o.O; I blame my perverted mind, yet I know what you mean...... but still *shivers*

SVTBlackLight01 04-06-2004 06:11 AM

That's a great tip. I have definately found it useful and think this step should be added to any hack with multiple new templates.

BarBeQue 04-06-2004 08:32 AM

Fine mod!

Been looking for a way to accomplish this, now i found it :D

[high]* BarBeQue will click install tonite, when he's home and actually installed it.....[/high]

PixelFx 04-06-2004 09:59 AM

very nice, to do the same in vb2 was painful, hehe this is so easy !!

BarBeQue 04-06-2004 06:50 PM

[high]* BarBeQue clicked install
[/high]

:D worked like a charm!

Mijae 04-06-2004 07:27 PM

Quote:

Originally Posted by BarBeQue
[high]* BarBeQue clicked install
[/high]

:D worked like a charm!

I requested this but no one answered :P This is great!

paddysplace 04-07-2004 02:15 AM

I was just asking for this a few hours ago in #vborg. Thank you SO much! I will definitely put this in my hacks (crediting you of COURSE!)

Regards,
Patrick

FleaBag 04-07-2004 04:41 PM

Small - but very handy. Cheers. :D

Boofo 04-07-2004 06:02 PM

If adding this code so templates can be grouped, won't this cause the templates to be erased on a vb upgrade?

magnus 04-07-2004 08:02 PM

Quote:

Originally Posted by Boofo
If adding this code so templates can be grouped, won't this cause the templates to be erased on a vb upgrade?

No, I don't think so. They are still classified as "custom templates" by vB. If you "revert" them, they will still be deleted. This doesn't change any of their SQL flags, as that's where vB determines what gets replaced during an upgrade.

gmarik 04-08-2004 05:39 PM

great idea, really coold

Synicide 05-12-2004 09:22 PM

Well, I hope they don't get deleted, because I'm jumping into this hack anyway. :D

[high]* Synicide jumps on the install button.[/high]

attroll 05-23-2004 03:02 PM

Let me see if I get this right. I installed this mod and this is what I put in the "'articles' => 'articles'," in my adminfunctions_template.php. Everything seemed to work fine.

But my question is:
When I create a new template now how do I get it listed under ARTICLES?
Do I have to name the new template articles_test?

Onkel_Tom 06-03-2004 10:11 AM

works fine, thanks !
click install

mtha 06-03-2004 06:31 PM

Quote:

Originally Posted by magnus
Change "XXtitleXX" to what you want the category to be called, don't add "Templates" to the name, because vB will do that for you. For example, if you put "arcade" as the title, it will read "Arcade Templates" in the Edit Templates section.

Get it? Good. :)

well, this is good, but ... I'd like to group the "custom templates" or "custom groups" in one place, so I dont need to go though the whole list of templates to find the custom ones. Tor example, I am grouping some xzy_ templates, as xzy, and prefer them to be displayed on top, or still in Cumstom Templates group.

dunno if it's posible.

Lurk 06-20-2004 05:33 PM

this is very useful! :D

i'm happy today

ImportPassion 06-25-2004 12:56 AM

Quote:

Originally Posted by mtha
well, this is good, but ... I'd like to group the "custom templates" or "custom groups" in one place, so I dont need to go though the whole list of templates to find the custom ones. Tor example, I am grouping some xzy_ templates, as xzy, and prefer them to be displayed on top, or still in Cumstom Templates group.

dunno if it's posible.

ya be cool to have these now custom groups at the top since they are still custom

Erwin 06-25-2004 01:02 AM

Cool tip. :) I like my custom templates separated, so I won't actually install this, but will still say that this is a simple yet useful mod.

Mr. Brian 06-26-2004 01:09 AM

Nice one! Thanks for sharing. :)

GamerzWorld 06-26-2004 08:16 AM

Great hack :)

Princeton 06-29-2004 11:24 PM

nice tip:up:

y2krazy 08-29-2004 11:57 PM

/me clicks install!

Revan 08-30-2004 12:58 PM

[high]* Revan clicks install
[/high]

Great hack, it always pissed me off that the Arcade templates didnt get their own group ;)
Actually I think I will use this to group the RPG Templates in future versions :)

sv1cec 11-19-2004 07:28 AM

Just make sure that the phrase you enter for the prefix is in lowercase letters. If it is in caps (even if they appear to be caps in the template name), it doesn't work for some reason.

I had some templates which started with "ActivationEmail" and I had to enter "activationemail" for it to work.

Rgds
---------------
John

PennylessZ28 11-25-2004 04:56 PM

Awesome Information, it helps to know. Thanks.

N8 12-24-2004 04:16 AM

With over 100 custom templates on my board, I've wanted to know how to do something like this for a while, it really makes things easier. THANKS :D

[high]* N8 clicks install[/high]

exTracT 01-13-2005 04:03 PM

nice

ChrisBaktis 01-20-2005 12:53 AM

I cant get this to work.

I added 'chris' => 'chris',

and then added a template called 'chrisindex' and this doesnt make any new catagory at all.

moethelawn 01-20-2005 12:59 AM

Quote:

Originally Posted by ChrisBaktis
I cant get this to work.

I added 'chris' => 'chris',

and then added a template called 'chrisindex' and this doesnt make any new catagory at all.

I think you need a _ between chris and index. (like chris_index). But if you want chrisindex... you'll need to have it as:
Code:

'chrisindex' => 'chrisindex'

or even

'chrisindex' => 'chris',

Cause vB will look at the name before the _

Hope that helps :)

ChrisBaktis 01-20-2005 01:08 AM

For some reason I am just stumped.

New Code

'chris_trade' => 'trade_pages_chris',

My attempt here is to have a bunch of templates named 'chris_trade_XYZ' under the catagory Trade Pages Chris Templates

According to the directions my code should be right with a template called 'chris_trade_index' falling under trade pages chris templates'

Maybe Im tired but im lost for some reason on this.

ChrisBaktis 01-20-2005 01:38 AM

got it - thanks

S@NL - BlackBik 03-03-2005 09:02 PM

Thanks a lot, I was looking for a way to do this :)


All times are GMT. The time now is 04:06 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
  • Page Generation 0.01194 seconds
  • Memory Usage 1,785KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (37)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete