Show entries via JavaScript

Creating and modifying plugins.
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post by mcurley »

Silly question: Is the categoryid always a number? If so, does the number correspond to the order in which the categories are listed on the admin page?

For example, if I have the following categories listed in this order: News, Events, Urgent Requests.

Would News be 1, Events 2 and Urgent Requests 3?

Thanks.

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

Post by garvinhicking »

Hi!

Yes, its always a number. You can check the number on your blog, it should always be contained in the links, like "categories/17-yourcategory".

You mostly find the categoryid in URLs only.

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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post by mcurley »

Okay, I looked at the URLs in the blog to get the ids. Thanks. I want News=1, Events=2 and Urgent Requests=10 to show up.

Here's what mine looks like:

categoryid=1,2,10

But it's only showing entries from category 1.

Here's the entire script:

<script src="http://www.insidesevierheights.com/sere ... ")</script>

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

Post by garvinhicking »

Hi!

Ah, I'm sorry. The plugin did not accept multiple category IDs yet. I've patched it, so that it will now. You can download the updated PHP file here:

http://php-blog.cvs.sourceforge.net/*ch ... ackend.php

Then it should work. You might need to seperate the IDs with ";", if it doesn'T work with ","!

Another thing: You limit the number of items to "3" (num=3), but when the latest 3 items are in category 1, you won't see any item of category 2 for example, because you only get a total of 3 entries.

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/
mcurley
Regular
Posts: 18
Joined: Fri May 25, 2007 3:58 pm

Post by mcurley »

Perfect! Thanks so much.

It works with ";" between each ID.

MC
Post Reply