Warning: The author of this contribution does not provide support for it anymore.

ACP Announcement Feed

Providing feeds to other forums - ACP Announcement Feed

Providing feeds to other forums

by JAWAD-9 » Sat Aug 14, 2010 5:43 pm

I tried to make this modification available for the arabic support of phpBB ( phpBB Arabia ) but I failed ...

Can you provide feeds direction Instead of phpBB to phpBB Arabia announcements ???
this is the link of the announcements forum's RSS feed

http://www.phpbbarabia.com/community/feed.php?f=34

If you need anything else please let me know ..

Best Regards ..

phpBB Arabia team ...
JAWAD-9
Registered User
Posts: 46
Joined: Fri May 07, 2010 10:23 pm
Location: Syrian Arab Republic
Name: JAWAD

Re: Providing feeds to other forums

by imkingdavid » Sat Aug 14, 2010 5:56 pm

This MOD currently only supports fetching an RSS feed, whereas it appears that the feed you are trying to use is an ATOM feed. Either that is the case, or else the RSS feed you linked to uses different tags (i.e. <entry> instead of <item> and <updated> instead of <pubDate>), which makes it incompatible.

In the future I may release a version which allows you to specify the URL and type of feed to retrieve, but for now there is not a simple solution.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: Providing feeds to other forums

by austin881 » Tue Nov 02, 2010 9:41 pm

What about <dc:creator></dc:creator>

How would you handle that in your template assignments?

Example:

Code: Select all

               $template->assign_block_vars('news_feed', array(
                     'TITLE'      => $sub->title,
                     'DATE'      => $user->format_date(strtotime($sub->pubDate)),
                     'U_NEWS'      => $sub->link,
                     'AUTHOR'      => $sub->dc:creator,
               ));


The way I have it in my example throws a syntax error. I'm not sure what the appropriate syntax is.
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 287
Joined: Wed Jan 30, 2008 9:58 pm
Location: Texas, USA
Name: Austin Maddox

Re: Providing feeds to other forums

by imkingdavid » Thu Nov 04, 2010 3:44 am

I haven't tested this, but in theory it should work:

Code: Select all

               $dc_creator = 'dc:creator';
               $template->assign_block_vars('news_feed', array(
                     'TITLE'      => $sub->title,
                     'DATE'      => $user->format_date(strtotime($sub->pubDate)),
                     'U_NEWS'      => $sub->link,
                     'AUTHOR'      => $sub->$dc_creator,
               ));


Like I said, I haven't tested it and I'm not sure if you're allowed to do that. But it's worth a shot. Let me know how if it works!
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: Providing feeds to other forums

by austin881 » Thu Nov 04, 2010 1:34 pm

No, it doesn't work. I'm wondering if it would help you to see the feed I'm trying to load. http://www.autoblog.com/tag/silverado/rss.xml

Code: Select all

<dc:creator><![CDATA[Steven J. Ewing]]></dc:creator>


What do you suggest?
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 287
Joined: Wed Jan 30, 2008 9:58 pm
Location: Texas, USA
Name: Austin Maddox

Re: Providing feeds to other forums

by imkingdavid » Thu Nov 04, 2010 9:24 pm

The issue is that you can't use a colon in a variable name. When the $sub object is created, each XML tag is used as a class variable. Because the colon doesn't work, it is erroring out. I'm just unsure as to how this would be fixed if the above try didn't work.

I did a google search but that didn't really help. If I figure it out, I'll let you know. :)
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: Providing feeds to other forums

by imkingdavid » Wed Dec 07, 2011 2:20 pm

austin881 wrote:No, it doesn't work. I'm wondering if it would help you to see the feed I'm trying to load. http://www.autoblog.com/tag/silverado/rss.xml

Code: Select all

<dc:creator><![CDATA[Steven J. Ewing]]></dc:creator>


What do you suggest?

I have revisited the issue and found the following information here (example 3).

In short, you simply do the following:

Code: Select all

'AUTHOR'    => $sub->{'dc:creator'}, 

Now I haven't tested it, but according to that page, it should work.

In other news, I am working on version 1.0.2, which should implement the OP's request if I can get it to work right accepting multiple types of feeds. The main issue will be trying to access data from different tags, such as in this case the dc:creator tag.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
User avatar
imkingdavid
Former Team Member
Posts: 2673
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King