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 extern.php is used to include information about your board from pages outside the forums and to syndicate news about recent discussions via RSS. The script can display a list of recent discussions (sorted by post time or last post time), a list of active users or a collection of general board statistics. The script can be called directly via an URL (for RSS), 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 output), show (how many topics to display), forum (the ID of the forum to poll for topics) and type (output as HTML or RSS). The only mandatory variable is action.

Possible/default values are:

  • action:
    • active (show most recently active topics) (HTML or RSS)
    • new (show newest topics) (HTML or RSS)
    • online (show users online) (HTML)
    • online_full (as above, but includes a full list) (HTML)
    • stats (show board statistics) (HTML)
  • show: Any integer value between 1 and 50. This variables is ignored for RSS output. The default is 15.
  • fid: One or more forum IDs (comma-separated). If ignored, topics from all guest-readable forums will be polled.
  • type: RSS. Anything else means HTML output.

Here are some examples using PHP include().

  • Show the 15 most recently active topics from all forums:

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

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

include('http://host.com/forums/extern.php?action=new&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');

  • Show board statistics:

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

Here are some examples using SSI.

  • Show the 5 newest topics from forums with ID 11 and 22:

<!–#include virtual=“forums/extern.php?action=new&show=5&fid=11,22” –>

  • Show board statistics:

<!–#include virtual=“forums/extern.php?action=stats” –>

And finally some examples using extern.php to output an RSS 0.91 feed.

  • Output the 15 most recently active topics:

http://host.com/extern.php?action=active&type=RSS

  • Output the 15 newest topics from forum with ID=2:

http://host.com/extern.php?action=active&type=RSS&fid=2

subscriptions

Field Type Default Description
user_id int 0 The user that subscribes to topic_id. Primary key identifier together with topic_id for this table.
topic_id int 0 The topic user_id subscribes to. Primary key identifier together with user_id for this table.

topics

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
poster varchar(200) The username (or guest name) of the user that posted the topic.
subject varchar(255) The topic subject.
posted int 0 A UNIX timestamp representing the date/time the topic was posted.
last_post int NULL A UNIX timestamp representing the date/time the last post was made in the topic.
last_post_id int NULL The ID of the last post that was made in the topic.
last_poster varchar(200) NULL The username (or guest name) of the user that made the last post in the topic.
num_views mediumint/int 0 The number of times the topic has been viewed.
num_replies mediumint/int 0 The number of replies that have been posted in the topic.
closed tinyint/smallint 0 0 = Topic is open. 1 = Topic is closed.
sticky tinyint/smallint 0 0 = Topic is a regular topic. 1 = Topic is a sticky topic.
moved_to int NULL The forum to which the topic has been moved.
forum_id int 0 The forum in which the topic resides.

users

Field Type Default Description
id int The auto-incrementing (identity) primary key identifier for this table.
group_id int 4 The user group to which this user belongs.
username varchar(200) The user's username.
password varchar(40) The user password as an 40 byte SHA1 hash or an 32 byte MD5 hash.
email varchar(50) The user e-mail address.
title varchar(50) NULL The user custom title.
realname varchar(40) NULL The user's name.
url varchar(100) NULL A link to the user's website.
jabber varchar(75) NULL The user's Jabber address.
icq varchar(12) NULL The user's ICQ UIN.
msn varchar(50) NULL The user's MSN Messenger e-mail address.
aim varchar(30) NULL The user's AOL Instant Messenger username.
yahoo varchar(30) NULL The user's Yahoo Messenger username.
location varchar(30) NULL The user's geographical location.
use_avatar tinyint/smallint 0 0 = Don't show avatar to other users. 1 = Show avatar to other users.
signature text NULL The user's signature.
disp_topics tinyint/smallint NULL The number of topics to display on forum page (uses forum default if left blank).
disp_posts tinyint/smallint NULL The number of posts to display on topic page (uses forum default if left blank).
email_setting tinyint/smallint 1 0 = Show e-mail address to other users. 1 = Hide e-mail address, but allow form e-mail. 2 = Hide e-mail address and disallow form e-mail.
save_pass tinyint/smallint 1 0 = Don't remember user between visits. 1 = Remember user between visits.
notify_with_post tinyint/smallint 0 0 = Include only topic subject in subscription notification e-mails. 1 = Include both topic subject and post content in subscription notification e-mails.
show_smilies tinyint/smallint 1 Show smilies as images.
show_img tinyint/smallint 1 Show images in posts.
show_img_sig tinyint/smallint 1 Show images in signatures.
show_avatars tinyint/smallint 1 Show avatars.
show_sig tinyint/smallint 1 Show signatures.
timezone float 0 The user's timezone.
language varchar(25) 'English' The user's preferred language for the forum UI.
style varchar(25) 'Oxygen' The user's preferred style.
num_posts int 0 The number of posts the user has made.
last_post int NULL A UNIX timestamp representing the date/time the last post by the user was made.
registered int 0 A UNIX timestamp representing the date the user registered.
registration_ip varchar(15) 0.0.0.0 The IP address used when registering.
last_visit int 0 A UNIX timestamp representing the date/time the last visit by the user commenced.
admin_note varchar(30) NULL A user note only viewable and editable by administrators and moderators.
activate_string varchar(50) NULL A temporary storage string for new passwords and new e-mail addresses.
activate_key varchar(8) NULL A temporary storage string for new password and new e-mail address activation keys.

Personal Tools