1
oilkp
Publisher rss not working in 2.5.0
  • 2010/11/28 10:03

  • oilkp

  • Just popping in

  • Posts: 23

  • Since: 2010/6/30


Hi

I have another publisher installation in another xoops site using 2.4.5

and its working fine..same setup

but not in xoops 2.5.0

this is publisher backend.php
/*
 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.
 */

/**
 * @copyright       The XUUPS Project http://sourceforge.net/projects/xuups/
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         Publisher
 * @subpackage      Action
 * @since           1.0
 * @author          trabis 
 * @author          The SmartFactory 
 * @version         $Id: backend.php 0 2009-06-11 18:47:04Z trabis $
 */

include_once dirname(__FILE__) . '/header.php';

error_reporting(0);
$GLOBALS['xoopsLogger']->activated false;

include_once 
XOOPS_ROOT_PATH '/class/template.php';
if (
function_exists('mb_http_output')) {
    
mb_http_output('pass');
}

$categoryid = isset($_GET['categoryid']) ? $_GET['categoryid'] : -1;

if (
$categoryid != -1) {
    
$categoryObj $publisher->getHandler('category')->get($categoryid);
}

header('Content-Type:text/xml; charset=' _CHARSET);
$tpl = new XoopsTpl();
$tpl->xoops_setCaching(2);
$tpl->xoops_setCacheTime(0);
$myts MyTextSanitizer::getInstance();
if (!
$tpl->is_cached('db:publisher_rss.html')) {
    
$channel_category $publisher->getModule()->name();
    
// Check if ML Hack is installed, and if yes, parse the $content in formatForML
    
if (method_exists($myts'formatForML')) {
        
$xoopsConfig['sitename'] = $myts->formatForML($xoopsConfig['sitename']);
        
$xoopsConfig['slogan'] = $myts->formatForML($xoopsConfig['slogan']);
        
$channel_category $myts->formatForML($channel_category);
    }
    
$tpl->assign('channel_charset'_CHARSET);
    
$tpl->assign('channel_title'htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
    
$tpl->assign('channel_link'PUBLISHER_URL);
    
$tpl->assign('channel_desc'htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
    
$tpl->assign('channel_lastbuild'formatTimestamp(time(), 'rss'));
    
$tpl->assign('channel_webmaster'$xoopsConfig['adminmail']);
    
$tpl->assign('channel_editor'$xoopsConfig['adminmail']);

    if (
$categoryid != -1) {
        
$channel_category .= " > " $categoryObj->name();
    }

    
$tpl->assign('channel_category'htmlspecialchars($channel_category));
    
$tpl->assign('channel_generator'$publisher->getModule()->name());
    
$tpl->assign('channel_language'_LANGCODE);
    
$tpl->assign('image_url'XOOPS_URL '/images/logo.gif');
    
$dimention getimagesize(XOOPS_ROOT_PATH '/images/logo.gif');
    if (empty(
$dimention[0])) {
        
$width 140;
        
$height 140;
    } else {
        
$width = ($dimention[0] > 140) ? 140 $dimention[0];
        
$dimention[1] = $dimention[1] * $width $dimention[0];
        
$height = ($dimention[1] > 140) ? $dimention[1] * $dimention[0] / 140 $dimention[1];
    }
    
$tpl->assign('image_width'$width);
    
$tpl->assign('image_height'$height);
    
$sarray $publisher->getHandler('item')->getAllPublished(100$categoryid);
    if (
is_array($sarray)) {
        
$count $sarray;
        foreach (
$sarray as $item) {
            
$tpl->append('items',
                         array(
'title' => htmlspecialchars($item->title(), ENT_QUOTES),
                               
'link' => $item->getItemUrl(),
                               
'guid' => $item->getItemUrl(),
                               
'pubdate' => formatTimestamp($item->getVar('datesub'), 'rss'),
                               
'description' => htmlspecialchars($item->getBlockSummary(300true), ENT_QUOTES)));
        }
    }
}
$tpl->display('db:publisher_rss.html');
?>


is there any change should i make to make it work in 2.5.0?

I have updated the publisher module several times


2
Mamba
Re: Publisher rss not working in 2.5.0
  • 2010/11/28 10:11

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


What is not working? What errors, if any, are you getting?

We need to know more details. What PHP version etc. will help as well.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
ghia
Re: Publisher rss not working in 2.5.0
  • 2010/11/28 10:19

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


To see errors with debugging (show HTML source) comment out these lines:
// error_reporting(0);
// $GLOBALS['xoopsLogger']->activated = false;


4
oilkp
Re: Publisher rss not working in 2.5.0
  • 2010/11/28 18:43

  • oilkp

  • Just popping in

  • Posts: 23

  • Since: 2010/6/30


the error was no new or old rss is displayed

comment out the line as posted by Ghia..on debugging

but no error is displayed

XOOPS Version XOOPS 2.5.0
PHP Version 5.2.9
mySQL Version 5.0.91-community

5
oilkp
Re: Publisher rss not working in 2.5.0
  • 2010/11/28 18:44

  • oilkp

  • Just popping in

  • Posts: 23

  • Since: 2010/6/30


i have the same environment in 2.4.5 and publisher rss working fine but not in 2.50

helpp

6
oilkp
Re: Publisher rss not working in 2.5.0
  • 2010/11/29 12:32

  • oilkp

  • Just popping in

  • Posts: 23

  • Since: 2010/6/30


My feed is blank, but right-clicking and viewing the source code shows the content of the feed.

i check my feed at rss validator

and it warns of the module name have the symbol "&"

i edit and remove the symbol in module admin and now the rss is working fine


the strange thing is in 2.45 i have the same symbol & in my module name but yet the rss is working


7
mariane
Re: Publisher rss not working in 2.5.0
  • 2010/11/29 18:42

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


I have a xoops website running on XOOPS 2.5 and publisher's rss feed is working well
http://www.en.sccksa.org/modules/publisher/backend.php
I advise you to get the latest version of publisher from google codes
the road of success is always under construction

Login

Who's Online

459 user(s) are online (339 user(s) are browsing Support Forums)


Members: 0


Guests: 459


more...

Donat-O-Meter

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

Latest GitHub Commits