UBB.Dev
This mod will import RSS feeds as new topics. You can specify which forums the topics are posted to, and who posts them.

Installation file is included in zip. Upload the files following the structure I created in the zip.

Example: [Link Removed]

A version for 7.4+ can be found here.

Attached File
2402-RSSTopicCreator.zip  (99 downloads)
Thanks Ian.

Is this the same as the beta version?
it's the same as the latest one I posted in that topic, now it has instructions for installation
Is there an upgrade script as well, or do we need to alter tables manually?
alter manually
Ian this is awesome. Thank you very much.. Now to get it working for me smile
I made a mistake when entering RSS feeds that didn't have any existing data on them ie: future RSS outlets that haven't been used. The program stopped visiting any additional RSS URLs entered in the list the second it found a URL with absolutely no data on it.

So when setting up RSS feed URLs make sure they have existing data on them. When it hits a null it just stopped polling past that url. Other then that this is an oustanding mod..

Thanks so much Ian Spence smile

FYI for now smile
Have added an updated version.
Thanks Ian smile

Again well done!!
*curses himself for not being able to do this*

*curses himself for not being able to get other stuff to work*

frown
Do we need to add the tables manually?
frown

Totally unfamiliar with PhpAdmin I copy n pasted this:

Code
CREATE TABLE %%TABLE_PREFIX%%TOPIC_FEEDS (
FEED_ID int(4) unsigned not null auto_increment primary key,
USER_ID int(9) unsigned not null,
FORUM_ID int(9) unsigned not null,
FEED_URL varchar(255),
LAST_BUILD int(11) unsigned not null default '0',
LAST_TOPIC_TIME int(11) unsigned not null default '0',
CACHE_TIME int(9) unsigned not null default '30',
TITLE_PREFIX varchar(32),
BODY_FORMAT text,
FEED_IS_ENABLED tinyint(1) default '1',
FEED_WAS_ESCAPED tinyint(1) default '0',
PARSE_BBCODE tinyint(1) default '0',
TOPIC_ICON varchar(30),
REGEXP_SPECIAL text
) TYPE=MyISAM


Into my Query window...resulting in this:


Code
Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 14
STR: %%
SQL: CREATE TABLE %%TABLE_PREFIX%%TOPIC_FEEDS (
FEED_ID int(4) unsigned not null auto_increment primary key,
USER_ID int(9) unsigned not null,
FORUM_ID int(9) unsigned not null,
FEED_URL varchar(255),
LAST_BUILD int(11) unsigned not null default '0',
LAST_TOPIC_TIME int(11) unsigned not null default '0',
CACHE_TIME int(9) unsigned not null default '30',
TITLE_PREFIX varchar(32),
BODY_FORMAT text,
FEED_IS_ENABLED tinyint(1) default '1',
FEED_WAS_ESCAPED tinyint(1) default '0',
X PARSE_BBCODE tinyint(1) default '0',
TOPIC_ICON varchar(30),
REGEXP_SPECIAL text
) TYPE=MyISAM


SQL query:

