# Geeklog Plugins by Portalparts - www.portalparts.com

## Geeklog forum plugin - version 2.7.1

### Author: Blaine Lang < blaine@portalparts.com >

### Date: July 19 2008

#### Requires minimum Geeklog version 1.4 and version 1.4.1+ recommended

This plugin provides a full featured discussion forum with integrated Geeklog features for your community website.

Summary of features:

- Integrated Geeklog group security to create restricted forums
- Support for Readonly Forums - example FAQ use
- Support for RSS Feeds - now with enhanced formatting and rich content
- Advanced Moderation features like splitting topics, moving, making sticky
- Integrated BBcode supports using text mode and bbcode tags to format content
- Able to now safely just use text mode for posting and still use bbocode and advanced formatting features
- Enhanced Code Formatting using the Geshi library
- Automatic notification support for complete forums or topics. Able subscribe to a forum but then selectively un-subscribe to topics
- Member listing page - able to view all members or just those with forum activity
- Centerblock for site frontpage or sideblock for users to monitor new posts
- Support for autotags in topic content and can reference other forum topics using an autotag [forum: topicid]
- Integrated SPAMX and content filtering
- Integrated support for Captcha 2.0
- Integration opion with glMessenger for member private messaging and online smilie admin
- Easy online admin administration and member control of user preferences
- Support for Register Globals off and MySql 5

Summary of version 2.7 changes

- Version 2.7.1 includes a fix to the forum search to resolve a potential security issue
- Added logic to support flexible block and menu layout - requires new variables in your themes functions.php
- Added support for member badges - see plugins config.php
- Display topic subject in browsers page title
- Fix to code tracking new posts - function updateLastPost
- SIG now supports using autotags - example use the MG plugin to show an image in your sig
- Search now will search topic subject
- Removed un-used statusmsg_pause setting
- lib-portalparts.php - function ppGetUserBlocks now uses perm.owner
- Fix to displaying member level
- Fix to move topic logic - Corrects postcount and viewcount counts that are shown per forum
- Changes to memberlist logic - uses new images and now uses the gf_getImage function to support alternative image types

This chapter contains the following sections:

- New installation
- Upgrading from version 2.6
- Upgrading from version 2.5RC3
- Upgrading from version 2.3.2
- Themeing Plugin
- Config.php Settings
- Plugin Installation Overview Reference

If you've enjoyed this plugin, please consider supporting my contributions. These projects require considerable time and effort to create for distribution and ongoing support. The intial version of this plugin was released in 2002. |

1) How to Install

You need to manually create the plugins program directories and copy the files to their appropriate directories.

If you are new to installing a geeklog plugin, I recommend that you review the background documentation on how to install a plugin here

Step 0 - Backup your Database

- Make a backup of your current geeklog database using the built-in admin feature. Verify your backup feature is configured correctly and backup file is not 0 bytes. This is worth the time to verify your backup

Step 1 - Restore the plugin Archive

- Uncompress the archive files into your <geeklog_dir>/plugins directory. It will create a forum subdirectory for the files.

Step 2 - Create the required plugin directories

- Create a directory called forum under your public_html directory
- Create a directory called forum under your public_html/admin/plugins directory

Step 3 - Copy the the required plugin files

- Copy the files (contents) from the new plugin's public_html directory to the forum directory you just created under your sites main public_html directory
- Copy the files (contents) from the new plugin's admin directory to the forum directory you just created under your sites main public_html/admin/plugins directory

Step 4 - Copy the the required theme files

- Copy the directory called forum and contents from the new plugin's themefiles directory to your sites theme's directory. Assuming your site is running the professional theme this would be public_html/layout/professional. You would then copy the themefiles/forum directry from the plugin archive so that you create a professional/forum directory with all the new layout files from the plugin archive

Step 5 - Update or copy the lib-portalparts.php file

- The plugins from portalparts use a number of common functions that are placed in the lib-portalparts.php file. Copy the file from the plugin archive to your system folder where there are other lib-xxxxx.php files

Step 6 - Run the plugin install

- Logged in as 'admin' you can access the installer from the plugin editor [admin -> plugins]
- If the files have been copied correctly in step 3 and 4, you will see the new plugin to be installed

Step 7 - Update your themes css - style.css file

- > The forum is using the plugin CSS that is distributed with the GL 1.4.1 professional theme. If you are running a GL 1.4.1 site and using the stock professional theme or a 1.4.1 certified theme, you will only need to add a few new CSS styles declarations for the codeblock and quote formatting feature.

- If you have a GL 1.4 site or using a beta release of GL 1.4.1, then update style.css file using the pre1.4.1_forum.css file in the archive under the themefiles folder. Backup your current style.css file for reference and for many sites, they can just replace all the plugin like CSS declarations. They should all be grouped together in your style.css file.
- Pre 1.4.1 themes will also need to add missing navbar images. Add the images found in archives themefiles/navbar/images folder to the same folder under your site's theme.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.
- If you have a GL 1.4.1 final site, then you will only need to add the few additional CSS styles for the codeblock and quote formatting.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.

Step 8 - Setup your forums and review Admin Settings

- Create atleast one category which will contain one or more forums
- Create a forum within this category. A forum will then contain many topics which are created by your community of users. The forums are created and so named to organize your topics.
- The forums can be setup to be restricted to site-members only or public access as well other options can be set to control the access to the forums
- Review the optional plugin config.php settings

Goto Top

2) How to update from version 2.5RC3

Step 0 - Backup your Database.

- Make a backup of your current geeklog database using the built-in admin feature. Verify your backup feature is configured correctly and backup file is not 0 bytes.
  The backup is strongly recommended. The update will need to modify your database. Additionally, incase there are any formatting issues with your forum content after the update, you may want to have the option of going back

Step 1 - Disable the forum plugin (optional)

Note: A bug in GL 1.4.1 pre-release may create a SQL error when toggling the enable/disable of the plugin. If this occurs - skip this step and leave it enabled.

- From the Plugin Editor Admin > plugins, disable the forum plugin so any current site users will not be accessing the forum during the update. This is an optional step and not required.

Step 2 - Restore the plugin Archive

- Uncompress the archive files into your <geeklog_dir>/plugins directory. You will need to replace all the files and some directories and files are no longer needed.
- Update all your sites main public_html/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/admin/plugins/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/layout/{theme}/forum files. Suggest you delete current files and copy over the new files

Step 3 - Run the plugin update

Note: If the forum was still enabled, the centerblock and sideblock will be disabled once you copy over the new code until you complete the plugin update

- Access the plugin update from the Plugin Editor. The plugin listing will show version 2.5RCx is installed and that an update is recommended. Using the Edit link by the plugin record, access the edit screen where there will now be an update button. Pressing [Update] will execute the needed database changes
- Run the Forum Re-Sync admin feature to complete the update of the new forum fields. From the Admim->Forum screen, access the admin section for forums. You will see that you can Re-Sync each forum or all forums for a category.

  > This is a manual task because initial testing on large forums found that an automated update on a site with a large number of forums and possiby thousands of posts per forum could exceed the max-execution time allowed on your webserver

Step 4 - Update your theme and theme css - style.css file

- > The forum is using the plugin CSS that is distributed with the GL 1.4.1 professional theme. If you are running a GL 1.4.1 site and using the stock professional theme or a 1.4.1 certified theme, you will only need to add a few new CSS styles declarations for the codeblock and quote formatting feature.

- If you have a GL 1.4 site or using a beta release of GL 1.4.1, then update style.css file using the pre1.4.1_forum.css file in the archive under the themefiles folder. Backup your current style.css file for reference and for many sites, they can just replace all the plugin like CSS declarations. They should all be grouped together in your style.css file.
- Pre 1.4.1 themes will also need to add missing navbar images. Add the images found in archives themefiles/navbar/images folder to the same folder under your site's theme.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.
- If you have a GL 1.4.1 final site, then you will only need to add the few additional CSS styles for the codeblock and quote formatting.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.
- The forum now is able to appear with leftblocks only (default), noblocks, rightblocks only or both left and right blocks. Setting to noblocks allows the forum to appear the full-width of your theme. Additionally, you can show the usermenu as a horizontal navbar which is necessary if you are not showing left or right blocks. These new settings are expected to be in your themes functions.php file so the layout can be theme specific. Refer to the default professional theme version of functions.php that is in the plugin archive themefiles directory for more details.

Step 5 - Review Admin Settings

- Review the admin settings
- Review the optional plugin config.php settings

Congradulations - you should now have your forum updated to version 2.7

Goto Top

3) How to update from version 2.3.x

The update process will update your forum to version 2.6 in one step if version 2.3.x detected

Step 0 - Backup your Database.

- Make a backup of your current geeklog database using the built-in admin feature. Verify your backup feature is configured correctly and backup file is not 0 bytes.
  The backup is strongly recommended. The update will need to modify your database. Additionally, incase there are any formatting issues with your forum content after the update, you may want to have the option of going back

Step 1 - Disable the forum plugin (optional)

Note: A bug in GL 1.4.1 pre-release may create a SQL error when toggling the enable/disable of the plugin - skip this step and leave it enabled.

- From the Plugin Editor Admin > plugins, disable the forum plugin so any current site users will not be accessing the forum during the update. This is an optional step and not required.

Step 2 - Restore the plugin Archive

- Uncompress the archive files into your <geeklog_dir>/plugins directory. You will need to replace all the files and some directories and files are no longer needed.
- Update all your sites main public_html/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/admin/plugins/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/layout/{theme}/forum files. Suggest you delete current files and copy over the new files

Step 3 - Run the plugin update

Note: If the forum was still enabled, the centerblock and sideblock will be disabled once you copy over the new code until you complete the plugin update

- Access the plugin update from the Plugin Editor. The plugin listing will show version 2.5RCx is installed and that an update is recommended. Using the Edit link by the plugin record, access the edit screen where there will now be an update button. Pressing [Update] will execute the needed database changes
- Run the Forum Re-Sync admin feature to complete the update of the new forum fields. From the Admim->Forum screen, access the admin section for forums. You will see that you can Re-Sync each forum or all forums for a category.

  > This is a manual task because initial testing on large forums found that an automated update on a site with a large number of forums and possiby thousands of posts per forum could exceed the max-execution time allowed on your webserver

Step 4 - Update your theme files and theme css - style.css file

- > The forum is using the plugin CSS that is distributed with the GL 1.4.1 professional theme. If you are running a GL 1.4.1 site and using the stock professional theme or a 1.4.1 certified theme, you will only need to add a few new CSS styles declarations for the codeblock and quote formatting feature.

- If you have a GL 1.4 site or using a beta release of GL 1.4.1, then update style.css file using the pre1.4.1_forum.css file in the archive under the themefiles folder. Backup your current style.css file for reference and for many sites, they can just replace all the plugin like CSS declarations. They should all be grouped together in your style.css file.
- Pre 1.4.1 themes will also need to add missing navbar images. Add the images found in archives themefiles/navbar/images folder to the same folder under your site's theme.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.
- If you have a GL 1.4.1 final site, then you will only need to add the few additional CSS styles for the codeblock and quote formatting.
  Add the CSS declarations from the forum.css file in the archive under the themefiles folder.
- The forum now is able to appear with leftblocks only (default), noblocks, rightblocks only or both left and right blocks. Setting to noblocks allows the forum to appear the full-width of your theme. Additionally, you can show the usermenu as a horizontal navbar which is necessary if you are not showing left or right blocks. These new settings are expected to be in your themes functions.php file so the layout can be theme specific. Refer to the default professional theme version of functions.php that is in the plugin archive themefiles directory for more details.

Step 5 - Review Admin Settings

- Review the admin settings
- Review the optional plugin config.php settings

Congradulations - you should now have your forum updated to version 2.7

Goto Top

3) How to update from version 2.6

The update process will update your forum to version 2.7 in one step if version 2.6 detected. No database updates are made other then changing the version displayed.

Step 0 - Backup your Database.

- Make a backup of your current geeklog database using the built-in admin feature.

Step 1 - Disable the forum plugin (optional)

Note: A bug in GL 1.4.1 pre-release may create a SQL error when toggling the enable/disable of the plugin - skip this step and leave it enabled.

- From the Plugin Editor Admin > plugins, disable the forum plugin so any current site users will not be accessing the forum during the update. This is an optional step and not required.

Step 2 - Restore the plugin Archive

Note: Make a copy of your plugins config.php and compare to the new one if you have made changes. Additionally, do the same for your forum theme files if you have made changes that you don't want to loose.

- Uncompress the archive files into your <geeklog_dir>/plugins directory. You will need to replace all the files and some directories and files are no longer needed.
- Update all your sites main public_html/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/admin/plugins/forum files. Suggest you delete current files and copy over the new files
- Update all your sites main public_html/layout/{theme}/forum files. Suggest you delete current files and copy over the new files
- Update the system/lib-portalparts.php - new version is located in the system folder of the archive

Step 3 - Run the plugin update

- Access the plugin update from the Plugin Editor. The plugin listing will show version 2.6 is installed and that an update is recommended. Using the Edit link by the plugin record, access the edit screen where there will now be an update button. Pressing [Update] will execute the needed database changes

Step 4 - Update your theme

- > The forum now is able to appear with leftblocks only (default), noblocks, rightblocks only or both left and right blocks. Setting to noblocks allows the forum to appear the full-width of your theme. Additionally, you can show the usermenu as a horizontal navbar which is necessary if you are not showing left or right blocks. These new settings are expected to be in your themes functions.php file so the layout can be theme specific. Refer to the default professional theme version of functions.php that is in the plugin archive themefiles directory for more details.

Step 5 - Review Admin Settings

- Review the admin settings
- Review the optional plugin config.php settings

Congradulations - you should now have your forum updated to version 2.6

Goto Top

4) Theming the plugin look

The plugin uses the new default plugin CSS declarations that were introduced in GL 1.4. Example of the main CSS decalarations used are:

- .pluginRow1 and .pluginRow2 for the alternating file listing records

  > More detail planned

The templates were copied to your theme directory - folder /forum/layout directory

- Main templates are in the top level layout folder
- Templates for the centerblock and sideblock are located in the blocks subfolder
- The forum footer related templates are located in the footer subfolder
- Templates for most of the links like [new topic], [reply], [profile], [email] etc are themed using the templates under the links subfolder. It's possible to change these links to use images, CSS like buttons etc.
- Templates for pages that show a report if newposts, members, subscriptions etc are located in the reports folder

Goto Top

5) Config.php Settings

Most of the common forum settings are now online settings but there are additional settings in the plugins config.php file

- $CONF_FORUM['mysql4+']
  Set to true if your server is running MySQL 4.x or later. Doing so will use optimized SQL queries and will improve performance.
- $CONF_FORUM['pre2.5_mode']
  Set to true only for sites that have updated from version 2.3.x or 2.5. If this is a clean install set to false and the forum will skip a few extra tests that are done while displaying a topic.
- $CONF_FORUM['silent_edit_default']
  When editing a post, you have a checkbox by the Submit button. If the silent option is not checked, the posted date will be updated and notifications sent out. If checked the Edit/Save is done siliently. This config option sets the default - set to true to have this checked by default.
- $CONF_FORUM['avatar_width']
  Able to set the width of the member avatar in pixels. Default is to use the member's uploaded image and size GL site has for creating this thumbnail image. If a value is defined for this setting, the forum will resize the displayed image to this defined width
- $CONF_FORUM['allow_img_bbcode']
  The BBCode tag [img] is enabled by default - set this to false to disable it
- $CONF_FORUM['show_moderators']
  Disabled by default for performance gains. Enable if you need to show moderators on the main forum index page - set this to true to display moderators
- $CONF_FORUM['imgset']
  This option normally will not be changed. It defines the URL to where the theme images are located
- $CONF_FORUM['imgset_path']
  This option normally will not be changed. It defines the path to where the theme images are located
- $CONF_FORUM['autoimagetype']
  The forum uses a number of icons and you may have a need to use a mixture of image types. Setting this setting to true will invoke a function that will first check for an image of the type set in your themes function.php $_IMAGE_TYPE. If the icon of that image type is not found, then it will use an image of type specified by the $CONF_FORUM['image_type_override'] setting. Set $CONF_FORUM['autoimagetype'] to false to disable this feature and only icons of type set by the themes $_IMAGE_TYPE setting will be used
- $CONF_FORUM['image_type_override']
  If the setting above is enabled and the default image type for an icon is not found - you can specify an alternative image type to use in this setting. Example 'gif' or 'jpg' are valid
- $CONF_FORUM['default_Datetime_format']
  Default date/time format to use if Forum setting for allow user-dateformat is disabled. Refer to the online php manual for more info on the time format string options.
- $CONF_FORUM['default_Topic_Datetime_format']
  Date format that is shown at the top of of the topic post used if Forum setting for allow user-dateformat is disabled. Refer to the online php manual for more info on the time format string options.
- $CONF_FORUM['contentinfo_numchars']
  Number of characters of the topic contents when hovering over the topic post subject link.
- $CONF_FORUM['linkinfo_width']
  Width of pop-up info window that is displayed when hovering over topic posts. Also refer to the CSS declaration tooltip
- $CONF_FORUM['quoteformat']
  Format style that will be used when using the quote feature. Also refer to the CSS decalaration quotemain
- $CONF_FORUM['show_popular_perpage']
  Set the default number of records to show in the 'Popular Topics' report
- $CONF_FORUM['show_last_post_count']
  Set the default number of records to show in the Members most recent forum posts report

Goto Top