When you install Lightweight Forum for the fist time, it will create the tables and import the data from Phpfox's default forum tables, so your old data are preserved and left intact. LW Forum's tables start with the "sns_", so it is easily spotted on your database.
This command will fix or update the original forum data. If you have a huge database, it may take more than a minute to execute the command.
You need to execute this command ONLY when:### Open file:
{literal}
design/templates/default/public/index.member.html
{/literal}
### Around line 92 and find:
{literal}
{ Forum::NewTopics }
{/literal}
### After add:
{literal}
{include file='public/forums/new_posts.html'}
{/literal}
Plugin menus are automatically generated by Phpfox itself, usually positioned at the right end. In order to change the sorting order, it has to be done manually. To do that, you have to turn plugin menu off:
### Open file:
{literal}
plugins/forums/phpfox_functions.php
{/literal}
### Find:
{literal}
$_PLUGIN['main_links']['public.forums'] = 'FORUM';
{/literal}
### Comment it out by putting two slahes "//" at the front so it will look like:
{literal}
// $_PLUGIN['main_links']['public.forums'] = 'FORUM';
{/literal}
From Phpfox Admin Panel main menu go to the CUSTOM MENUS section and select CREATE MENU, then add a custom menu element for the forum. Set the title as "FORUM", URL title as "forums/", menu location as "Main", the finally select the permission type according to your needs. Now, to change the sorting order, go to CUSTOM MENUS section then select MENU MANAGEMENT and change the orders the way it should be.
If you are upgrading from LW Forum version 1.3 for Phpfox 1.6 and have hacked the core Phpfox file, please following the instructions below to disable the hack, because it is not needed anymore:
### Open file:
{literal}
include/classes/App.class.php
{/literal}
### Around line 855 find and delete the code:
{literal}
if ( $sFile == 'public/forums/index.html')
{
$oTpl->assign('tiny_mce', true);
}
{/literal}
In order to create a sub-forum under a main forum, you must create a sub-category first, then create a sub-forum under the sub-cateogry you have just created.
The default forum icon image used is "forum_icon_grey.png", but there are other pre-created icon images located at "file/pic/forums/" with different colors for the forum. You can also change all the forum icons at once from Change Forum Icons.
Lightweight Forum's reuses Phpfox's default forum's CSS selectors. To make changes, you need to edit Phpfox's CSS file at:
{literal}
design/css/main.css
{/literal}
By changing the following selectors and properties:
{literal}
.forum-1 {background:#54A4DE; color:#fff; font-size:8pt;}
.forum-2 {background:#F6F6F6; color:#000; font-size:8pt;}
.forum-2 a {color:#54A4DE;}
.forum-2 a:hover {color:#54A4DE; text-decoration:underline;}
.forum-3 {border:1px #000 solid;}
.forum-4 {border:1px #000 solid; background:#fff; color:#000; font-size:8pt;}
.forum-q {background:#F5F5F5; color:#000; font-size:8pt; border:1px #54A4DE solid;}
{/literal}
To know where they are used, you need to view the template files at:
design/templates/default/public/forums/
To change the button properties like colors, font size, etc., it can done by editing the CSS files at:
{literal}
plugins/phpsns_shared/css_button.css
plugins/phpsns_shared/css_general.css
plugins/phpsns_shared/css_page_panel.css
plugins/forums/style.css
{/literal}
To change button's properties:
### Open file:
{literal}
plugins/phpsns_shared/css_button.css
{/literal}
### At line 4 and 5 find:
{literal}
background: #167BBC;
border-color: #167BBC;
{/literal}
### Change the values to something else, for example the red button will be:
{literal}
background: #FF0000;
border-color: #FF0000;
{/literal}
### To change button's font properties, modify the values at
lines 7,8 and 9:
{literal}
color:#FFFFFF;
font-weight:bold;
font-size:10px;
{/literal}
If your site background is other than white, then you also need to change the background image used for button's rounded corners. There are 5 images that comes with LW Forum for different backgrounds located at "plugins/phpsns_shared/pic":
To change the backgroud color:
### In the file css_button.css, around line 20 find:
{literal}
background-image: url(pic/btn.png);
{/literal}
### Replace the background by editing the image file,
for example the red will be:
{literal}
background-image: url(pic/btn_red.png);
{/literal}
If you can't find the background image that suits your site's background color, then you have to use any photo editor that can save the image in PNG format to change the 4 corner colors of the btn*.png. For example, if you open the image "btn_red.png" then zoom in any one of the corners unitl you can spot the pixels, you will be able see red pixels. Just change the red pixels that matches your site's background then save the image with a different name (don't forget to change the CSS property's image name to reflect your new image's name at line 20).
This is how it will affect the layout of your forum when it's turned on or off:
Fig. 1 - When it's set to "Yes":

Fig. 2 - When it's set to "No":

When a category is deleted, all of its child forums will be moved to the "orphaned" list and when a forum is deleted, all of its child categories will become forum's top main categories. This mechanism will prevent you from accidentally deleting all of the sub-categories or sub-forums of a parent branch forum or category that is going to be deleted.
You can also "move topics" before deleting a Forum so the topics can be merged into another Forum.
All files uploaded by the users using the Spaw Editor are uploaded to "file/sns_uploads/" directory. The user's sub-directory is created automatically and deleted when the account is cancelled from the site. It uses user's id number (not user name) from Phpfox's user table to create the sub-directory. So if a user id is 101, then the initial directory structure will be:
{literal}
file/sns_uploads/101/files
file/sns_uploads/101/flash
file/sns_uploads/101/images
{/literal}
The users can only access their own directory for uploading, deleting, renaming and creating the files and sub-directories. You can change file manager's user permission settings from Main Forum Settings.
The reason the AJAX related features are not working anymore is because phpfox's template file _header.html was replaced during the update. To filx the problem:
### Open file:
{literal}
design/templares/default/public/_header.html
{/literal}
### At end of the file find:
{literal}
</head>
{/literal}
### Before add:
{literal}
{if ($sTplName == "public/forums/index.html")}
<script type="text/javascript"
src="{compress file='plugins/forums/mybic.js'}"></script>
<script type="text/javascript"
src="{compress file='plugins/forums/ajax/lwforum.js'}"></script>
{/if}
{/literal}
To enable the Group Forum Replacement:
Some important points to remember:
This is due to 3 hacked files being replaced by the new update files. To fix the problem:
### Open file:
{literal}
include/modules/Groups/classes/PhpFox_ComponentGroupForumTopics.class.php
{/literal}
### Around line 66 find:
{literal}
if(!$iGroupId)
{
App::gotoUrl('public.groups');
}
{/literal}
### After add:
{literal}
/* >>>>> ---------- START LWForum ---------- >>>>> */
global $phpsns;
if ($phpsns['replace_group_forum'])
{
App::gotoUrl('public.forums.display_group', array('id'=>$iGroupId));
exit;
}
/* <<<<< ---------- END LWForum ---------- <<<<< */
{/literal}
### Open file:
{literal}
include/modules/Groups/classes/PhpFox_ComponentGroupViewForumList.class.php
{/literal}
### Around line 66 find:
{literal}
$oTpl = $this->_oModule->getTemplate();
{/literal}
### Before add:
{literal}
/* >>>>> ---------- START LWForum ---------- >>>>> */
global $phpsns;
if ($phpsns['replace_group_forum'])
{
$LWForum = new LWForum();
return $LWForum->group_forum_new_posts($iGroupId);
}
/* <<<<< ---------- END LWForum ---------- <<<<< */
{/literal}
### Open file:
{literal}
include/modules/Groups/classes/PhpFox_ServiceGroups.class.php
{/literal}
### Around line 572 find:
{literal}
$this->updateGroupCount();
{/literal}
### After add:
{literal}
/* >>>>> ---------- START LWForum ---------- >>>>> */
$LWForum = new LWForumUpdate();
$LWForum->sys_delete_group_topics($iGroupId);
/* <<<<< ---------- END LWForum ---------- <<<<< */
{/literal}
If a moderator was added in Group A and Group B and when both groups contain a forum called "Introduction", this forum's permissions for Edit, Move Topic, Delete, Moderate and Private will be overlapped. In this case, the enabled permission options will prevail over the disabled ones, so if "Edit" was enabled in Group A but was disabled in Group B, then it will still be considered as enabled.