Thread: Administrative and Maintenance Tools - Automatic Template Compiler
View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01076 seconds
  • Memory Usage 1,772KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete