vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   NEW Modified RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=63798)

sjau 07-12-2004 03:32 PM

@ slapyo

all I can say is that it fetched the first time data from "my" news feed and never since on 3.0.2. Not even when triggered manually from the admin center.
Furthermore where can I change that text "View entire article?"?

mrboz 07-12-2004 09:41 PM

i have the same problem with it not updating too.

i have tried 2 different feeds from the bbc news website and another feed from a different site.

the first time you get the news it works very well, but it doesn't update anymore. i have checked the bbc feeds and they have been updated and i tried another feed with news on it and that didn't work at all.

Slapyo 07-13-2004 01:14 PM

hrm, i'm not sure. everything should be working fine as no major updates have been done to anything that would affect the script. i'll look at it some more.

@sjau, you can edit the View entire article in rss_update.php

rsuplido 07-13-2004 03:08 PM

Here's a workaround that I did to parse VB RSS2 streams (item titles with CDATA):

Open <forum dir>/includes/RSS/class.RSS.php (please backup original first)

Look for:
Code:

$channelCount = preg_match_all("|<channel>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER);
Replace with:
Code:

$channelCount = preg_match_all("|<channel*>(.*)</channel>|iUs",$data,$channels,PREG_SET_ORDER);
Look for :
Code:

                        if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER))
                        {
                                $title = $match[0][1];
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                        } else {
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "";
                        }

Replace with:
Code:

                        if(preg_match_all("|<title><\!\[CDATA\[(.+)\]\]></title>|iUs",$itemData,$match,PREG_SET_ORDER))
                        {
                                $title = $match[0][1];
                                $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                        } else {
                                if(preg_match_all("|<title>(.+)</title>|iUs",$itemData,$match,PREG_SET_ORDER))
                                {
                                        $title = $match[0][1];
                                        $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "$title";
                                } else {
                                        $this->CHANNELS[$channelID]['ITEMS'][$itemID]['TITLE'] = "";
                                }
                        }

Look for:
Code:

$itemCount = preg_match_all("|<item>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER);
Replace with:
Code:

$itemCount = preg_match_all("|<item*>(.*)</item>|iUs",$channelData,$items,PREG_SET_ORDER);
I did the these changes to parse another VB3 enabled site and it's been working for several weeks now.

Regards.

mrboz 07-13-2004 07:04 PM

it seems to be only "BBC News" feeds that are not updating. i'm using a reuters feed now and it's working perfectly

jribz 07-14-2004 01:46 AM

Hello,

First I'd like to thank everyone invoilved in this hack, very nice work.

Secondly I have a question. I am using the hack flawlessly to post from a custom rss feed from my own site which delivers the entire article, not just a link to it.

The problem is the bot delivers the article in one large block of text without formatting it onto paragraphs and line breaks. When the rss feed is viewed in a reader such as Sharpreader it formats fine.

Is there any way to get this to format in a more user friendly fashion for those us of who actually have live rss feeds with the entire story inside them?

If someone is willing to take a look I will PM the feed url to you as well as my site url.

Thanks for your time.

Slapyo 07-14-2004 02:47 AM

you can PM me the feed if you like or you can just post it on here. i'm sure anyone that can help will.

jribz 07-14-2004 03:11 AM

OK, thanks for the reply.

Rather than get into a PM exchange, I'll just post the info here since it may help others as well. :nervous:

The site I run is Xbox Solution located at http://www.xboxsolution.com

We have two rss feeds, one that will post a link and another that will write out the story.

First RSS Feed (Link Only): http://www.xboxsolution.com/backend.php

Second RSS Feed (Full Story):http://www.xboxsolution.com/index.rss

I am using the second RSS feed for the bot - and all is well except that when the bot posts the story it posts everything in one block, no line breaks.

If you point an rss reader such as Sharpreader to http://www.xboxsolution.com/index.rss you will see that the output is fine, with line breaks where needed,

Just wondering if there is any way to resolve this.

The forum that my bot posts in is here: http://talk.xboxsolution.com/forumdisplay.php?f=48

The bot's user ID is here: http://talk.xboxsolution.com/member.php?userid=28095

Thanks for the help!

Slapyo 07-14-2004 06:22 AM

here is where i ran into the same problem when coding this. i couldn't find out how to insert a breakline. everytime i put in /r/n it would actually put those characters into it. this was for inserting the description then 2 lines down putting the link. i had to come up with a work around for that.

Code:

Open up your replacement variable manager (in admincp -> styles & templates -> replacement variable manager) and add the following entry:
Style: [select whichever style you are using]
Search for text: {br}
Replace with text: <br />


DS MrSinister 07-14-2004 06:35 AM

looks like a kewl hack... i will giive it a try!!


All times are GMT. The time now is 12:46 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.01661 seconds
  • Memory Usage 1,751KB
  • 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
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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