Recent Topics

1 Jan 30, 2008 01:00    

I'm basing a new plugin and widget on the existing linkblog widget.

The linkblog widget's disp_cat_item_list function has a variable, $linkblog_catsel, for explicitly stating what categories in the linkblog to display. I've set this array to ( 83, 72, 75 ).

After chasing down how this is passed around, I end up with a SQL statement in ItemsListList::query that has all three categories, yet the only one displayed is 72.

The SQL statement:

SELECT DISTINCT post_ID, post_datestart, post_datemodified, post_title, post_url, post_excerpt, post_urltitle, post_main_cat_ID, post_ptyp_ID
FROM T_items__item INNER JOIN T_postcats ON post_ID = postcat_post_ID INNER JOIN T_categories ON postcat_cat_ID = cat_ID
WHERE (cat_blog_ID = 10)
  AND (postcat_cat_ID IN (72,83,75) )
  AND (( post_ptyp_ID IS NULL
  OR post_ptyp_ID NOT IN (1000) ))
  AND ( ( ( post_status = 'private'
  AND post_creator_user_ID = 1 )
  OR post_status IN ('published','protected') ) )
ORDER BY post_main_cat_ID ASC, post_title ASC, post_ID ASC
LIMIT 100

Any ideas? Is it possibly in the Results class?

Thanks,

Cindy Rae

2 Jan 30, 2008 04:56

Never mind -- it was a problem with the data I was using to test the functionality. It can't show more than one category with links when the other categories to include don't have posts.

Once I included categories with posts for each, it worked.

That's what I get for not getting enough sleep!

Cindy Rae


Form is loading...