"Custom Archive" works wrong with "Start Page

Found a bug? Tell us!!
Post Reply
chessnut
Regular
Posts: 22
Joined: Wed Jul 18, 2007 9:57 am

"Custom Archive" works wrong with "Start Page

Post by chessnut »

I installed "Custom Archive"-Plugin and the "Start Page Category"-Plugin. Unfortunately, custom archive only shows entries of my "Initial view category", and not of all Categories.

I guess this must have something to do with the function "serendipity_fetchEntries" that the plugin uses, to get the entries.

Any suggestions how to fix that bug?

Thanks in advance.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: "Custom Archive" works wrong with "Start

Post by garvinhicking »

Hi!

Yes, many plugins will use your fixed start page category, unless you specify another category view. That's actually part of the concept -- if you use the custom archive view, you can override the category though, using the dropdown?

It's because startcat sets $serendipity['GET']['category'], which all other plugins and fetch methods use.

So it's not really a bug, but in your case a feature that's missing. However the issue at hand is conceptional, so if you change it to how you expect it, you will break it for other people who want to have the custom archive only filter what people see by default.

Regards,
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/
chessnut
Regular
Posts: 22
Joined: Wed Jul 18, 2007 9:57 am

Re: "Custom Archive" works wrong with "Start

Post by chessnut »

garvinhicking wrote: if you use the custom archive view, you can override the category though, using the dropdown?
Unfortunately, this doesn't work. If I select "Sort by category", it shows me only the "Initial view category", and that is meaningless. :(
garvinhicking wrote: It's because startcat sets $serendipity['GET']['category'], which all other plugins and fetch methods use.
Ah, thanks for the hint. So What would I have to do to override that value?
$serendipity['GET']['category'] = null;
?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: "Custom Archive" works wrong with "Start

Post by garvinhicking »

Hi!

What's the URL where you using it? I don't mean to sort by category, I was talking of picking a category to display?
Ah, thanks for the hint. So What would I have to do to override that value?
$serendipity['GET']['category'] = null;
Yes, you'd need to unset $serendipity['GET']['category'] in the case where the plugin creates its own output.

Regards,
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/
chessnut
Regular
Posts: 22
Joined: Wed Jul 18, 2007 9:57 am

Re: "Custom Archive" works wrong with "Start

Post by chessnut »

garvinhicking wrote:I don't mean to sort by category, I was talking of picking a category to display?
There is no such feature as "picking a category to display" by combobox.
garvinhicking wrote: Yes, you'd need to unset $serendipity['GET']['category']
Thanks, that worked perfectly!

I also added something, which I found useful: When the archive is ordered by category, the entries are now ordered by "e.timestamp DESC". This ordering resembles the natural ordering in the blog. And month and year is shown before the entry-title. (e.g. 03/2007:)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: "Custom Archive" works wrong with "Start

Post by garvinhicking »

Hi!
There is no such feature as "picking a category to display" by combobox.
Ah, you're right. I must've mixed this up with some other panel, but I don't know which plugin provided it, or if I'm hallucinating :)

Glad to read it worked with your patch!

Regards,
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/
Post Reply