Page 1 of 1

serendipitypath vs. serendipityHTTPPath

Posted: Thu Feb 19, 2015 5:43 pm
by Don Chambers
I am going to make a small change to the freetag plugin which makes it respond more gracefully if a smarty template has been specified, but does not exist. Prior to making that change, I had a question..

Currently, I see this:

Code: Select all

$template = serendipity_getTemplateFile($template, 'serendipityPath');
Should that be

Code: Select all

$template = serendipity_getTemplateFile($template, 'serendipityHTTPPath', true);

:?:

Re: serendipitypath vs. serendipityHTTPPath

Posted: Thu Feb 19, 2015 9:07 pm
by garvinhicking
That depends whether that line occurs when being viewed in the frontend or backend.

If it's a line of code that gets executed in the backend, it needs the "true" flag to reference a frontend file.

If it's a line that only gets executed in the frontend, this parameter should not be necessary. I actually don't know by heart if it breaks something, possibly not, so adding it would never hurt, but that would need checking. Until then, I'd rather not add it, unless the code gets executed in the backend, in which case it would be required. ;)

Re: serendipitypath vs. serendipityHTTPPath

Posted: Thu Feb 19, 2015 9:22 pm
by Don Chambers
Thanks Garvin. What is the difference between "serendipitypath" and "serendipityHTTPPath"?

Re: serendipitypath vs. serendipityHTTPPath

Posted: Fri Feb 20, 2015 2:59 pm
by garvinhicking
serendipityPath is the absolute directory path, serendipityHTTPPath the path for the browser URL.