1
Hi,
There's a tutorial on how to make RSSfit plugins to work with, theoretically, any other module - but that tutorial seems a bit confusing.
The example bellow is with mylinks..
* How do I know which databases needed to be queried with other modules?
*
.$xoopsDB->prefix("mylinks_text")." t WHERE l.status > 0 AND l.lid = t.lid ORDER BY date DESC"
seems to be matched with mylinks module - how can it be matched with other modules?
function grabEntries(&$obj){
global $xoopsDB;
$ret = array();
$i = 0;
// The following example code grabs the latest entries from the module MyLinks
$sql = "SELECT l.lid, l.cid, l.title, l.date, t.description FROM ".$xoopsDB->prefix("mylinks_links")." l, ".$xoopsDB->prefix("mylinks_text")." t WHERE l.status > 0 AND l.lid = t.lid ORDER BY date DESC";
$result = $xoopsDB->query($sql, $this->grab, 0);
while( $row = $xoopsDB->fetchArray($result) ){
$link = XOOPS_URL.'/modules/'.$this->dirname.'/singlelink.php?cid='.$row['cid'].'&lid='.$row['lid'];
/*
* Required elements of an RSS item
*/
// 1. Title of an item
$ret[$i]['title'] = $row['title'];
// 2. URL of an item
$ret[$i]['link'] = $link;
// 3. Item modification date, must be in Unix time format
$ret[$i]['timestamp'] = $row['date'];
// 4. The item synopsis, or description, whatever
$ret[$i]['description'] = $row['description'];
/*
* Optional elements of an RSS item
*/
// 5. The item synopsis, or description, whatever
$ret[$i]['guid'] = $link;
// 6. A string + domain that identifies a categorization taxonomy
$ret[$i]['category'] = $this->modname;
$ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
$i++;
}
return count($ret) > 0 ? $ret : false;
}
}
?>
Thanks for any ideas...
Aharon