Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#11 2010-01-03 11:55:58
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,996
- Website
Re: smd_xml : extract data from XML feeds
Jaro wrote:
@Warning: Call-time pass-by-reference has been deprecated
What version of PHP are you running? Probably something I should look into, thanks for the heads up.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#12 2010-01-03 12:10:57
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: smd_xml : extract data from XML feeds
Bloke wrote:
What version of PHP are you running? Probably something I should look into, thanks for the heads up.
I’m running PHP 5.2.9-1. Let me know if I can help you any further to debug this.
Last edited by Jaro (2010-01-03 12:11:08)
Offline
#13 2010-01-03 12:40:05
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,996
- Website
Re: smd_xml : extract data from XML feeds
Jaro wrote:
I’m running PHP 5.2.9-1. Let me know if I can help you any further to debug this.
Thanks. Would you try something for me please: modify the plugin and change line 182 from:
xml_set_object($xmlparser, &$this);
to this:
xml_set_object($xmlparser, $this);
then see if a) the warning goes away, b) the plugin still works as it did before. Ta!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#14 2010-01-03 12:46:59
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: smd_xml : extract data from XML feeds
That fixed it. Warning is gone and the plugin works. Thanks!
Offline
#15 2010-01-03 19:04:16
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,996
- Website
Re: smd_xml : extract data from XML feeds
Try v0.2
Features:
- Pagination / limit / offset (use negative offsets to start from the end of the feed)
- Cached documents with variable timeout
- Automatically linkify any links into anchored hyperlinks
Last edited by Bloke (2010-01-03 19:04:33)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#16 2010-01-04 11:16:33
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 741
Re: smd_xml : extract data from XML feeds
not been on the forums for a while – still using Txp daily, hourly! – but always impressed when dropping in … this plugin looks great, bloke … you’re a machine
P.S. I mucked around with that other plugin that takes feeds and inserts them into the db as articles … this might be more flexible, look forward to someone implementing that bit ; )
Offline
#17 2010-01-04 21:09:57
- photonomad
- Member
- Registered: 2005-09-10
- Posts: 289
- Website
Re: smd_xml : extract data from XML feeds
dang, this is so cool!
I was just giving the plugin a try and it works effortlessly with most xml feeds. I just tried it with a sample feed from artistdata.com and I can’t get it to work…. I’m wondering if it is a problem with the artistdata feed or me (probably), or something that the plugin isn’t catching with regard to the way they do their feeds? This is the ArtistData developers info page
Here is my try at parsing it with the plugin:
<txp:smd_xml data="https://www.artistdata.com/dashboard/feed/ADS-B05XYB0QLMN8D15/17" record="Shows" fields="AgeLimit, City, Country, Date, DoorsTime, EventName, OtherArtist, OtherArtistURL, State, TicketPrice, TicketPurchaseURL, Time, Venue, VenueAddress, VenuePhone, VenuePostalCode, VenueURL" skip="Artist, ArtistIdentifier, ArtistURL, Genre, PartnerArtistIdentifier, ShowIdentifier, Status" linkify="OtherArtistURL, TicketPurchaseURL, VenueURL" wraptag="div" target_enc="iso-8859-1">
AgeLimit: {AgeLimit}<br />
City: {City}<br />
Country: {Country}<br />
Date: {Date}<br />
DoorsTime: {DoorsTime}<br />
EventName: {EventName}<br />
OtherArtist: {OtherArtist}<br />
OtherArtistURL: {OtherArtistURL}<br />
State: {State}<br />
TicketPrice: {TicketPrice}<br />
TicketPurchaseURL: {TicketPurchaseURL}<br />
Time: {Time}<br />
Venue: {Venue}<br />
VenueAddress: {VenueAddress}<br />
VenuePhone: {VenuePhone}<br />
VenuePostalCode: {VenuePostalCode}<br />
VenueURL: {VenueURL}
</txp:smd_xml>
also tried it without as many variables and it still returns nothing:
<txp:smd_xml data="https://www.artistdata.com/dashboard/feed/ADS-B05XYB0QLMN8D15/17" record="Shows" fields="Time" wraptag="div" target_enc="iso-8859-1">
Time: {Time} <br />
</txp:smd_xml>
Any ideas? I hope I haven’t just missed something obvious!
Offline
#18 2010-01-04 21:57:54
- jan
- Member
- From: Utrecht, The Netherlands
- Registered: 2006-08-31
- Posts: 71
- Website
Re: smd_xml : extract data from XML feeds
photonomad,
I first thought that the feed url you are referencing is only retrievable when you’re logged in, but that doesn’t seem to be the case.
You sure your server allows fopen wrappers?
And have you checked your php error log yet?
Kensington TXP powered rock
Offline
#19 2010-01-04 23:12:23
- photonomad
- Member
- Registered: 2005-09-10
- Posts: 289
- Website
Re: smd_xml : extract data from XML feeds
No errors in my php error log and my php.ini was set to allow_url_fopen. I just tried it with allow_url_fopen On and then switched it to Off – still no errors either way. The xml feed that I tested from upcoming.yahoo.com works fine, but the artistdata xml feed returns nothing. I’ve got Textpattern in debugging mode and no errors show there either. hmm…
Offline
#20 2010-01-04 23:13:39
- Zanza
- Plugin Author
- Registered: 2005-08-18
- Posts: 699
- Website
Re: smd_xml : extract data from XML feeds
Don’t know if this is related, but the feed Photonomad posted does not validate. It could be a problem, given the way this plugin works (just asking Bloke)?
Offline