Version: 1.00, by Adrian Schneider
Developer Last Online: Nov 2022
Category: Administrative and Maintenance Tools -
Version: 3.7.0 Beta 4
Rating:
Released: 02-12-2008
Last Update: 02-12-2008
Installs: 82
Uses Plugins
Additional Files Is in Beta Stage
No support by the author.
Development Tool: Automatic Template Compiler
Requirements: PHP 5, vBulletin 3.5+
Summary: Allows you to edit HTML files directly instead of using the AdminCP template editor. ATC will automatically update the database if any changes are detected. This is intended for a development environment only, and will only run while in debug mode.
Why: Template development is a huge PITA because of how templates are stored in the database - they are compiled. This means you cannot simply save a file, or update the database, because vBulletin needs to compile them first, and maybe even update the style cache. This saves TONS of time copy pasting and switching between your editor, your page, and the vBulletin template editor box.
How it works: ATC maintains a checksum (md5 hash) of each template body, and when it finds that one is out of sync with your working copy, it will save that template automatically in a very efficient manner. It updates both the template about to be displayed in memory and also the real copy in the database.
It also includes a very basic import utility so you can copy your existing templates into the filesystem for easy editing.
How to use it: Follow the install instructions, and then whenever you edit a file, the changes will transfer to vBulletin itself.
This was written in PHP 5 (OO) and I have no plans to make it work with PHP 4, but I may eventually build an interface to manage the settings, but for developers, configuring it should be no problem.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
LOL. Don't think that I do. You just have to figure it out by trial and error. So far, the release builder, the phrase type manager, the add phrase, the product builder which inserts the entire database queries for you in your product are my favorites
Using what SirAdrian has in his SVN, I wrote a layer to make it work with plugins and (I think) didn't break anything with the template editing, though I'm only using one style so it's difficult to test thoroughly. There are likely a few bugs in it, so I could use some help testing it.
and if you wanted to change/update/modify the postbit template, you create in the Templates directory postbit.tpl and add the appropriate template information.
The plugin would then pick this new template file up and use it over the default master postbit.
and if you wanted to change/update/modify the postbit template, you create in the Templates directory postbit.tpl and add the appropriate template information.
The plugin would then pick this new template file up and use it over the default master postbit.
Ok, so i hacked some of this up real quick, for anyone still using this and interested.
Unpack and Upload files in the upload directory
Create the templates directory in the forum root. Make sure that this folder is writable by the webserver.
Install the VDE product file
Open up your config.php file and add $config['Misc']['debug'] = true; near the end of the file.
Unsure if products that allow you to turn debug mode on/off work with this product.
If you wish to run this on a live server (your own risk!!!) , you should add an if() statement around the debug variable so that only you will see the theme changes, so you dont break your forum.
From here you have two options,
Export an existing template (Requires chmod'ing files / directories)
In the AdminCP go to the vbulletin Options -> VDE and change Watch Templates Config to the style you wish to update. YOu pretty much will always have "./templates, %, 0, x" where x is the style id you're updating. DO NOT USE -1 for the master template, it can do bad things.
AFTER You change the Watch Templates config option, click save to update the config. After updating the config you can export the current modified templates to the file system by checking the box and hitting save (It will automaticly unset).
The files created in the templates directory may or may not be writable. you will have to chmod the created directories / files so that they are writable via FTP for you.
Create New Template style for modifcation.
Create a new directory in the templates directory.
Create a new Style with the same name as the directory, the name must be IDENTICAL, Including Capital letters and spacing. Naming the directory first will help figure out special characters you can and cant use.
Adding new Modifications to your style.
Simple create files in your new template directory that have the exact same name as the template you wish to replace. For example, if you want to make a new postbit for your MyTheme style, you would create templates/MyTheme/postbit.html
When you browse to your forums to check your theme, VDE will read the postbit.html file and update the database with your new file.
The Screenshots attached should show you a little bit of what to look for.
I'm looking through and seeing how i can hack CSS support that it would write out a CSS file that can be imported in some fashion back to the database.
I have been doing a ton of vBulletin mods lately and not having this stuff fully implemented is killing me, so I will be further developing this ASAP.
The new system I'm working on has two components:
1) Runtime loading of project data (templates, plugins, phrases, etc.)
2) Product XML builder - probably with CLI support and Web support
There will be a ./projects directory, and each project is a directory under it. Project folders will contain a templates, plugins, phrases, etc. dir for the relevant content. A lot of it will be taken from what I had in SVN, and some new.
I am taking a different approach on the runtime component: instead of checking for changes and rebuilding everything, I'm just loading it into memory so nothing ever gets imported into the database. After a lot of thinking, I have concluded that it's not necessary and is going to cause way too much overhead for larger projects.
On a side note, I will not be using SourceForge for the new code - it will be on a public git (github) repo instead.