vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   RSS feed displayed in forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=117235)

MickDoneDee 08-22-2007 03:30 AM

Which part of the install are you having difficulty with? The install requires creating a plugin via admincp, editing the forumdisplay template in admin cp, creating your custom php and html file from the template files supplied by FeedForAll.com and uploading them to your server, adding the URL of the rss feed to the php file, creating a folder to cache the feed.

If you need assistance with any part then PM me.

rnmcd 08-23-2007 06:54 PM

MickDoneDee, is there a setting that allows you to specify how long the RSS items display on the forumdisplay page?

For example, I noticed that on http://www.world-a-team.com/australia-cricket-forum/ your items seem to be from today only.

Is it possible for the items to display for a longer duration?

Are the earlier RSS items automatically deleted when the latest feed is updated?

Thanks.

amnesia623 08-31-2007 07:29 PM

I can't believe it.

I just found this thread, but I am using the same exact setup on a new theme I'm creating for my board. I want to load news feeds from different sources based on forums.

Now, my question and concern is this:

1) loading all the feeds into global start: doesn't that slow the board down? Even if it's pulling from the cache doesn't it have to load all the feeds into the variables but only display the variable according to the condition on ForumHome? I would like to find a way that it only loads the appropriate feed based on the forum.

2) Couldn't you create multiple hooks, assign a different feed per hook, and load the corosponding hook based on a condition? ie: <if condition="$foruminfo['forumid'] == 7">hook_name</if>

3) Or is there a way to load the rss2html.php file into a plugin and have the plugin communicate with the board so the forum id is passed to the plugin and loads the appropriate feed based on the forum id ie... (from the rss2html.php file)

if (forumID == 2) {
$XMLfilename = "http://www.tmz.com/rss.xml";}

I'm just thinking, at least for myself, there has to be a more efficient way to get this to work.

It's a great way to get fresh content on your site though!

MickDoneDee 08-31-2007 11:29 PM

Quote:

Originally Posted by rnmcd (Post 1324251)
MickDoneDee, is there a setting that allows you to specify how long the RSS items display on the forumdisplay page?

There is a setting in the FeedForAll_Scripts_CachingExtension.php file that controls how long the current feed remains in your cache before a fresh copy is fetched. The fresh copy, however, may still be the same if you are fetching every 6 hours but the feed content is only updated every 24 hours by the website producing the feed.

Code:

  // The variable $cacheTTL controls how many seconds a cached copy of an XML
  // file can be used before it must be refetched from the server.
  // $cacheTTL=60;      //cache files for 1 minute
  // $cacheTTL=3600;    //cache files for 1 hour
  $cacheTTL=21600;  //cache files for 6 hours

I can't publish the entire file here because you have to register on feedforall.com to download this free file.
Quote:

Originally Posted by rnmcd (Post 1324251)
For example, I noticed that on http://www.world-a-team.com/australia-cricket-forum/ your items seem to be from today only.

Is it possible for the items to display for a longer duration?

Are the earlier RSS items automatically deleted when the latest feed is updated?

Thanks.

As you can see from the above code it's possible to control how long you display a cached feed. The current feed will stay in cache and display on your forum until it refetches the feed and overwrites the current feed. Depending on how often the feed is updated with new content from the RSS source website your forumdisplay may or may not show new content.

Quote:

Originally Posted by amnesia623 (Post 1329691)
I can't believe it.

I just found this thread, but I am using the same exact setup on a new theme I'm creating for my board. I want to load news feeds from different sources based on forums.

Now, my question and concern is this:

1) loading all the feeds into global start: doesn't that slow the board down? Even if it's pulling from the cache doesn't it have to load all the feeds into the variables but only display the variable according to the condition on ForumHome? I would like to find a way that it only loads the appropriate feed based on the forum.

You're right that it could be done more efficiently. In debug mode, I can see that 12 rss related files are included on every forum page. This may be extra PHP work that is unnecessary. I'll try your suggestions and report back.

amnesia623 09-01-2007 04:45 AM

I'm away from my home PC now, but I'll look into it too when I get back.

I actually went to feedforall.com and purchased the access to the scripts directory so I have access to their caching script and other scripts. Maybe I should use RSStoMySQL and get feeds that way?

What I need to do is learn how to make plugins and hook locations.

Another possibility would be load the feed thru rss2html in an iframe or ajax so it doesn't slow the loading of the forum pages.

I hope I can get this worked out so I can get rss feeds posted on the page to get new content on the page all the time ....and give people things to talk about.

MickDoneDee 09-01-2007 11:29 AM

