Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Automatic Template Compiler Details »»
Automatic Template Compiler
Version: 1.00, by Adrian Schneider Adrian Schneider is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

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.
2 благодарности(ей) от:
Hoffi, xorex

Comments
  #82  
Old 06-03-2008, 12:11 AM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to bad it's such a pain to paste all the text in google cause i cant read german
Reply With Quote
  #83  
Old 06-03-2008, 12:23 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #84  
Old 06-03-2008, 06:13 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wooo hooooo. New toys.

Thanks for the pointer.

-- hugh
Reply With Quote
  #85  
Old 08-13-2008, 04:23 PM
vertigo jones vertigo jones is offline
 
Join Date: May 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

I can post it here if SirAdrian doesn't mind.
Reply With Quote
  #86  
Old 09-06-2008, 12:19 AM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What would be awesome for it to do, is work how the release builder / devtools does.

When you export your product (in this case style), it creates the appropriate XML from the templates listed on the file system.

for theme dev, you would have something like..

ForumRoot / ThemeDev / MyThemeName / Templates
ForumRoot / ThemeDev / MyThemeName / CSS
ForumRoot / ThemeDev / MyThemeName / Whatever

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.
Reply With Quote
  #87  
Old 09-06-2008, 09:22 AM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sweede View Post
What would be awesome for it to do, is work how the release builder / devtools does.

When you export your product (in this case style), it creates the appropriate XML from the templates listed on the file system.

for theme dev, you would have something like..

ForumRoot / ThemeDev / MyThemeName / Templates
ForumRoot / ThemeDev / MyThemeName / CSS
ForumRoot / ThemeDev / MyThemeName / Whatever

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.

  1. Unpack and Upload files in the upload directory
  2. Create the templates directory in the forum root. Make sure that this folder is writable by the webserver.
  3. Install the VDE product file
  4. 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)
  1. 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.
  2. 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).
  3. 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.
  1. Create a new directory in the templates directory.
  2. 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.
Reply With Quote
  #88  
Old 02-26-2009, 03:24 AM
armkbdotcom's Avatar
armkbdotcom armkbdotcom is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For off-line template editing and more you can check vBProductManager development environment. One screenshot from program's help file:



Cheers
Reply With Quote
  #89  
Old 09-26-2009, 09:06 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Guys,

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.
Reply With Quote
  #90  
Old 09-22-2014, 11:22 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wish this could work on vb4, tried it, but no luck!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05136 seconds
  • Memory Usage 2,301KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete