serendipitypath vs. serendipityHTTPPath

Discussion corner for Developers of Serendipity.
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

serendipitypath vs. serendipityHTTPPath

Post 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);

:?:
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipitypath vs. serendipityHTTPPath

Post 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. ;)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: serendipitypath vs. serendipityHTTPPath

Post by Don Chambers »

Thanks Garvin. What is the difference between "serendipitypath" and "serendipityHTTPPath"?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipitypath vs. serendipityHTTPPath

Post by garvinhicking »

serendipityPath is the absolute directory path, serendipityHTTPPath the path for the browser URL.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply