Re: Recherche Plug-ins Smartpartner pour Rssfit | Titre du sujet : Re: Recherche Plug-ins Smartpartner pour Rssfit par machenzy sur 08/04/2008 18:29:42
En fait, j'ai changé de méthode Voici quelque chose qui fonctionne :
<?php
// $Id: rssfit.wfdownloads.php 72 2005-11-12 05:09:33Z tuff $
###############################################################################
## RSSFit - Extendable XML news feed generator ##
## Copyright (c) 2004 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> & ... nbsp; ##
###############################################################################
## XOOPS - PHP Content Management System ##
## Copyright (c) 2000 XOOPS.org ##
## <http://www.xoops.org/> ... nbsp; ##
###############################################################################
## This program is free software; you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation; either version 2 of the License, or ##
## (at your option) any later version. ##
## ##
## You may not change or alter any portion of this comment or credits ##
## of supporting developers from this source code or any supporting ##
## source code which is considered copyrighted (c) material of the ##
## original comment or credit authors. ##
## ##
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
## along with this program; if not, write to the Free Software ##
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
###############################################################################
/*
* About this RSSFit plug-in
* Author: machenzy <http://www.applis-portables.net/>
* Requirements (Tested with):
* Module: SmartPartner <http://http://www.smartfactory.ca/>
* Version: 2.0 rc1
* RSSFit verision: 1.21
* XOOPS version: 2.0.17 / 2.2.3
*/
if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
class Rssfitsmartpartner extends XoopsObject{
var $dirname = 'smartpartner';
var $modname;
var $module;
var $grab;
function Rssfitsmartpartner(){
}
function loadModule(){
$mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
if( !$mod || !$mod->getVar('isactive') ){
return false;
}
$this->modname = $mod->getVar('name');
$this->module =& $mod;
return $mod;
}
function &grabEntries(&$obj){
global $xoopsDB;
$myts =& MyTextSanitizer::getInstance();
$perm_handler =& xoops_gethandler('groupperm');
$ret = false;
$i = 0;
$sql = "SELECT id, title, last_update, summary, status FROM ".$xoopsDB->prefix("smartpartner_partner")." WHERE status = 2 ORDER BY last_update DESC";
$result = $xoopsDB->query($sql, $this->grab, 0);
while( $row = $xoopsDB->fetchArray($result) ){
$ret[$i]['title'] = $row['title'];
$link = XOOPS_URL.'/modules/'.$this->dirname.'/partner.php?id='.$row['id'];
$ret[$i]['link'] = $ret[$i]['guid'] = $link;
$ret[$i]['timestamp'] = $row['last_update'];
$ret[$i]['description'] = $myts->displayTarea($row['summary']);
$ret[$i]['category'] = $this->modname;
$ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
$i++;
}
return $ret;
}
}
?>
voili voilou
|
|