vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help with consuming RSS feed. (https://vborg.vbsupport.ru/showthread.php?t=196720)

itworld 11-19-2008 07:20 PM

Help with consuming RSS feed.
 
vBulletin newbie. I need to include another sites RSS feed (with MagpieRSS), but can't figure out how to get a php include to work. I've tried putting it in the header with and without the <?php ?>. Will an <IFRAME SRC=... work? or is there a "proper" way of doing this in vB?

TIA, Dave

Lynne 11-19-2008 08:17 PM

If you want to have it make threads in your forum, then you need to use the RSS Feeds Manager in the Admin CP.

itworld 11-19-2008 09:22 PM

No, the other way around. Another site creates an RSS feed. I want to pick up that feed and present it (links to articles) on my forum pages.

Lynne 11-19-2008 11:37 PM

Yeah, that's what the RSS Feed Manager does.

itworld 11-20-2008 03:27 PM

Thank you, I really appreciate your help, but...
<sigh> I am now getting "XML Error: Empty document at Line 1" when I try to preview http://www.macworldcanada.ca/newsrss.xml.

I'm sure the feed is good, because this code (on the same feed, using magpierss) works.
define('MAGPIE_DIR', 'C:\\Inetpub\wwwroot\\dave\MagpieRSS\\');
require_once(MAGPIE_DIR.'rss_fetch.inc');

$url = 'http://www.macworldcanada.ca/newsrss.xml';

$rss = fetch_rss( $url );
echo '<div style="width:160px;background-color:silver;padding:2px;border:solid black 1px">';
echo '<strong>' . $rss->channel['title'] . '</strong>';
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
echo "<br /><a href=$href" . ' target="_blank">' . $title . "</a>";
}
echo '</div>';

Lynne 11-20-2008 03:35 PM

When I input the feed into my RSS Feed Manager and do a preview, it is just fine. It also posted just fine on my test board. Try reuploading the rssposter.php file and any other related files to that one.


All times are GMT. The time now is 02:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01429 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete