Calendar just won't show all categories

Creating and modifying plugins.
Post Reply
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Calendar just won't show all categories

Post by judebert »

I'm using the Start Category plugin, so my front page is only showing a subset of my entries. Even when I click the "All Categories" link in the Category sidebar, which is annoying. I figure I can live with it, if the calendar will let me link to all entries in a particular day.

SO, I went about modifying the calendar. I added a showAllCats variable, designed to make it show all categories, instead of only the current category. Where it sets up the $add_query, I modified the if statement to check $showAllCats first.

Before my change, only days with entries in the current category were highlighted on the calendar. Now, days for all entries, regardless of category, are highlighted on the calendar.

But when I click a day, only entries from the current category are displayed. If there are no entries, I get the "no entries" message, which could confuse any mere mortals who didn't realize I was mucking about in the code. (I delight in their incoherent thought: "...But the day was *highlighted*, there must be *something* here...") The link generated correctly; there's no C41.html at the end, just a <day>.html. (I have mod_rewrite enabled, too.)

So, do I need to completely rewrite the URL or something? How in the world could I manage that? $serendipity['uriArguments'] doesn't seem to contain the full list of args, and I don't know if I can change GET and POST. Besides, what would I do about mod_rewrite? Where is Serendipity figuring out that it needs to restrict all posts to this category, anyway?

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

Re: Calendar just won't show all categories

Post by garvinhicking »

The problem is simply that the Start Category plugin is interfering with what you plan to do - so it's not a problem within the core s9y. :)

It sets a category on all those pages, so you need to modify the startcat plugin to only set the category to your start category if no other archive dates are selected. You might want to check out the code I used to assign a staticpage frontpage and adapt that for the plugin?

If you don't want to get involved, I can take a look on that issue in a few days...

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

If I don't want to get involved? Heck, my hands are already dirty. I would ask to be added to your developer list, if I didn't know that as soon as I've got it working the way I want, you'll likely never see me again. :lol:
I'll check out that static frontpage plugin. I wasn't aware of its existence.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

:)

If you want, we can give you SVN/CVS access of course. Help is always appreciated and needed! :)

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