Announcement

Collapse
No announcement yet.

Templates from Database to File system .

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • thanhdat
    replied
    I want read templates in the file system for creating my custom hacks or create new styles easier than editing templates in admincp.

    Leave a comment:


  • Wayne Luke
    replied
    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.

    Leave a comment:


  • thanhdat
    replied
    It does not work in vB 4.2.3, can you check it? Thank you :-)

    Leave a comment:


  • AbdelrahmanSalem
    started a topic [vB4] Templates from Database to File system .

    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.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X