1
bjuti
Publisher RSSFit plugin
  • 2010/10/9 8:18

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


I've tried, but failed. Maybe there is another way, but this is my working solution:

In modules/publisher/include/common.php add this at the bottom:
// Creating the item handler object
$publisher_item_handler =& xoops_getmodulehandler('item'PUBLISHER_DIRNAME);

// Creating the category handler object
$publisher_category_handler =& xoops_getmodulehandler('category'PUBLISHER_DIRNAME);


^ Taken from smartsectionm so the plugin is the same, just replaced smartsection with publisher:

<?php
// $Id: rssfit.publisher.php 244 2006-07-20 08:41:42Z tuff $
###############################################################################
##                RSSFit - Extendable XML news feed generator                ##
##                Copyright (c) 2004 - 2006 NS Tai (aka tuff)                ##
##                       <http://www.brandycoke.com/>                        ##
###############################################################################
##                    XOOPS - PHP Content Management System                  ##
##                       Copyright (c) 2000 XOOPS.org                        ##
##                          <https://xoops.org/>                          ##
###############################################################################
##  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: tuff <http://www.brandycoke.com/>
* Requirements (Tested with):
*  Module: publisher <http://www.smartfactory.ca/>
*  Version: 1.0.4 Beta 2 / 1.1 Beta 1 / 1.05 Beta 1
*  RSSFit verision: 1.2 / 1.5
*  XOOPS version: 2.0.13.2 / 2.2.3
*/

if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
class 
Rssfitpublisher{
    var 
$dirname 'publisher';
    var 
$modname;
    var 
$grab;
    
    function 
RssfitPublisher(){
    }
    
    function 
loadModule(){
        
$mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
        if( !
$mod || !$mod->getVar('isactive') ){
            return 
false;
        }
        
$this->modname $mod->getVar('name');
        return 
$mod;
    }
    
    function &
grabEntries(&$obj){
        
$ret false;
        include 
XOOPS_ROOT_PATH."/modules/publisher/include/plugin.tag.php";
        
$items $item_handler->getAllPublished($this->grab0);
        if( 
false != $items && count($items) > ){
            for( 
$i=0$i<count($items); $i++ ){
                
$ret[$i]['link'] = $ret[$i]['guid'] = $items[$i]->getItemUrl();
                
$ret[$i]['title'] = $items[$i]->getVar('title''n');
                
$ret[$i]['timestamp'] = $items[$i]->getVar('datesub');
                
$ret[$i]['description'] = $items[$i]->getVar('summary');
                
$ret[$i]['category'] = $this->modname;
                
$ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
            }
        }
        return 
$ret;
    }
}
?>


and save it as/in modules/rss/plugins/rssfit.publisher.php

2
oilkp
Re: Publisher RSSFit plugin
  • 2010/12/10 5:41

  • oilkp

  • Just popping in

  • Posts: 23

  • Since: 2010/6/30


Thank you for this

Now i can add publisher rss to Facebook

using the default publisher/backend.php is not working

https://xoops.org/modules/newbb/viewtopic.php?post_id=333403#forumpost333403


Login

Who's Online

159 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

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

Latest GitHub Commits