The XML Aggregation admin control panel allows administrators to load XML feeds as posts into a designated forum - similar to the USENET and Mailing List loading features offered. This allows administrators to aggregate content from various sources, backup their blog posts or even replicate posts between forums. Features:
Contents |
To configure a new feed, head over to XML Aggregation in your forum's Admin Control Panel.
WARNING: If allow_url_fopen is disabled in your php.ini, this control panel will not be listed in the Admin Control Panel menu. |
A short but descriptive name for this XML feed.
The URL of the XML (RDF, RSS or ATOM) feed you want to load.
Examples:
WARNING: This feature does not support access through proxy servers that requires authentication. You will not be able to use it from behind a company firewall unless you explicitly allow access. |
Articles imported from the feed will be imported into this forum. It is **highly recommended** that you setup a separate forum for each feed.
Any article from the feed would first need to be approved by moderator(s) before they are made visible on the forum.
When importing articles from a feed, should a new user be created for every article author, who cannot be matched against an existing forum user. If this option is set to 'No', then all imported messages who's authors cannot be matched against existing forum members will be attributed to the anonymous user.
When importing articles, should the articles posted by users who cannot be matched to existing forum members be ignored.
If this option is enabled the forum will try to determine if an article is a reply by comparing it's subject to subjects of existing messages in the forum. Enable this when you syndicate threaded discussions from a forum or mailing list.
If enabled, HTML contained within XML feeds that are imported will not be stripped. This field was added in FUDforum 3.0.3.
A string of text to append to the end of every aggregated article. Special tags that can be included:
For example:
Source: This article was syndicated from {link}.
Another example, assuming the forum's tag style is HTML (as it should be if you aggregate HTML content):
<hr />I've got this from <a href="{link}">{link}</a> :-)
If your forum's tag style is BBcode (probably not a good idea if you import HTML articles), you can set this to:
[hr]Original URL:[br]{link}
At the bottom of the control panel there is a list of existing newsgroup rules. Each entry shows 4 pieces of information about the newsgroup:
Options are presented to edit rules, delete them or to reset the date (clear a feed's tracker - reset pointer to the first article in the feed).
Any system scheduler can be used to execute the 'Exec Line' (see above) to load articles into the forum. On LINUX/UNIX systems one would typically setup a cron job to run every X minutes or hours. On Windows systems one can use the task scheduler to accomplish the same thing.
Xmlagg.php (in the forums scripts directory) requires you to have a PHP command line executable (cgi/cli) installed. If you have standard installation of PHP for Apache web server, then there are very high chances that you already have PHP CLI installed on your system. This executable can typically be found at /usr/bin/php, however on some distributions that may not be the case. If your PHP binary is not in /usr/bin/php, you will need to change the first line of the xmlagg.php script from
#!/usr/bin/php
to
#!/path/to/your/php/binary
The following is a sample crontab that will import messages from a feed associated with rule #1 every 30 minutes.
*/30 * * * * /home/forum/forum/scripts/xmlagg.php 1
NOTE: When you import multiple feeds, please ensure they don't all start at the same time! |
If you use cron (or any other system scheduler for that matter), ensure you write the errors somewhere. For example, append this to the crontab line:
>>/tmp/xmlagg.log 2>&1
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Cannot return last error, no db connection)