Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

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
  #72  
Old 05-22-2008, 08:47 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for the elite? You watch the elections too much LOL
Reply With Quote
  #73  
Old 05-23-2008, 01:24 AM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mod was pretty easy to use i thought, and i am the average joe coder.

In the SVN sources, i had to add a vbb plugin to the product so that you could export templates to the proper directory. I think i might have spent maybe 30 minutes looking through the source to figure out what and how to do anything i needed.

I do agree though that there is a pretty big importance on documentation, but it's also obvious that the original author posted more of a proof of concept product rather than a complete tool that can be used with little understanding as to why it works. I have thought of taking the SVN code and building upon it to complete his work, but my skill in object languages isnt up to the task at this time.
Reply With Quote
  #74  
Old 05-25-2008, 01:56 AM
Guest190829
Guest
 
Posts: n/a
Default

A tool that does this for plugins would be a god send. *drools* just thinking about it, and phrases too! Not having to deal with the phrase manager one at a time...*drools more*
Reply With Quote
  #75  
Old 05-28-2008, 01:00 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been trying to find resources to teach myself php's object programming ways so i can figure out what the original author has done and apply a similar method to the plugin system but i end up playing world of warcraft or watching Chef Gordon Ramsay on hulu.com or something :|

Although, who ever creates a working system to edit plugins via text file v.s. the plugin editor will hold the mod of the month spot for quite some time
Reply With Quote
  #76  
Old 06-01-2008, 05:54 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sweede View Post
Although, who ever creates a working system to edit plugins via text file v.s. the plugin editor will hold the mod of the month spot for quite some time
What I do for plugins during development is simply require a file with my actual code in it, like ...

PHP Code:
require(DIR  '/cheesegrits/somehack/plugin.global_start.php'); 
This has two advantages ...

1) I can use my regular PHP editor on the code itself.

2) I can use xdebug (i.e. step through the code, enable breakpoints, etc), which you can't do with directly eval'ed code.

Once the code is ready for release, I just paste it into the plugin and get rid of the require.

-- hugh
Reply With Quote
  #77  
Old 06-01-2008, 06:11 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Danny.VBT View Post
Not having to deal with the phrase manager one at a time...*drools more*
Andreas released an ajax "Add New Phrase" on vbulletin-germany that does just that. Extremely useful.
Reply With Quote
  #78  
Old 06-01-2008, 06:25 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hugh / Anthony,

You are welcome to take it over and extend it to plugins and phrase. I think phrases is already done though, just kinda slow with this method.
Reply With Quote
  #79  
Old 06-02-2008, 07:54 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So how do we go about getting access to this mod thread? I'd rather keep it in place than create a new one.

-- hugh
Reply With Quote
  #80  
Old 06-02-2008, 11:57 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel View Post
Andreas released an ajax "Add New Phrase" on vbulletin-germany that does just that. Extremely useful.
I just jumped over there and i gotta admit, i'm highly impressed with his work. It takes a bit of work to get things worked out because right now it's all in german, but it's well worth the effort.

Andreas method is to create a folder, /addondev/pluginname/plugins or /addondev/pluginname/template and for the plugins, your filename is simply the hook that it belongs to. the name of the template is just that (with .tpl at the end).

When you refresh/visit your site, it loads up the data thats stored on the disk. When you export your product for distribution it reads all of the data from the disk and adds it to the xml file.

I created a plugin w/the name of my domain that i've placed extra templates such as custom templates for vbadvanced pages and modified style templates and it all works as expected.
Reply With Quote
  #81  
Old 06-03-2008, 12:03 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a wealth of developer's tools over there
Reply With Quote
Reply


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 05:42 AM.


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.04962 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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_php
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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