Siilihai Web Forum Reader Siilihai Web Forum Reader Siilihai Web Forum Reader Take back the discussions!


Log in





Register
Lost password?

Siilihai is a non-commercial open source project. To support development, please

Creating Parsers

If you understand HTML language used to create web pages, you should be able to add a new forum support by creating a parser for it. If you don't understand HTML or these instructions feel too difficult, you can also leave a request for forum to be added.

Siilihai has a built-in parser editor in the reader application. See the Parser Maker documentation for details.

Parser definition field reference

Basic information

These fields give the basic information about the forum.

Property Name Type Description Optional
parser_name String Human-readable name of the forum this parser parses. For example "My forum"
date_format Enum (Not currently used) Could be used to help parse date strings from forum so that messages could be for example sorted by date. Yes
charset String Character set used by forum. Leave blank for UTF-8. In Firefox you can see the correct value by coosing Tools | Page Info. Some broken forums do not specify this at all and you'll have to guess a value that works. Yes
forum_software String Human readable name of the forum software used on this forum. Yes
parser_type Enum: Public, Private or Development Set to:
Public for normal parsers.
Private, if the forum can not be used by everyone (for example corporate forums)
Development, if the parser is not ready or it is used for testing purposes

Basic information fetching

The following properties specify the URLs where these can be found. The property patterns can contain special tags which are replaced to the actual information.

Property Name Type Description Optional
forum_url String Base url for the forum parsed by this parser. For example http://www.example.com/forum/forum.php. This page also should have the list of groups in the forum.
thread_list_path String This path should show the list of threads in group specified.
The path can be easily be figured out by moving mouse over group links on the forum front page.
%g - group ID
%p - page number (optional)
Example: viewforum.php?f=%g&p=%p
view_thread_path String This path should show all messages in a single thread.
%g - group ID
%t - thread ID
%p - page number (optional)
Example: viewtopic.php?f=%g&t=%t
login_path String This page is the page that should be loaded when user logs into the forum. It may be a little tricky to find as it may never be shown in the browsers location bar.
Go to the page with login form, view the page source and look at <form action="xxx"> tag which posts the login credentials. The xxx is probably the login path.
This property is only needed if parser supports logging in.
%u - username
%p - password
Example: ucp.php?mode=login
Yes
view_message_path String This page should display the requested message. This property is used only for the "Open in browser" function of Siilinhai client, so it is optional. The page may also show other messages, but should preferably show only the one wanted.
%g - group ID
%t - thread ID
%m - message ID
Example: viewtopic.php?f=%g&t=%t&sk=t&sd=a#%m
Yes
Property Name Type Description Optional
group_list_pattern String This pattern extracts group id, group name and last change for all groups from the URL specified in forum_url (forum front page).
%a - group ID
%b - group name
%c - last change (optional)
thread_list_pattern String This pattern extracts thread id, name and last change for all threads from the URL specified in thread_list_path (list of threads).
%a - thread ID
%b - thread name
%c - last change (optional)
message_list_pattern String This pattern extracts message id, message title (subject), message body, message author and last change for all messages from the URL specified in view_thread_path (list of messages in a thread).
%a - message ID
%b - message title (optional)
%c - message body
%d - message author (optional)
%e - last change (optional)

Logging in

Property Name Type Description Optional
verify_login_pattern String This pattern is different from the others in the way that it does not extract any data - it is only used to verify that logging in was successful. If the pattern is found inside the page received by logging in to login_path page, login is considered successful. Put a short clip of HTML which is displayed only if the user is logged in in the pattern. Typically this can be HTML for the "logout" button.
%u - username (optional)
Yes
login_parameters String Comma-separated list of parameters to send to login_path page when user logs in. Interpretation of these depends on login_type property, but typically when type is HTTP POST the parameters are sent as HTTP POST parameters. Some forum software require more parameters sent than just username and password, and you can define them here along with their values.
%u - username (optional)
%p - password (optional)
Example: username=%u,password=%p,autologin=yes,sid=xxx,login=xxx
Yes
login_type Enum: N/A, HTTP POST, HTTP GET, HTTP Authentication Defines the method how to log in.
N/A - Logging in is not supported
HTTP POST - Login parameters are sent using HTTP POST. This is the most common way in modern forums.
HTTP GET - Login parameters are sent using HTTP POST.
HTTP Authentication - The forum pages use HTTP Authentication. Username and password are sent as reply. login_parameters is ignored in this case.
Yes

Multi-page spanning

Property Name Type Description Optional
thread_list_page_start Integer Page number for start of thread list. Typically 0 or 1. Yes
thread_list_page_increment Integer Increment to add to thread_list_page_start to get to the next page. Typically 15, 25 or 30. Yes
view_thread_page_start Integer Page number for start of message list. Typically 0 or 1. Yes
view_thread_page_increment Integer Increment to add to view_thread_page_start to get to the next page. Typically 15, 25 or 30. Yes

Posting and replying

Not yet supported.
Property Name Type Description Optional
posting_path
posting_subject
posting_message
posting_parameters
posting_hints
reply_path
reply_subject
reply_message
reply_parameters

Contact Siilihai.com at siilihai@siilihai.com | Mailing List | Irc: #siilihai on IRCNet and Freenode