another minor patch
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: another minor patch
Don, I'm not into the code at the moment. I guess that probably there exists a way, or rather, the original solution has to be fixed. I'd like to wait to have Garvin confirm he had a look at it or go into the code myself/try to really understand the problem by trying to reproduce the issue.
Is there already an issue for this on github? If not and you want to help further with this, it would be great of you open one with a really short and concise description of the bug/missing feature.
Is there already an issue for this on github? If not and you want to help further with this, it would be great of you open one with a really short and concise description of the bug/missing feature.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: another minor patch
OK guys, here's what I found out:
Garvin
- $serendipityArchiveURL is a variable that gets assigned by serendipity_event_staticpage. It is *NOT* available in the core, and it is *NOT* available in every serendipity view. Thus, this variable is actually not even safe to rely on or to use *AT ALL*.
- Because of this, the variable is usually only used in the staticpage-entries-listing.tpl smarty file of the staticpage plugin, and there only to link to the first page of an entries listing.
- This is actually NOT the archive (singular!) that Don wants to link to, so to use this variable is wrong in TWO ways, not only in one way.
- Bottom of the line: What you want to use is to create a config.inc.php file for your template, do:
and then refer to that variable. For serendipity 2.0.1/2.1.0 I have added serendpity_rewriteURL as a smarty modifier, so that in the future you can do:
Code: Select all
$serendipity['smarty']->assign('archiveURL', serendipity_rewriteURL(PATH_ARCHIVE));
within a template, which will also make other URL paths available, too.Code: Select all
{$CONST.PATH_ARCHIVE|rewriteURL}
Garvin
# 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/
# 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/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact: