how parsing the XML generate by RSS module ?

psychonaute
psychonaute's picture

Joined: 2011-05-30
Posts: 2
Posted: Tue, 2011-05-31 13:53

Hello everybody and congratulation for your work and keep up the community.

i'm working on fonction on my website which will generate a newsletter from the different elements (news, podcasts, photo, forum's topics).

The news and the podcasts part was my creation so it was easy to set them for the newsletter, for the lastest topics of my phpbb3 forum I adapt a script which generate rss to make it generate the newsletter.

But for the gallery2 it seems much more complicate to get back from the database the information I need. title, description, url thumbnail, url of the item.

I have thought to parse the XML file generate by the RSS module. But as the adress to access to the rss feed (http://www.toutenmarchant.com/gallery2/main.php?g2_view=rss.SimpleRender&g2_itemId=7) is not pointing on a direct XML file i'm not able to parse it with simplexml_load_file function.

i'm stuck, out of idea, If you have some don't hesitate.
Thank you
Killian

world tour on foot 2008-2014
www.toutenmarchant.com

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2011-05-31 19:14
 
psychonaute
psychonaute's picture

Joined: 2011-05-30
Posts: 2
Posted: Wed, 2011-06-01 06:55

Thanks for those leads but with the parameters avaible in this 2 modules it seems impossible to display the image added after a precise date.

For use mediablock module in a newsletter i would need to display all the pictures which has been added after the date of the previous newsletter.

any lead ?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2011-06-01 10:32

mediaBlock could certainly be modified to display images since dateXXXX. But to display them in an emailed newsletter you would be sending php and that won't fly.
mediaRss.php on the otherhand could get your list and you could parse the pubDate
sample

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2011-06-01 10:39

Also currently pubDate uses the item's Modification Timestamp but you could also switch it to:
Creation Timestamp - Date and time this item was created, in seconds since the epoch.
Origination Timestamp - Date and time when this item was originally captured (i.e. photographed, filmed, etc).
ViewedSince Timestamp - Date and time marking the beginning of the view count.

line ~546 mediaRss.php

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2