RSSDisplay and PN_zClassifieds issue..

When setting up RSS Display today and putting it into a center block on my main page users have started to notice that any time they go to the PN_zClassifieds module that it doesnt work anymore.. spitting out this.

Fatal error: Cannot redeclare error() (previously declared in /usr/home/http/mysite.com/modules/PN_zClassifieds/common.php:80) in /usr/home/http/mysite.com/modules/rssdisplay/pnincludes/rss_fetch.inc on line 221

the code on rss_fetch.inc on line 221 reads:

Code

function error ($errormsg, $lvl=e_user_warning) {
        global $MAGPIE_ERROR;



the code on Classfieds in common is:

Code

function error( $error )
    {
        echo "<br><br><p class=\"classifieds-messages\">"._ERROR.": $error\n";
        echo "&nbsp;<a href=\"javascript:history.back()\">"._BACK."</a></p><br><br>\n"
        //exit();   
    }


im not a big PHP expert but it seems they are both using a function called error.. how could this be resolved, is there a way to clear the functions when going to another part of the site?

sorry PHP newbie :)
Send me email and I'll get a fix for you. That's crsATmtradDOTcom.
Hey, that a really nice thing to do.

ColdRolledSteel

Send me email and I'll get a fix for you. That's crsATmtradDOTcom.
you got mail :)
any chance to look at this? or give me an idea on how this could be fixed
sorry, still trying to unbury myself. I will look at it sometime in the next 12 hours.
The problem is that both modules use the same name for defining a function and PHP complains because it doesn't know how to handle that situation.

This will also affect the weather module and the RSS module in PN CVS.

I am working on a solution in the RSSdisplay module but it is messy because it's called in a bunch of places.

I will also ping jmvedrine, the owner of the weather module to let him know of the exposure.

Gateway - send me your email again. I misplaced the last one and I need it to send you a patch.
And you could also suggest to the pn_zclassifieds owner that they fix the problem as well. wink
Hello,
weather module is unaffected because the error function is in Magpie and wether use Snoopy but not Magpie.
PostNuke .760 RSS module is affected.
I really think it should be better to modify PN_ZClassified because if we modify Magpie, it would be necessary to redo the patch each time we upgrade to a new release of Magpie.

--
Visit my live reef aquarium.

My Amazon wish list.
I was curious because on my site http://www.vedrine.net RSS and PN_ZClassifieds 2.0 are working together with no problem but I realised that I had changed all error in PN_ZClassifieds to zc_error (and fixed a lot of other things !!) I will redo the same changes for ZClassifieds latest release and make the result available. This should fix the problem. Should be available this week-end or at the beginning of next week.

--
Visit my live reef aquarium.

My Amazon wish list.
Cool. yea, any help on this would be apperciated.

IM curious, could a RSS be added into The Classifieds.. I know Craigslist.com has huge amount of data for personals, classifies etc, it would be nice to have some way to pull that data into a section of the PN Classifieds.. ? example rss for san diego for sale

http://sandiego.craigslist.org/sss/index.rss

thoughts?
pull the data from your PN database.
In myheadlines it's myh_cache dunno what it is in RSSDisplay.
Not sure what you mean.. can you give me a bit more details for a non PHP person :)

gateway

IM curious, could a RSS be added into The Classifieds.. I know Craigslist.com has huge amount of data for personals, classifies etc, it would be nice to have some way to pull that data into a section of the PN Classifieds.. ? example rss for san diego for sale

http://sandiego.craigslist.org/sss/index.rss

If you want to create an RSS feed from your PN_zClassifieds module, then the module you want is the RSSfeed module (from http://www.mtrad.com), not RSSdisplay.

The latest version of RSSfeed provides the ability to add new sources for your RSS feeds. As bri suggested, you write a feedsources PHP file that pulls the data from the tables that PN_zClassifieds uses. (Or like the rest of us, copy one of the existing feedsources files and modify the heck out of it.)

I can provide advice on how to write a feedsources script and would be happy to include whatever you come up with in the next version of the RSSfeed module.
I think the idea of having the ability for PN Classifieds to pull in the craigs list rss feed would rock. cragis list is a very huge site for alot of the big cities around the US. http://www.craigslist.com anyhow since im building a local community site it would be nice to be able to pull his rss feed into my classfieds area.. so i could have a category called Craigs List Feed, which then could parse in the various information into the classifieds section.. but anyhow thats just a wish thing.. my main thing would be to be able to get RSSDisplay and Classfieds to play nice together..

any updates on fixes for the classifieds section?

also another wish list thing would be..

I want to offer up certain RSS feeds in the center block for users.. but I want them to be able to choose in My account what feeds they want based upon a list I set up.. ??

I know we are totally getting off topic here.. but :)
Hello,
I have modified PN_ZClassifieds 2.1 to avoid conflict with RSS and rssdisplay modules. I have also tried to protect all SQL queries against SQL injection for security. This needed to edit quite a lot of lines. I hope I didn't break anything in the process and I verified my work line by line but I can't be sure. Test it, and report any problem. You can download it here

--
Visit my live reef aquarium.

My Amazon wish list.
going to download and test it now.. thanks.. and esp for any mysql injection issues.
Ill be happy to comfirm that it seems to be working, it late here so ill do some more testing tomorrow.

did you see my idea about pulling www.craigslist.com rss feed into the classifieds section?

gateway

I think the idea of having the ability for PN Classifieds to pull in the craigs list rss feed would rock. cragis list is a very huge site for alot of the big cities around the US. http://www.craigslist.com anyhow since im building a local community site it would be nice to be able to pull his rss feed into my classfieds area.. so i could have a category called Craigs List Feed, which then could parse in the various information into the classifieds section.. but anyhow thats just a wish thing.. my main thing would be to be able to get RSSDisplay and Classfieds to play nice together..

This is an interesting idea. It doesn't exactly fit into the RSSdisplay or RSSfeed modules... The way that I would do it is to use the magpie reader to get the feed(s) that you want from Craig's List. magpie returns an object, so you just have to pull the various pieces of info that you want out of that object and into whatever Classifieds needs to record.

Pretty straight-forward. If you want help, I'd be happy to provide advice. If you need someone to do it, I can quote a price. icon_smile

gateway

I want to offer up certain RSS feeds in the center block for users.. but I want them to be able to choose in My account what feeds they want based upon a list I set up.. ??

Well, RSSdisplay will display a feed in the center column as if it's a module.

But choosing feeds in My Account and combining them is pushing the envelope. I'll respond to this in email and we'll discuss what's possible...