Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Templates in files (useful for development) Details »
Templates in files (useful for development)
Mod Version: 1.0.0, by cermi (Member) cermi is offline
Developer Last Online: May 2010 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.8 Rating: (1 vote - 3.00 average) Installs: 6
Released: 12 Feb 2008 Last Update: Never Downloads: 54
Not Supported Uses Plugins Re-usable Code Translations  

Hi devs/designers, did you get tired with modifying templates in vB admincp? I did, so I made this mod, which enables you to store files in [forum_root]/!templates/[tempate_name].html so you can edit them with your favourite HTML editor and you dont have to put them back into admincp after each edit.

Warning:
This mod is for dev purposes only and because the templates are compiled every time you reload the page, it slowes down the forums a bit (nothing significant on dev machine, but significant on production machine with many users).

Enjoy it and gimme feedback

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 12 Feb 2008, 19:14
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Real name: Tim Eason
Cool! I've been thinking that a mod that will export/import the individual templates at text files would be great, but this seems like it would be even better!

Just so I understand -- You enable this mod and work on the HTML files -- Then disable it so that VB will use the templates and NOT the HTML files -- Is that right?
Reply With Quote
  #3  
Old 12 Feb 2008, 19:19
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Is there any way to modify this to store template as files only and not have them re-compiled? Chen did a hack way back in vb 3 something, I think, that stored the template as files just so you had a backup copy of them in case the forum went bye-bye somehow. More for archival purposes.
Reply With Quote
  #4  
Old 12 Feb 2008, 20:06
cermi's Avatar
cermi cermi is offline
 
Join Date: Jun 2007
Originally Posted by ChurchMedia View Post
Just so I understand -- You enable this mod and work on the HTML files -- Then disable it so that VB will use the templates and NOT the HTML files -- Is that right?
Yes, just don't forget to copy the content of the html files to vB templates in admincp otherwise your vB templates wouldn't be changed.

The idea of the mod is simple:
after loading the templates from database by vB, it reads all the files in the !template folder and rewrite the templates in $vbulletin->templatecache

Originally Posted by ChurchMedia View Post
Cool! I've been thinking that a mod that will export/import the individual templates at text files would be great, but this seems like it would be even better!
Yea, I might add this feature too (in future), so you won't have to make the initial database->files and final files->database copy. (But 2 copies are still better than copy after each change )
__________________
Cermi also known as Aralyon
Webdeveloper of http://www.supremel2.com
Reply With Quote
  #5  
Old 12 Feb 2008, 20:09
cermi's Avatar
cermi cermi is offline
 
Join Date: Jun 2007
Originally Posted by Boofo View Post
Is there any way to modify this to store template as files only and not have them re-compiled? Chen did a hack way back in vb 3 something, I think, that stored the template as files just so you had a backup copy of them in case the forum went bye-bye somehow. More for archival purposes.
Well, you rewrite the template system, which wouldn't too difficult.
But for backup purposes you can use the standard vB export/import style feature, can't you?
__________________
Cermi also known as Aralyon
Webdeveloper of http://www.supremel2.com
Reply With Quote
  #6  
Old 12 Feb 2008, 20:23
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
I just want to back up the templates. All of them.
Reply With Quote
  #7  
Old 12 Feb 2008, 20:37
cermi's Avatar
cermi cermi is offline
 
Join Date: Jun 2007
Originally Posted by Boofo View Post
I just want to back up the templates. All of them.
Or backuping the template table in db?
__________________
Cermi also known as Aralyon
Webdeveloper of http://www.supremel2.com
Reply With Quote
  #8  
Old 12 Feb 2008, 20:41
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Ok, I can see where this is going. A simple "no" would have sufficed.
Reply With Quote
  #9  
Old 15 Dec 2008, 21:54
Remi Remi is offline
 
Join Date: Nov 2001
Is this working on 3.8.0

I have installed it, but I can't see any files or errors

nothing is happening at all
Reply With Quote
  #10  
Old 03 Apr 2010, 23:21
Sparky McSmith Sparky McSmith is offline
 
Join Date: Dec 2009
Wow. This is beautiful!!! Seriously. Great work Cermi - a simple, elegant solution to one of the biggest annoyances when customizing styles.

FYI - this works for vBulletin 4.0 just fine.

Thanks again!
Reply With Quote
  #11  
Old 05 Apr 2010, 19:25
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Real name: Barry
Cermi,

Please test this on 4.0 and post it there too!

Thanks!
Reply With Quote
  #12  
Old 12 Aug 2010, 11:33
benaya benaya is offline
 
Join Date: Apr 2007
Thanks man its working for vBulletin 4...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 00:15.

Layout Options | Width: Wide Color: