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)
-   -   [v1.6] Inferno RSS Forum Feeds Technology (https://vborg.vbsupport.ru/showthread.php?t=94510)

BlackxRam 08-06-2007 06:46 AM

thats because vb already has RSS functionality, this hack is out of date.

you can search any category for new posts seperately by adding &f=forumid

forumid being the number for example

www.site.com/forums/search.php?do=getnew&f=10

So you can search seperate categories by adding the above links on your forums.. not sure if there is a hack somewhere for this.

flup 11-11-2007 07:07 PM

I might have found a solution for the duplicate posts thing.. I replaced the post_thread() function with the following code:

Code:

                function post_thread($title, $message, $feed)
        {
                global $vbulletin;

                $getThread = $vbulletin->db->query("SELECT threadid FROM " . TABLE_PREFIX ."thread WHERE title = '" . mysql_real_escape_string($title) . "' AND forumid = '" . mysql_real_escape_string($feed['feed_forum']) . "'");
                $ThreadNums = $vbulletin->db->num_rows($getThread);

                if($ThreadNums < 1) {
       
                        $this->ItemsAdded++;
       
                        $newpost['title']  = $title;
                        $newpost['message'] = $message;
                        $smilie            = true;
                        $foruminfo          = fetch_foruminfo($feed['feed_forum']);
       
                        $ThreadDM =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
       
                        $ThreadDM->set_info('forum', $foruminfo);
                        $ThreadDM->set_info('thread', $newpost);
                        $ThreadDM->setr('allowsmilie', $smilie);
                        $ThreadDM->setr('userid', $feed['feed_user']);
                        $ThreadDM->setr('title', $newpost['title']);
                        $ThreadDM->setr('pagetext', $newpost['message']);
                        $ThreadDM->setr('forumid', $feed['feed_forum']);
                        $ThreadDM->setr('dateline', $this->get_dateline());
                        $ThreadDM->set('visible', 1);
                        $ThreadDM->registry->options['floodchecktime'] = 0; // Disable flood check in memory...
                        $ThreadDM->pre_save();
       
                        if (sizeof($ThreadDM->errors) > 0)
                        {
                                $ThreadDM->errors = array();
                        }
       
                        $ThreadDM->save();
                       
                }
               
        }

Please not that it only checks on the title.. so each post with the same title will be seen as a duplicate post and not be added to the forums. I think it works for me.. I tested it on some RSS feeds which are updated since the last cronjob and it added 1/3/4 items and not all 20 items which are on the list.

flup 11-12-2007 09:05 AM

One little change made to this piece of code.. added 'mysql_real_escape_string() over the $title var.. to prevent quotes from splitting the query in two resulting in a mysql-error.

angusv 12-09-2007 08:21 PM

This doesn't work with 3.6.8 - is there an update or a similar mod for 3.6.x?


All times are GMT. The time now is 11:02 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.01572 seconds
  • Memory Usage 1,731KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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