vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Template Importer (https://vborg.vbsupport.ru/showthread.php?t=42063)

Xenon 08-07-2002 10:00 PM

Template Importer
 
Version: 1.0

This miniaddon i've coded last night, for another hack i'm currently working on, but then i thought it might be usefull for quite more users so i release it seperatly.

What it does?
It's a small script you have to run from your Admin-CP. You can enter a filename of a *.tpl-file (Template file formate by me ;)) and it'll add the Template to the global template set.
As you can see this can be very usefull if you have a lot of template sets and want to add a new hack which comes a long with much templates....

If the template already exists, it'll ask you if the new one should overwrite the old.

Because the Addon adds templates to the global set, you have to rerun it with every template file again after you've done an upgrade.

Personally i made it just for installing new templates that comes within a new hack, it has nothing to do with a backupsystem. If you want to export templates and import them again later you should use this hack by FireFly.

I don't think i would add something to the hack, but feel free to make suggestions ;)

Zipfile contains:
tplimporter.php - the script (upload it to your admin folder)
tplimporter.txt - installation textfile and *.tpl file description
test.tpl - a *.tpl file so you can see how they should look ;)

Enjoy

Velocd 08-09-2002 12:07 AM

Where is everyone today? Xenon makes a hack hours ago, and nobody has replied yet? What is the world coming to!?!?!? =falls over=

Anyway, this hack looks really neat Xenon, although I don't think I'll ever be using anytime soon. *clicks install anyway* ;)

[D]Vincent 08-09-2002 06:12 AM

Great hack ^^ but I'm not installing it lol.

Neo 08-09-2002 06:19 AM

LOL guess not many people see a need for it.. if I used templates (coder joke) I would more so already have this installed. :)

Xenon 08-09-2002 03:08 PM

hey i know this i doable by just set debugmode to on and add templates manually to the global set, but there are always some ppl out there who don't want to change the debug value ;)

solent 04-25-2003 07:43 AM

me clicks install. some good hacks have a lot of templates to add and this hack will simply make your life easier on installing the hacks.

cool Xenon thanks

Dean C 04-25-2003 09:13 AM

Just remove the code from the index.php the stefan ;)

- miSt

Xenon 04-25-2003 11:21 AM

erm, i have absolutley no idea what you want to say?

as this is the second post of you like that today, i have to ask:
Are you drunk dean? :p

Dean C 04-25-2003 12:30 PM

No i have a piece of metal in my mouth which is hurting greatly lol ;)

You could change this code in admin/index.php:

PHP Code:

if ($debug==1) {
        
makenavoption("Download Set","template.php?action=downloadset","<br>");
        
makenavoption("Upload Set","template.php?action=uploadset","<br>");
        
makenavoption("Do <img> Tags","template.php?action=imgtags");


:)

- miSt

Xenon 04-26-2003 04:00 PM

it's not the same :)

i know that section, because it's the functionality which gave me the idea ^^

debug mode is always enabled on my testboard ;)

Chris M 04-26-2003 04:59 PM

Wow...

This looks great Stefan!:)

Everyone should use this;)

Satan

Fargo 01-27-2004 02:39 PM

Thank you Xenon - Ive got 6 template sets on my site and several hacks to install (each with several new templates to add) - this is gonna save me a LOT of time. You are a GOD! lol

[edit]

after reading up on this..
The .tpl scheme is fairly easy to work with, but is it possible to use the "new template" style system, where one can simply type in the template name in one box, then the contents of the template into the 2nd box & finally hit a submit button?

The way you have it setup right now will still save quite a bit of time, however, it still takes the time to create a new .tpl file, then read it into the page. Having the 2 box and submit button would save even more time if you install hacks that come with the template data in text files (example: copy & paste title then copy and paste body, then save, etc etc) (like shoutbox, quick reply, tutorial hack).

Just an idea :)

Xenon 01-27-2004 05:05 PM

well, sorry, but i don't work on any vb2 hacks anymore, as i have switched over to vb3 totally ;)

Fargo 01-27-2004 10:01 PM

np Xenon, thanks for the reply :)


All times are GMT. The time now is 07:44 PM.

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.01146 seconds
  • Memory Usage 1,743KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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