Entry List?

Creating and modifying plugins.
MntlyNSane
Regular
Posts: 8
Joined: Wed Mar 21, 2007 2:19 pm

Entry List?

Post by MntlyNSane »

Is there any way to configure the side bar to list your categories, and when clicked it displays a list of the article titles instead of it displaying the full articles? Sort of like browsing through the Older archives list view.

The desired layout would be something like:

Entries For %cat%:
%date% - %title% - %cat% (optional) - %author% (optional)
%date% - %title% - %cat% (optional) - %author% (optional)
%date% - %title% - %cat% (optional) - %author% (optional)

Single line for each item would be a prefered view, instead of what the archive view does with the wrapping
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Entry List?

Post by garvinhicking »

Hi!

Do you mean something like:

http://blog.s9y.org/archives/2006/12/summary.html

?

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/
MntlyNSane
Regular
Posts: 8
Joined: Wed Mar 21, 2007 2:19 pm

Re: Entry List?

Post by MntlyNSane »

garvinhicking wrote:Hi!

Do you mean something like:

http://blog.s9y.org/archives/2006/12/summary.html

?

Regards,
Garvin
Similar, but I'd rather have it dump the entire list of all entries in a category, instead of just what month they are posted in.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Entry List?

Post by garvinhicking »

Hi!
Similar, but I'd rather have it dump the entire list of all entries in a category, instead of just what month they are posted in.
Oh, okay. I don't think there's a plugin for this yet, but it could be written.

As a base for this, you could check out the serendipity_event_customarchive plugin, this allows to configure specific options how to display something. You could tune it to your own needs by setting dateranges or the entry limit option, but that involves some PHP...

HTH,
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/
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Shouldn't the events be listed by date?

Post by randulo »

Sorry, I searched on entries and plugins and can't find anything other than this thread.

When entries are listed, I would have imagined they'd be listed in descending date order

January 22, 2007 This is a test
January 10, 2007 Some other test
etc
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Shouldn't the events be listed by date?

Post by garvinhicking »

Hi!

Serendipity_event_customarchive is available here: http://spartacus.s9y.org/index.php?mode ... s_event_en if you search for"serendipity_event_customarchive" that page.

HTH,
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/
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Re: Shouldn't the events be listed by date?

Post by randulo »

garvinhicking wrote: Serendipity_event_customarchive is available here: http://spartacus.s9y.org/index.php?mode ... s_event_en if you search for"serendipity_event_customarchive" that page.
Nice, in fact I'm using it somewhere else. I was referring to a sidebar plugin. The entries seem to be listed randomly. I'm sure I could go in and modify the php to add an order, but then upon update things would be messed up. I expected the deault behavior to be in date order.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Shouldn't the events be listed by date?

Post by garvinhicking »

Hi!

To which sidebar plugin are you referring?

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/
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Re: Shouldn't the events be listed by date?

Post by randulo »

garvinhicking wrote:Hi!

To which sidebar plugin are you referring?

Regards,
Garvin
"Recent entries: Shows the titles and dates of the most recent entries
version: 1.6"
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Shouldn't the events be listed by date?

Post by garvinhicking »

Hi!

In that plugin inside the SQL query of it, it says "ORDER BY timestamp DESC", so the entries should be ordered by their age descending. Maybe you can check the serendipity_Entries table and see if maybe the timestamps are not what they should be?

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/
randulo
Regular
Posts: 141
Joined: Thu Jul 21, 2005 10:28 am

Re: Shouldn't the events be listed by date?

Post by randulo »

garvinhicking wrote:ORDER BY timestamp DESC
Yes that should be right and corresponds with what I'd assume. I looked at the dates on the entries and they are in the right order. I'll look in the table and see in a bit.
jocelynaz
Regular
Posts: 27
Joined: Thu Mar 29, 2007 9:29 pm

Post by jocelynaz »

I too would LOVE a plug-in that would do this! I was just about to post a question on this exact same thing. Where, when someone clicks a category, they would be given a list of the entries for that category by TITLE, rather than having all the posts be shown in their entirety.

Just curuious...Is there anything in the works for this plug-in right now? Heheheh! I'm a bit anxious for this as this would make it much better to view previous posts in each category. :)

Thanks for your consideration!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi jocelynaz!

You do not need a plugin for this, you can already achieve this by templating.

Edit your entries.tpl, search for the place where {$entry.body} is displayed and change that to

Code: Select all

{if NOT is_array($category_info)}
{$entry.body}
{/if}
Now the entry body will only be printed when you are not browsing a category.

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/
jocelynaz
Regular
Posts: 27
Joined: Thu Mar 29, 2007 9:29 pm

Post by jocelynaz »

Thanks Garvin! This actually works great and is what I was looking for. However, the thing now is that I want posts on my frontpage to be shown in its entirety. I only want the posts by title under the "Categories" not necessarily on the frontpage. Is there a way to make some type of exception to those posts on the frontpage? Probably not, I'm thinking. But I figure I'd ask in case there is a way to do that. :)

THanks again for all of your help!! You're great a blessing!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You can also use the variable {$startpage} to detect if you are on the startpage or not. Combine that in your IF-query:

Code: Select all

{if NOT $startpage AND NOT is_array($category_info)}
...
{/if}
to see if that is what you need? You might need to change arround AND/OR and NOT/without NOT...

HTH,
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