Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-08-29 00:52:23

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Get all images of a category and it's descendants

Okay, so I’m trying to make a simple image index plugin, for displaying thumbnails on my homepage.

  1. I know that by using getTree($imagecategory,“image”), I can get an array of all the descendents of an image category. But how can I write the db query so that it will look for the images?
  2. The current query is “$rs = safe_rows(“*”, “txp_image”,“category=’$imagecategory’ and thumbnail=1 order by name”);”.
  3. Anyone have suggestions/ideas/anything!?

Offline

#2 2004-08-29 01:20:18

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: Get all images of a category and it's descendants

okay, so I’ve gotten past this, mostly. however, when I have a query like

category=‘this’ or category=‘that’ and thumbnail=1

it’ll still take images w/o thumbnails… i’m not sure about the logic involved here.

Offline

Board footer

Powered by FluxBB