Unzip it to <Directory where PHPRunner installed>\templates\business. Then create a new project choosing Forum template from list of templates on the left.

This template is for PHPRunner at the moment. You also need to have CKEditor plugin installed in order to use this template.

A few words on how this forum works. Guest users are able to browse topics. To post a new topic or answer existing one you need to register. No threads or posts can be deleted. Users can edit their own posts though. Admin area and other potentially useful stuff were omitted for the sake of brevity.

Now the tricky part. When new topic is created we need to add a record to both Threads and Posts tables. Another trick is to make search function to search across both threads and posts.

Add a new dummy field to the SQL Query of Threads table. We are going to need this field on thread add page.

SELECT
title,
description,
startedby,
ID,
'' AS post
FROM threads

3. Pages and fields

Uncheck pages and fields we don't need.

4. Security screen

Turn on login page. Users table, username/password fields. Under User Login Settings enable options that make sense for this app.

Under Advanced Security settings enable Guest login and choose 'Users can see other users data; can edit their own data only' mode for posts table (users can edit their own posts). Use ID from Users table and userid from posts table to create a link.

5. Choose theme

Pick one of themes with search box on the top. We decided that Madrid will work the best for this application.

6. Visual Editor

We'll need to modify list pages of Threads and Posts tables to make it visually appealing.

You might ask where this fancy URL came from. Before I started making changes in Visual Editor I built this app and went to Threads list page. A typical link to details page looks like posts_list.php?mastertable=threads&masterkey1=1. I replaced 1 with $data["ID"] and made it look more prominent (style='font-size: 120%').

A few final touches. Increase row height a bit to make the list of topics more readable. Drag 'Description' field to 'Topic' column and change font color to grey. Remove grid columns you no linger need.

Rename 'Add new' button to 'Start new topic'. To make this button appear on the left switch to HTML mode and find style descriptions in the beginning of the file.
Make #recordcontrols_block look as follows:

The value of dummy field 'post' needs to be saved in session variable as we need to add it to Posts table. Since 'post' is a dummy (non-existent) field we need to remove it from the list of fields to be inserted using unset($values["post"]).

If we want to redirect user to another page after new topic was created - we need to do so in this event as well. Right now user stays on the same 'Start New Topic' page.

- Threads page: BeforeSQLQuery event

And the last step - we need to tweak search function a bit so it can search threads title and description fields as well as posts.

IF statement makes sure this code executed only when we run search. We run search on JOIN query and then return a list of thread IDs that match our criteria.

if (@$_REQUEST["a"]=="integrated" && @$_REQUEST["ctlSearchFor"])
{
$strWhereClause = " id in (SELECT distinct threadid FROM threads inner join `posts` on
threads.id=posts.threadid
WHERE message like ('%".$_REQUEST["ctlSearchFor"]."%') or title like ('%".$_REQUEST["ctlSearchFor"]."%')
or description like ('%".$_REQUEST["ctlSearchFor"]."%'))";
}

This is it. You can build it now and run it in the browser.

As a next step you can add an admin area, give admin permissions to rename/delete topics, add mass email capabilities, add CAPTCHA etc. It also makes sense to allow users edit their own data i.e. change email address.

You are welcome to post questions and suggestions for the next version. If someone wants to take this template to the next level - we'll be glad to provide all required assistance including posting updated versions of template here.

Welcome.
I tried several times to run the forum template PHPRunner 5.3 and each time it ended in failure. Please help where is the problem. I copied the unzipped files to a specified directory and does not appear in the window of the templates.
Thank you for your help.