phpBBBridge 1.10

Table of Contents

  1. About
  2. Requirements
  3. Features
  4. Installation Instructions
  5. phpBB Modifications
  6. phpBB Themes
  7. Adding phpBB information to the Geeklog user profiles pages
  8. Change-Log
  9. Known Issues
  10. Contact
  11. Special Thanks

1. About

Thank you for downloading the phpBBBridge Geeklog plug-in. The purpose of this plug-in is to provide a phpBB integration to the Geeklog content management system.

2. Requirements

This plugin has been confirmed to work with Geeklog 1.3.10 and greater and comes with a modified version of phpBB 2.0.20.

3. Features

The main function of the phpBBBridge is to provide a single-sign-on solution for Geeklog and phpBB. Thus, your users will only have to login once to have full access to the functionality of both your Geeklog site and the phpBB forums. It will also keep your phpBB users table synced with the information stored in the Geeklog database.

I provide two special scripts with this plugin. The first will import all of your Geeklog Forum posts into your phpBB database. The second re-syncs your Geeklog and phpBB USERS tables. This is especially important if you disable the phpBBBridge plug-in for any reasonable period of time. The script will then make sure that the databases are synced and that the plugin will work correctly. If for any reason your databases become out-of-sync, please run this script. Otherwise, your installation will likely not work. Both of these scripts can be run by pointing your browser at http://yoursite/admin/plugins/phpbbbridge/install.php and then selecting the appropriate option. These scripts can only be used after you have completely installed the phpBBBridge.

If you choose to import your Geeklog forum posts into phpBB, please be aware that until you rebuild your search index, these posts will not be searchable through the phpBB interface. To rebuild your search index, download and install the Rebuild Search MOD. This should be done after the phpBBBridge has been fully installed and after you have imported your old posts.

This plugin makes full use out of the Geeklog autolink feature. If you would like to link to a phpBB page from within a Geeklog story or comment, simply enter [forum:2 Link Text] to link to forum 2, [topic:43 Link Text] to link to topic 43, or [post:90 Link Text] to link to post 90. You may also use any Geeklog autolinks you like from within phpBB forum posts or private messages.

4. Installation Instructions

Upgrading from a previous version

  1. Backup both your Geeklog and phpBB databases.
  2. Ensure that you are running at least version 1.3.10 of Geeklog.
  3. Copy all of the files included with this plugin to their appropriate directories. Don't forget to make backups of the old files before they are overwritten. Do not delete your copy of phpBB/config.php. Doing so will make it difficult to get phpBB back up and running. Also, do not delete your phpBB2/images/avatars directory, as this contains all the phpBB avatars on your site.
  4. If you had made any modifications to these files, you will have to reapply them. Do this after you have completed the installation and ensured that everything is working properly.
  5. Update /path/to/phpbb/geeklog.inc and /path/to/geeklog/plugins/phpbbbridge/config.php so that they contain the correct paths and configuration options.
  6. Visit http://yourphpbblocation/install/update_to_latest.php to update your version of phpBB.
  7. Remove both /path/to/phpbb/install and /path/to/phpbb/contrib.
  8. Finally, point your browser to http://yoursite/admin/plugins/phpbbbridge/install.php and press "upgrade".

