XML Aggregation

From FUDforum Wiki
Jump to: navigation, search

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:

  • Importing of ATOM, RSS2 and RDF feeds are supported.
  • The forum will automatically track posts (subsequent loads will only import new articles).
  • An optional signature can be appended to articles to credit the source.

Contents

Configure a new feed

To configure a new feed, head over to XML Aggregation in your forum's Admin Control Panel.

Info Symbol WARNING: If allow_url_fopen is disabled in your php.ini, this control panel will not be listed in the Admin Control Panel menu.

XML Feed Name

A short but descriptive name for this XML feed.

XML Feed URL

The URL of the XML (RDF, RSS or ATOM) feed you want to load.

Examples:

Info Symbol 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.

Forum

Articles imported from the feed will be imported into this forum. It is **highly recommended** that you setup a separate forum for each feed.

Moderate Feed Posts

Any article from the feed would first need to be approved by moderator(s) before they are made visible on the forum.

Create New Users

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.

Skip Non-Forum Users

When importing articles, should the articles posted by users who cannot be matched to existing forum members be ignored.

Complex Reply Matching

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.

Allow HTML in XML Feeds

If enabled, HTML contained within XML feeds that are imported will not be stripped. This field was added in FUDforum 3.0.3.

    • only recommended for trusted feeds**

Post Signature

A string of text to append to the end of every aggregated article. Special tags that can be included:

  • {link} to refer to the article's URL.
  • {subject} the article's subject/title (FUDforum 3.0.3 or higher).
  • {author} article's author (FUDforum 3.0.3 or higher).
  • {date} date posted/published (FUDforum 3.0.3 or higher).

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}

Edit existing feeds

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:

  • Aggregation Rule, a name identifying the rule.
  • Forum the name of the forum associated with this rule.
  • Exec Line this field contains the execution line which needs to be executed in order to import articles from a feed into the forum.
  • Last article shows the date of the last imported article (position where to start with next load).

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).

Import articles

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
Info Symbol NOTE: When you import multiple feeds, please ensure they don't all start at the same time!

Troubleshooting

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

Also see

Languages
Personal tools
This is a cached copy of the requested page, and may not be up to date.

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)


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.