Question about serendipity_fetchEntries
Posted: Wed Oct 25, 2006 11:43 pm
Sorry if this is a stupid question but I have not been able to figure it out as of yet. What is the field id for categories that are associated with an entry?
I am doing further parsing on the entries array and it would be very useful to find this out. Obviously I can get the selected entries by doing the following:
What is the field that holds the categories? I tried the obvious like $entry_val['category'] but it didn't do anything. Also I was reading in functions_entries.inc.php about how to pass serendipity_fetchEntries specified categories using $serendipity['GET']['category']. How do I actually utilize this? I am guessing the passing parameters are the category ids not the names correct? In my plugin I added:
but the results didn't change. Is this because I should be passing specific variables rather than the generic all? Any help would be greatly appreciated!
Thanks,
Evan
I am doing further parsing on the entries array and it would be very useful to find this out. Obviously I can get the selected entries by doing the following:
Code: Select all
$entries = array();
$entries = serendipity_fetchEntries('all');
foreach ($entries as $entry_val){
$id = $entry_val['id'];
$title = $entry_val['title'];
$body = $entry_val['body'];
$extended = $entry_val['extended'];
$author = $entry_val['author'];
}
Code: Select all
$catss = "1;2";
$serendipity['GET']['category'] == $catss;
$entries = serendipity_fetchEntries('all');
Thanks,
Evan