New Installations

  1. Ensure that you have a working install of Geeklog that matches the requirements stated above. This plugin will install a brand new copy of phpBB. Currently, there is no way to merge an existing install of Geeklog with an existing install of phpBB.

  2. Make a backup of your Geeklog database. Always make a backup before you perform operations such as installing new plugins.

  3. Move all required files and folders to their specified locations.

    Move geeklog/public_html/admin/plugins/phpbbbridge to /path/to/public_html/admin/plugins/phpbbbridge
    Move geeklog/plugins/phpbbbridge to /path/to/geeklog/plugins/phpbbbridge
    Move a copy of geeklog/public_html/layout/your_theme/phpbbbridge to every theme folder you have under /path/to/geeklog/public_html/layout
    Move phpBB2 to the web-accessible location of your choice. phpBB must be located on the same domain/subdomain as your Geeklog install. This allows Geeklog to create phpBB session cookies. Also, if you would like to rename the phpBB2 folder, feel free.

  4. Edit the plug-in's config.php file located at /path/to/geeklog/plugins/phpbbbridge/config.php and set the two variables that point to the path and the URL of the phpBB install.

  5. Edit the the geeklog.inc file located at /path/to/phpbb/geeklog.inc and set the path that points to the Geeklog public_html directory.

  6. Install phpBB by browsing to http://locationofyourphpbb/install/install.php. Follow the phpBB installation instructions during this step. When you are setting up your database variables, make sure that you use the same database as your Geeklog install.

  7. Delete the /path/to/phpbb/install and /path/to/phpbb/contrib directories.

  8. Login to your Geeklog site as a user with root privileges. Browse to the plugin administration page. Find the phpbbbridge entry in the displayed table and click on "install".

  9. Open up /path/to/geeklog/logs/error.log and ensure that there were no errors during the install.

  10. Finally, make it so that the Geeklog and the phpBB sessions timeout at the same time. Do this by making the $_CONF['session_cookie_timeout'] variable in your Geeklog's config.php file and the phpBB session length in the phpBB Administration panel equal. Failure to do this may cause your users to experience times in which they are logged into either Geeklog or phpBB, but not both.

5. phpBB Modifications

Most phpBB mods should work just fine. The one thing you need to take into consideration is the fact that to prevent a phpBB-Geeklog naming collision, I replaced all phpBB instances of "Template" with "BBtemplate". If for any reason your mod makes a reference to the "Template" class (which it most likely doesn't), change it to "BBtemplate".

6. phpBB Themes

I have included a fully functional version of subSilver with this component. It has been modified to be wrapped inside of the Geeklog interface and to look more like the Professional theme that now ships with Geeklog. Feel free to use it for your site. If you'd rather write your own theme or use an alternate one, take into account the following:

The phpBBBridge plugin functions by keeping the phpBB users table in-sync with the Geeklog users table. This syncing is only done one-way, so while changes you make from within Geeklog will migrate over, the changes you make from within phpBB will not. Because of this, we want to prevent users from changing these variables from the phpBB interface. The variables you want to prevent your users from modifying are:

Be careful, for if you flat-out remove these from the template files, they will be set to nothing every time the user updates their phpBB profile. Instead, you have to do some hidden input tag trickery. I would recommend checking out the included subSilver theme files to see how I have accomplished this. In particular, look at:

7. Adding phpBB information to the Geeklog user profiles pages

If you would like phpBB user metadata and forum statistics to show up on the Geeklog user profiles pages, you must add the appropriate template variables to /path/to/geeklog/public_html/layout/your_theme/users/profile.thtml. I have included a version of this file with this plugin that should work well with the Geeklog professional theme. If you have a custom theme, make similar changes to your copy of the file.

8. Change-Log

9. Known Issues

IMPORTANT: The version of the phpBB common.php file included with this plugin removes the security check that deletes all global variables used when register_globals is on. Geeklog versions before 1.4.0 required and used these globals, so I had to comment out this section of the file. This might open up potential security holes in phpBB. I asked over at the phpBB forums, and they said that there are no known security holes that would be opened by this, but that there might be unknown security holes. As such, install this integration at your own risk. At some point in the future I will return this code to how it used to be and stop supporting Geeklog versions 1.3.11 and below.

When an agent that does not accept cookies browses around your site, phpBB will have trouble keeping track of their session. Thus, each pageload will cause a new entry to be added to the phpBB sessions table. These will be cleared out every few minutes, so the only side-effect of this is that you will see a large number of Anonymous users with the same IP listed in the "Who's Currently Browsing" section of the Forum Admin Panel. These extra entries will not affect the number shown on your forum index that displays the number of anonymous users browsing your site. This is a minor issue, and I believe the only way to fix it would be to make it so that the phpBB session id is appended to every single URL inside of Geeklog.

10. Contact

Please contact me with any bug-reports, questions, and comments by heading over to demo.turias.net.

11. Special Thanks

Many thanks to all of the people who have sent me encouragement and bug reports throughout the life of this plugin. All of your comments have been greatly appreciated.

I would also like to thank the following people who have made code contributions: