Help

Table of Contents

LW Forum's Database Tables

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.

Fix & Update Forum

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:
  • you have installed the Lightweight Forum for the first time
  • you have upgraded to this version from older LW Forum versions
  • you have added or deleted data to the tables directly using a MySQL Client
  • There was a site or server crash resulting in inconsistent forum data
It will fix the problems by:
  • cleaning up orphaned topic posts without the owner (poster) or parent forum
  • cleaning up orphaned reply posts without a parent topic
  • cleaning up orphaned subscriptions without a topic or user
  • update entire forum's "in depth" Last Post, Total Topics and Total Posts information
  • update every topic's Last Reply information.
  • update every forum's Last Post information
  • update user profile forum's User Topics and Visitor Topics counters
  • update general forum stats (Total Topics & Total Posts)

To Show 'New Forum Post' At Member's Index Page

### 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}

Resorting Menus

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.

Disabling Tiny MCE Editor hack for previous LW Forum version 1.3 for Phpfox 1.6

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}

Creating Forums & Sub-Forums

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.

Forum's CSS Properties

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 CSS Button Properties

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 Post Topic and Post Reply CSS button colors

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":

  • btn.png (white by default)
  • btn_beige.png
  • btn_black.png
  • btn_brown.png
  • btn_red.png

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).

What is "Show sub-category titles with sub-forum links" option for?

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":

Deleting Forums and Categories

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.

Spaw Editor's File Manager Uploads

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.

AJAX features like Sticky Comments and Report Abuse are not working anymore after Phpfox updates

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}

Steps To Enable Group Forum Replacement

To enable the Group Forum Replacement:

  1. Go to Group Forum Replacement settings page
  2. Assign Forum to the Group Categories
  3. Import Group Forum Posts
  4. Enable the Group Forum Replacement option at Main Forum Settings

Some important points to remember:

  • Group Forum Replacement can be turned off or on anytime.
  • More than one group categories can be assigned to the same forum.
  • All the group categories must have a forum assigned to it.
  • You can change and reassign the forums to different group categories, but the topics that as been posted before the change WILL NOT be moved to the newly assigned forums.
  • When a group owner sets the "Public Forum" as "No", only members can read the topic messages that belong to the group, even though others (that did not join the broup) can still see the topics listed on other parts of the site.
  • If a Forum is going to be deleted from the Admin Panel, all the topics including the group topics will be deleted all together.
  • Even if the Group Forum Replacement is disabled, the old forum topics originally posted form the group will still be tied to their parent groups.

Group Forum Replacement is not working anymore after Phpfox updates

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}

When Moderator's forum permission overlaps in more than one "Group Permissions"

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.

Support

For support, please submit a ticket at PhpSNS Helpdesk or send messages directly to info@phpsns.com.