Translations of this page: en bg cs de fi fr hu it ja pl ru tr zh

This is an old revision of the document!


Syndication

This script is used to include information about your board from pages outside the forums and to syndicate news about recent discussions via RSS / Atom / XML. The script can display a list of recent discussions, a list of active users or a collection of general board statistics. The script can be called directly via an URL, from a PHP include command or through the use of Server Side Includes (SSI).

The scripts behaviour is controlled via variables supplied in the URL to the script. The different variables are: action (what to do), show (how many items to display), fid (the ID or ID's of the forum(s) to poll for topics), nfid (the ID or ID's of forums that should be excluded), tid (the ID of the topic from which to display posts) and type (output as HTML or RSS). The only mandatory variable is action. Possible/default values are:

  • action:
    • feed - show most recent topics / posts (HTML or RSS)
    • online - show users online (HTML)
    • online_full - as above, but includes a full list (HTML)
    • stats - show board statistics (HTML)
  • type: rss - output as RSS 2.0
    • atom - output as Atom 1.0
    • xml - output as XML
    • html - output as HTML (<li>'s)
  • fid: One or more forum ID's (comma-separated). If ignored, topics from all readable forums will be pulled.
  • nfid: One or more forum ID's (comma-separated) that are to be excluded. E.g. the ID of a a test forum.
  • tid: A topic ID from which to show posts. If a tid is supplied, fid and nfid are ignored.
  • show: Any integer value between 1 and 50. The default is 15.

Examples

Here are some examples using PHP include().
  • Show board statistics:

include('http://host.com/extern.php?action=stats');

  • Show the 10 newest topics from forums with ID 5, 6 and 7:

include('http://host.com/extern.php?action=feed&show=10&fid=5,6,7');

  • Show users online:

include('http://host.com/forums/extern.php?action=online');

  • Show users online with full listing of users:

include('http://host.com/forums/extern.php?action=online_full');

And finally some examples using extern.php to output an RSS, ATOM, XML, HTML feed.

Personal Tools