Templates from Database to File system .

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AbdelrahmanSalem
    New Member
    • Jun 2011
    • 10
    • 4.1.x

    [vB4] Templates from Database to File system .

    to get your Templates works in file system mode :


    1- create a templates called template_dump && chown noboy.users template_dump.

    2- turn on your debug mode
    $config['Misc']['debug'] = true;

    3- go to :https://FORUM_NAME.com/admincp/template.php?do=createfiles&dostyleid=your_active_style

    4 - move the template_dump under includes (mv template_dump includes/vb_templates) for security resoans J .

    5 - in includes/class_core.php --> vb_Templates class search for protected static function fetch_template($template_name)

    6- instead of DB fetch , you can file_get_contents (DIR. '/includes/vb_templates/'.$template_name.'htm');

    7- remark $config['Misc']['debug'] = true; and test your system

    now you have the templates as a file system , for style vars and that staff you can work on it in easy way
    Last edited by AbdelrahmanSalem; Mon 2 Apr '12, 4:47am.
    Software Engineer .
    Just remember : what happens in Localhost stays @localhost
  • thanhdat
    Member
    • Feb 2005
    • 79
    • 3.8.x

    #2
    It does not work in vB 4.2.3, can you check it? Thank you :-)
    Vui Ve Club - www.vuiveclub.net

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 74078

      #3
      You could never read your templates from the file system in 4.x. All this does is right out a copy to the file system. The system won't use them. If you want to store templates in the file system you need to use vBulletin 5. However storing them in the database normally leads to a faster response on most servers.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • thanhdat
        Member
        • Feb 2005
        • 79
        • 3.8.x

        #4
        I want read templates in the file system for creating my custom hacks or create new styles easier than editing templates in admincp.
        Vui Ve Club - www.vuiveclub.net

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...