CREATE TABLE %%TABLE_PREFIX%%TOPIC_FEEDS ( FEED_ID int(4) unsigned not null auto_increment primary key, USER_ID int(9) unsigned not null, FORUM_ID int(9) unsigned not null, FEED_URL varchar(255), LAST_BUILD int(11) unsigned not null default '0', LAST_TOPIC_TIME int(11) unsigned not null default '0', CACHE_TIME int(9) unsigned not null default '30', TITLE_PREFIX varchar(32), BODY_FORMAT text, FEED_IS_ENABLED tinyint(1) default '1', FEED_WAS_ESCAPED tinyint(1) default '0', PARSE_BBCODE tinyint(1) default '0', TOPIC_ICON varchar(30), REGEXP_SPECIAL text ) TYPE=MyISAM

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%%TABLE_PREFIX%%TOPIC_FEEDS (
FEED_ID int(4) unsigned not null


frown
where it says %%TABLE_PREFIX%% replace this with your usual table prefix - probably ubbt_

*sighs happily*

Thank You

smile
no worries smile
you can also use the SQL command in your control panel to do this..
Thank you too.

smile
I look at this and it is 100% Greek to me. It is exactly what I am looking for, but have no clue as to what to do. I downloaded the zip file, and man I feel dumber than an ox.
Upload the each of those folders to your forums directory (the directory containing ubbthreads.php)

That'll leave the structure something like

../ubbthreads.php
../cache_builders/rss_topic_creator.php
../languages/english/admin/topic_feeds.php

Then open the txt file and follow the instructions in there. You'll run the one query, replacing %%TABLE_PREFIX%% with the table prefix used at your forums.

You'll then use your trusty text editor (notepad if you have nothing better) to edit a couple of files specified, and then you upload the modified files.

Go to your control panel, click "Topic Feeds" in the left bar, and set the feeds up
Thanks for this, Ian. This was exactly what I needed.
I have the tables created and files uploaded / modified. I can use the admin panel to add feeds to forums, but nothing is actually taking place / nothing is bieng added to the forum.

I type in the url of script which triggers things. It executes just fine, but does not add any informaiton to the DB about the new topics it finds.

Is it possible that the changes made between 7.1 and 7.2 (some tables changed) and this mod simply do not work well togeather?
After install, i had a problem where only some feeds would work. It looks like if the feed does not provide a date for each topic, the mod will not work. If that sounds right, why not change it so that it defaults to todays date?
I am still getting 2 or 3 copies of each feed.

I installed the latest version from the first post, set up a new forum and linked to a new rss feed from google.

However I still got 2 or 3 copies of each feed frown
One thing that sucks is that sites with popular editors will take and rename the feed topic several times sometimes... Which will be grabbed each time, which is entertaining to say the least (reuters tech is what I'm viewing)
True - but I do not see this issue on feeds pulled in from the same sources on F*sion
Just noticed on this one I set up - I have two new articles - each have been repeated 10 times LOL - this is hidden at the moment from users, so it is not an issue - but it also means I can not use this script in real time yet.
'eh get a couple editors to troll for dups; that's ultimately what i do
Sorry Gizzy - not a solution frown
arrghhh!! Just gone to my forums and I have 5 news items - each published over 40 times frown frown

Are you serious in saying people should manually edit these daily???
I've never got more than 3 and it was due to changing the title
previously I had only had 10 - 40 copies of 5 news items was the largest frown

These are all identical, all at the same time.

This won't work in 7.3; the error is:
Quote
[Sat May 10 04:50:16 2008] [error] [client 76.115.79.184] PHP Fatal error: Class 'HTML' not found in /home/undergroundnews/public_html/forum/cache_builders/rss_topic_creator.php on line 22, referer: http://www.undergroundnews.com/forum/ubbthreads.php/forums/27/1/Technology.html
With some help from SD I have this up and running again...

Change:
Code
// Setup the smarty class
require_once('../libs/smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = 'templates/default';
$smarty->compile_dir = 'templates/compile';
// include all of the required libraries
require_once( "../libs/phpmailer/class.phpmailer.php" );
require_once( "../includes/config.inc.php" );
require_once( "../libs/mysql.inc.php" );
require_once( "../libs/ubbthreads.inc.php" );

/**
* Should each new item increase the user's post count?
*/
$config['TOPIC_FEED_INC_POSTCOUNT'] = true;

$html =& new html;

To:
Code
// Setup the smarty class
require('../libs/smarty/Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = 'templates/default';
$smarty->compile_dir = 'templates/compile';

// include all of the required libraries
require_once("../libs/phpmailer/class.phpmailer.php");
require_once("../includes/config.inc.php");
require_once("../libs/mysql.inc.php");
require_once("../libs/bbcode.inc.php");
require_once("../styles/wrappers.php");
require_once("../libs/html.inc.php");
require_once("../libs/mailer.inc.php");
require_once("../libs/user.inc.php");
require_once("../libs/ubbthreads.inc.php");

/**
* Should each new item increase the user's post count?
*/
$config['TOPIC_FEED_INC_POSTCOUNT'] = true;

$html =& new html;

/me bows
[Linked Image]
Still creates multiple copies of feeds as posts frown

Have had to stop using it.
Actually, I think I know the cause of that... Once I took it out of the footer (to where it's loaded every page load) and put it in the forum stats island so it's cached it only pulls one copy...

I think it's the occasional X amout of people hitting it at the same time when it's supposed to refresh that gets doubles...
Anyone have any idea why nothing is being populated to the Active Topics display?
To my knowledge it never was.
It was for me prior to 7.3 frown... At least, I recall it being lol...
For me having 900+ posts a day, it would make little difference. wink
i could only wish....
Originally Posted by Gizmo
i could only wish....


well, get a cool forum then smile

Our daily post count in april varied from 769 to 1429. Average 1040.
We used to be a very lively place; but most of our seasoned members grew up and had kids, so they don't come around much anymore... We've got a long standing community as well; so it's not like we're some "we just made it" site wink...
Anyone have any idea why posts created with this script will not show in a post island? It's quite an annoyance lol...
It must be skipping the step where it triggers the post island insertion.
I've followed all the directions. Everything seems to be ok, with the following exception:

The Create Topic Feed from the Control Panel does not show any forums to put the topics into. All I see is a vertical blank selection box.

Please advise.

Thanks in advance.

GREAT mod! Thanks very much for this! smile A few things...

When I try to create a topic feed, I always get:
Quote
It appears that you have reached an update page without submitting any data.

confused

I'm guessing the form data is not being passed for some reason, causing me to get this generic UBB admin error.

I'm running 7.4.2. Has anyone else tried this mod on this version? Well, in the mean time, I can just edit things in the database directly with phpMyAdmin.

Also, it appears it does not support feeds that use ASP. Is this correct?

One feed uses
Code
&
in their URLs, and this is completely stripped out of the URL when posted to my board, even with the FEED_WAS_ESCAPED option checked...

How would I strip out
Code
<br />
from the feeds? I can't figure it out and have never been that good at preg_replace

If I specify in Portal Settings to pull from forums created using this mod, it won't pull from them... I just get a big blank space staring at me...
I miss the days when this community was active... frown
I miss the days with loads of free time on my hand. The "It appears that you have reached an update page without submitting any data." problem is easy to fix. Since 7.4.1 (I think?) all forms had a form_is_valid field added. You need to add this to custom scripts too.

Thanks blaaskaak! I found the fix...
In edit_feeds.tmpl, after:
PHP Code
<input type="hidden" name="returntab" value="$returntab" /> 
add:
PHP Code
<input type="hidden" name="valid_post" value="1" /> 

One strange thing I noticed...

I had changed my forums around a little bit after I installed this mod. I renamed a forum and added some. On the edit pages, it is still showing the old way. I'm guessing it's not pulling these from the DB, and from some flat-file somewhere perhaps? :shrug:
Could be that your cache is outdated. I don't know the exact way it handles things, but it does cache the forumlist on some pages. Maybe remove everything from the cache directory except the index.html file?
Decided to look into it. Seems it was using a deprecated cache file. I am using 7.4.2 and to do this to fix it:

In admin/edittopicfeed.php find:
PHP Code
(file_exists("{$config['FULL_PATH']}/cache/forum_list.php")) ? include("{$config['FULL_PATH']}/cache/forum_list.php") : $tree = array() ; 
and replace with
PHP Code
(file_exists("{$config['FULL_PATH']}/cache/forum_cache.php")) ? include("{$config['FULL_PATH']}/cache/forum_cache.php") : $tree = array() ; 
This seems to be broken for 7.5

The scripts reference files that don't exist such as Forums_list.php is now called Forums_cache.php etc.

I go to add an RSS feed link and it says the following:

It appears that you have reached an update page without submitting any data.

Can someone take a quick look at this and post an update.

Thanks a bunch..
Is there a fully working version for 7.5 with all changes necessary etc.. ?

I just read all the posts now.. hmmmm
Nope, ian's gone AWOL; the issue with the CP stuff is the same as the bugs at UBBCentral for 7.4
is there a more easy way to install this instead of playing with tables? Also does it work on 7.5.5?
Who is using this? Where can I see this?

F
I'm running it here
tx!
I have installed this but when i go to admin control panel and go to topic feeds, down the page where it says Forum to put the topics into: the box is blank with no list of my topics in there.

Can anyone help please?
I'm not too sure what changed in the CP since I had initially installed it; I know it definitely has its short falls on things that don't work 100%...

Ian isn't really involved with the UBB anymore and I'm not really sure if anyone has really looked at the base code anytime since the mod was made...

When I get some more time I can try to hack the CP area to get it working though; but I've been really swamped with my own coding lately (hence why I haven't been as active as I used to be here lol)
A patched copy for v7.4+ can be found here.
© UBB.Developers