• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest [suggestion/bug?] Allow absolute paths for $config['development']['directory']

Mike Tougeron

Well-known member
#1
Would it be possible to allow absolute paths for $config['development']['directory'] ?

XenForo_Model_Template::getTemplateDevelopmentDirectory() line 459:
PHP:
if ( substr($config->development->directory, 0, 1) == '/' )
{
    return $config->development->directory . '/file_output/templates';
}
else
{
    return XenForo_Application::getInstance()->getRootDir() . '/' . $config->development->directory . '/file_output/templates';
}
 

Mike Tougeron

Well-known member
#3
you set the developer directory via absolut path.
Nope. The current code prefixes the setting with XenForo_Application::getInstance()->getRootDir(). I want the development directory to be *outside* of the rootDir and I didn't want to use '../../' :p
Yeah, I'm working on a patch for this as well so that it saves off every change someone makes so that we can save it into git. Working on another add-on that'll import templates for you as part of a "publish" process.
 
R

ragtek

Guest
#4
Nope. The current code prefixes the setting with XenForo_Application::getInstance()->getRootDir(). I want the development directory to be *outside* of the rootDir and I didn't want to use '../../' :p
Sorry:D you're right. That's the standard behaviour in xf. I've forgotten that i changed this too.
 

Jeremy

Well-known member
#5
Nope. The current code prefixes the setting with XenForo_Application::getInstance()->getRootDir(). I want the development directory to be *outside* of the rootDir and I didn't want to use '../../' :p

Yeah, I'm working on a patch for this as well so that it saves off every change someone makes so that we can save it into git. Working on another add-on that'll import templates for you as part of a "publish" process.
I like this. Do you plan to release this?
 

Jeremy

Well-known member
#7
Probably not. Depends on how 1.1.0-b3 works (I haven't had a chance to test it yet) since that allows you to use templates directly from the file system.
I don't have a link on hand, but I know Kier said it is compiled versions, so we can't utilize it to send templates to something via git, and have the <xen: syntax written and such. Something like this would be very useful for me. :)