I've changed the hook location to forumdisplay_start and now the rss files are only included when a forum is viewed in the browser. That will probably reduce the amount of PHP work on other pages.

I've also successfully changed the plugin code so that only the relevent rss.php file is included when the corresponding forum is viewed.

Code:

    if($foruminfo['forumid'] == 3)
    {
        ob_start();
        require("rsseng.php");
        $rsseng = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 4)
    {
        ob_start();
        require("rssaus.php");
        $rssaus = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 5)
    {
        ob_start();
        require("rsssaf.php");
        $rsssaf = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 6)
    {
        ob_start();
        require("rsspak.php");
        $rsspak = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 7)
    {
        ob_start();
        require("rssind.php");
        $rssind = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 8)
    {
        ob_start();
        require("rssnz.php");
        $rssnz = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 9)
    {
        ob_start();
        require("rsssl.php");
        $rsssl = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 9)
    {
        ob_start();
        require("rsssl.php");
        $rsssl = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 10)
    {
        ob_start();
        require("rsszim.php");
        $rsszim = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 11)
    {
        ob_start();
        require("rssbd.php");
        $rssbd = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 12)
    {
        ob_start();
        require("rsswi.php");
        $rsswi = ob_get_contents();
        ob_end_clean();
    }
    else if($foruminfo['forumid'] == 67)
    {
        ob_start();
        require("rsswc.php");
        $rsswc = ob_get_contents();
        ob_end_clean();
    }


killerkraft 09-13-2007 04:43 PM

Thank's Mick it really works and it is very easy to implement.

Kind regards from Portugal.

KK

Dismounted 09-14-2007 10:58 AM

Cleaned and leaned a lot of Mick's code :).
PHP Code:

ob_start();

switch (
$foruminfo['forumid'])
{
    case 
3:
        require_once(
'./rsseng.php');
        
$rsseng ob_get_contents();
        break;
    case 
4:
        require_once(
'./rssaus.php');
        
$rssaus ob_get_contents();
        break;
    case 
5:
        require_once(
'./rsssaf.php');
        
$rsssaf ob_get_contents();
        break;
    case 
6:
        require_once(
'./rsspak.php');
        
$rsspak ob_get_contents();
        break;
    case 
7:
        require_once(
'./rssind.php');
        
$rssind ob_get_contents();
        break;
    case 
8:
        require_once(
'./rssnz.php');
        
$rssnz ob_get_contents();
        break;
    case 
9:
        require_once(
'./rsssl.php');
        
$rsssl ob_get_contents();
        break;
    case 
10:
        require_once(
'./rsszim.php');
        
$rsszim ob_get_contents();
        break;
    case 
11:
        require_once(
'./rssbd.php');
        
$rssbd ob_get_contents();
        break;
    case 
12:
        require_once(
'./rsswi.php');
        
$rsswi ob_get_contents();
        break;
    case 
67:
        require_once(
'./rsswc.php');
        
$rsswc ob_get_contents();
        break;
}

ob_end_clean(); 


amnesia623 09-14-2007 02:09 PM

Thank you!

MickDoneDee 03-21-2009 01:39 AM

feedkiller.com is a free online tool that allows you to merge multiple rss feeds into your own rss mix made up of your favorite feeds.

You might have to scroll down to see the online form due to poor page layout.

The first field requires you to input the name of your custom feed. For example: Australian Cricket News
Quote:

choose a name for the custom feed you are building:
The next two fields require the source feed URLs.
Quote:

enter the url for the feed you want to use:
In the stories: field the default number is 1. Change the number to however many stories you want to display from this source feed. For example, I selected 10 stories from 3 different RSS feeds so that 30 stories are displayed on my web page.

To add more than two RSS feeds to your custom feed click http://www.feedkiller.com/images/btn_add.png

When the form is done click http://www.feedkiller.com/images/btn_build.pngA new page will appear containing a link to your custom RSS feed URL. For example: http://www.feedkiller.com/feed-2083 will redirect to http://www.feedkiller.com/files/rss.php?id=2083. You may have to wait a few seconds for the redirect to happen.

Now place the second URL in your php file in the following section:

// If XLMFILE is passed as part of the URL, XMLFILE=, then it will be used
// otherwise the the file below is used.
//$XMLfilename = "http://examlple.com/sample.xml";
$XMLfilename = "http://www.feedkiller.com/files/rss.php?id=2083";

If you paste http://www.feedkiller.com/feed-2083 into the file it will create errors on your webpage.


All times are GMT. The time now is 04:36 PM.

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.01125 seconds
  • Memory Usage 1,795KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete