1
aharon
How to make RSSfit without having a fit..?
  • 2005/6/9 11:31

  • aharon

  • Not too shy to talk

  • Posts: 172

  • Since: 2004/9/17


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->grab0);
        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) > $ret false;
    }
}
?>



Thanks for any ideas...

Aharon

2
LazyBadger
Re: How to make RSSfit without having a fit..?

In common - read module's SQL-file, understand table structure <-> real data correlation...
There aren't common answers, only hints... But I wrote RSSFit plugins for most requested modules, with "write-try-edit" route

3
aharon
Re: How to make RSSfit without having a fit..?
  • 2005/6/9 13:23

  • aharon

  • Not too shy to talk

  • Posts: 172

  • Since: 2004/9/17


Quote:
"write-try-edit"


...that's a long route my friend... ;)

Which modules do you have RSSfit plugins for...?

Login

Who's Online

70 user(s) are online (40 user(s) are browsing Support Forums)


Members: 0


Guests: 70


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits