Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Anyone use Smarty?

  • 18-11-2009 12:55PM
    #1
    Registered Users, Registered Users 2 Posts: 1,086 ✭✭✭


    I've inherited a site which uses smarty and I'm trying to edit the pages. When I edit the .tpl files an error comes up.

    How do I edit smarty template pages? I've had a look on smarty.net but at a quick glance can't find anything. Need to get this problem sorted asap.


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I'm going to move this over to the design forum, you're bound to get an answer over there.


  • Registered Users, Registered Users 2 Posts: 2,119 ✭✭✭p


    Evil Phil wrote: »
    I'm going to move this over to the design forum, you're bound to get an answer over there.
    It's a development question though, not really a design one. I've heard of Smarty but I can tell you that it's mainly developers who know anything about it.


  • Registered Users, Registered Users 2 Posts: 1,086 ✭✭✭Peter B


    The page I am editing is http://tipoff.ie/users/userLogin.php

    As soon as I make any change to the userLogin.tpl page, even if it is just to insert a space (which should make no difference to the code at all). I get the following error.

    ***********************************************************
    Fatal error: Smarty error: unable to write to $compile_dir '/var/www/vhosts/tipoff.ie/httpdocs/smarty/demo/templates_c'. Be sure $compile_dir is writable by the web server user. in /var/www/vhosts/tipoff.ie/httpdocs/smarty/libs/Smarty.class.php on line 1095
    ***********************************************************


  • Closed Accounts Posts: 267 ✭✭waitinforatrain


    There's some setup you have to do for Smarty. If the error is right you probably have to FTP into the site, and CHMOD (change permissions) on the /var/www/vhosts/tipoff.ie/httpdocs/smarty/demo/templates_c folder to make it writeable.

    I've only mucked around with it, but I think there's an option in the config file where it will cache files and only try to compile them into a more efficient format in a different folder whenever it detects changes in a file.

    I may be totally confusing this with Drupal though now that I think of it.

    I need to sleep!


  • Registered Users, Registered Users 2 Posts: 1,086 ✭✭✭Peter B


    There's some setup you have to do for Smarty. If the error is right you probably have to FTP into the site, and CHMOD (change permissions) on the /var/www/vhosts/tipoff.ie/httpdocs/smarty/demo/templates_c folder to make it writeable.

    I've only mucked around with it, but I think there's an option in the config file where it will cache files and only try to compile them into a more efficient format in a different folder whenever it detects changes in a file.

    I may be totally confusing this with Drupal though now that I think of it.

    I need to sleep!

    Thanks. I had already tried to change the permissions to 755 but that didn't work. Seems to work when I changed the permissions to 777.

    Thanks for the help!


  • Advertisement
Advertisement