No announcement yet.

Templates from Database to File system .

  • Filter
  • Time
  • Show
Clear All
new posts

  • [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 :

    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, 5:47am.
    Software Engineer .
    Just remember : what happens in Localhost stays @localhost

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


    • #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


      • #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 -


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