vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   RSS Feeds on Forumhome and Other vb Pages (https://vborg.vbsupport.ru/showthread.php?t=105328)

tgmorris 01-13-2006 10:00 PM

RSS Feeds on Forumhome and Other vb Pages
 
This product adds support for displaying RSS feeds on 1 or more vb pages.

The product will create 5 plugins and a new section, RSS Feed Processing, under vBulletin Options. Also added will be 2 new templates appropriately grouped under 'RSS Feed Templates'.

Configuration

Change the settings in 'vBulletin Options -> RSS Feed Processing' to suit your particular needs.

One thing that proves difficult for some users is creating the 'cache' directory. This directory needs to be CHMOD 777 and it should reside outside the web root. All of the RSS feeds will be cached in that location so depending on how the product is configured (i.e. allowing users to define their own feeds) the size of the directory could grow signficantly.

An advanced feature that is only available for non-user specified feeds is the ability to include code to filter and/or modify the feed content. If the feeds are being provided for your users this can prove to be a very powerful tool.

Placing the content on pages

As supplied the RSS Feed content will be displayed below the "What's Going On" block. This may be changed by modifying the 'RSS Feed - Content Generation' plugin in different ways.
  1. Find where you want the output in the FORUMHOME template and change the search sttring accordingly.
  2. Delete all the search-related text and manually edit the template(s) where you want the content to appear.
In either a) or b) above you may also change the hook location for the 'RSS Feed - Content Generation' plugin so it runs where it's needed. If the content is desired on multiple vb pages then the plugin could be moved to init_startup so long as the template edit logic is removed.

The RSS feed content is placed in the $feedcontent array with an entry for each feed. To manually place the feeds in templates refer to the entries for 3 feeds as $feedcontent[0], $feedcontent[1] and $feedcontent[2]. If the content for a given feed cannot be decoded then that array entry will be empty.

Revisions

1.00 RC2 16-Jan-2006
Added support to allow the displayed feeds to collapse when not a user-specified feed.
  • Modified the rss_feed_rss template
  • Updated the RSS Feed - Function plugin


If you find this product useful donations via PayPal may be made via the Sponsors Page.

Do not reproduce or publish elsewhere without my written permission.

sensimilla 01-14-2006 08:07 PM

sounds great :) thanks

gael11 01-15-2006 06:43 AM

Hello, great hack, it works very well ant it's very usefull ;)
But I have a question: the content is displaying in the botom of the page, how can I display a the top ? Is it in the forum home template ?
Thanks for your answers ;)

tgmorris 01-15-2006 07:11 AM

The placement is currently determined by the RSS Feed - Content Generation plugin, the content of which is shown below.

PHP Code:

rss_feed_processing(RSS_FEED_FIELDRSS_FEED_USAGE);

$search_text '<!-- end what\'s going on box -->';
$insert_text '';
for(
$insertc 0$insertc count($feedcontent);)
{
    
$insert_text .= '$feedcontent['.$insertc++.']<br />';
}
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,$search_text.$insert_text,$vbulletin->templatecache['FORUMHOME']); 

To have the rss content appear at the top of the forumhome page the easiest thing to do is to change the search text from <!-- end what\'s going on box --> to <!-- main -->

Alternatively, you may delete all the search/replace logic in the plugin and edit the template directly by following the guidelines in the Placing the content on pages section.

Viks 01-17-2006 02:01 AM

Hi TGmorris,

IF I would like to display the RSS feed in some other location on my forums or lets say within another template on my forum in that case

1. Could you tell me what code do I need to add to have the feeds show up there.

2. My Second question is related to the above, what part of the code do I need to remove in the XML file (provided in the zip) in order to remove the feeds to show up in forumshome.

----

Thanks for your help.

regards,

Vik

tgmorris 01-17-2006 02:09 AM

There are several ways to accomplish what you want to do. The simplest is to edit the 'RSS Feed - Content Generation' plugin and move it to a different location (i.e. change the hook location). Once that's done edit the search text to what is needed for the new spot. This can be done by looking at the generated html and finding the appropriate comment or some unique text.

MSC 01-24-2006 12:22 AM

Just installed this and now get the following error:

Fatal error: file_put_contents cannot write in file. in /includes/init.php(292) : eval()'d code on line 91

I tried de-activating the plugin but still get the error.

tgmorris 01-24-2006 12:59 AM

Quote:

Originally Posted by MSC
I tried de-activating the plugin but still get the error.

Did you deactivate all of the product or just some of the plugins?

If you've deactivated the plugin code in the init_startup section I'm not really sure how you can still get that error.

Any additional info you can provide will be helpful.

PS - The error message likely relates to that fact that the cache directory doesn't have 777 permissions.

GamerJunk.net 01-27-2006 07:21 PM

This is a great plug in....

Yet I can't get it to display in my right sidebar...even with editing the search text to be right where I want it...

tgmorris 01-27-2006 07:38 PM

Quote:

Originally Posted by RasMasta
This is a great plug in....

Yet I can't get it to display in my right sidebar...even with editing the search text to be right where I want it...

As a test you might remove the search/replace bit and just modify the template directly. Also, make sure that the variable is available on the page you have the right side-bar.


All times are GMT. The time now is 03:22 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.01114 seconds
  • Memory Usage 1,750KB
  • 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)bbcode_php_printable
  • (2)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