phpBBBridge 1.10
Table of Contents
- About
- Requirements
- Features
- Installation Instructions
- phpBB Modifications
- phpBB Themes
- Adding phpBB information to the Geeklog user profiles pages
- Change-Log
- Known Issues
- Contact
- 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
- Backup both your Geeklog and phpBB databases.
- Ensure that you are running at least version 1.3.10 of Geeklog.
- 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.
- 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.
- Update /path/to/phpbb/geeklog.inc and /path/to/geeklog/plugins/phpbbbridge/config.php so that they contain the correct paths and configuration options.
- Visit http://yourphpbblocation/install/update_to_latest.php to update your version of phpBB.
- Remove both /path/to/phpbb/install and /path/to/phpbb/contrib.
- Finally, point your browser to http://yoursite/admin/plugins/phpbbbridge/install.php and press "upgrade".
New Installations
- 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.
- Make a backup of your Geeklog database. Always make a backup before you perform operations such as installing new plugins.
- 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.
- 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.
- 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.
- 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.
- Delete the /path/to/phpbb/install and /path/to/phpbb/contrib directories.
- 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".
- Open up /path/to/geeklog/logs/error.log and ensure that there were no errors during the install.
- 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:
- In overall_header.tpl, refer to {GEEKLOG_HEADER} to print out the Geeklog header with or without the left blocks.
- In overall_footer.tpl, refer to {GEEKLOG_FOOTER} to print out the Geeklog footer with or without the right blocks.
- In overall_header.tpl, the {META} variable does not work as it would have needed to be included in the Geeklog header to work. As a work-around, reference {JS_REFRESH_CODE} after {GEEKLOG_HEADER}.
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:
- username
- password
- e-mail address
- homepage
- location
- showonline (whether or not the user appears in the Online Users block)
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:
- profile_add_body.tpl
- admin/user_edit_body.tpl
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
- 1.09 to 1.10
- Upgraded the version of phpBB included to 2.0.21.
- 1.08 to 1.09
- Fixed a bug with centerblock positioning for anonymous users. The block would appear above the featured story when the configuration entry said to put it below. (thanks kingsley and mevans)
- Upgraded the version of phpBB included to 2.0.20.
- Cleaned up the HTML title attribute for topic and forum pages.
- Corrected a couple URLs to use & instead of regular ampersands. (thanks asmaloney)
- Added autotag and autolink support to forum posts and private messages.
- 1.07 to 1.08
- Fixed an installation issue with phpBB.
- 1.06 to 1.07
- Now supports servers where register_globals=false.
- 1.05 to 1.06
- Fixed a login error introduced in 1.05 (thanks asmaloney).
- 1.04 to 1.05
- Upgraded the version of phpBB included to 2.0.19.
- Fixed a bug that caused login errors if the Geeklog install was not located at the root of the domain (thanks fdaasdf).
- 1.03 to 1.04
- Improved the code used to redirect you to the same page when the logins are synced.
- 1.02 to 1.03
- Upgraded the version of phpBB included to 2.0.18.
- Added a Portuguese translation for the plugin (thanks Bruno Monteiro).
- Fixed a bug that caused posts by anonymous users to be displayed incorrectly on the center and side blocks.
- Removed some of the sid attributes from the redirect URLs, since they should not be necessary in the Geeklog integration.
- 1.01 to 1.02
- Upgraded the version of phpBB included to 2.0.17.
- Made the HTML title attribute of phpBB's index.php, viewtopic.php, and viewforum.php more informative (thanks RickW).
- Fixed a bug where some browsers had trouble with the form on the phpBBBridge install page (thanks Russ).
- Now allows the centerblock to be placed at the very bottom of the page.
- Added a Spanish translation for the plugin (thanks Javier Caselli).
- Added a Finnish translation for the plugin (thanks Ilmari Karimies).
- 1.0 to 1.01
- Fixed a bug that caused forum topics to not be marked as read for admin users.
- 0.79 to 1.0
- Added a sideblock and a centerblock where the most recent forum posts are displayed.
- Made changes to the subSilver template so that it looks much better with the Professional Geeklog theme.
- Added phpBB stats to the Geeklog site statistics page.
- Added a phpBB admin panel link to the admin/moderation.php page.
- Added code so that with a couple Geeklog template changes, phpBB information can be added to the Geeklog user profiles pages.
- The plugin now utilizes the Geeklog autolink feature.
- Upgraded the version of phpBB included to 2.0.15.
- Changed the phpBB login code so that now, on each page load, if the user is logged into Geeklog but not phpBB, the user will relogin to phpBB.
- Fixed a Geeklog issue with systems that have magic_quotes off.
- Improved the HTML->BBCode conversion in the Forum Plugin import script.
- 0.78 to 0.79
- Fixed some login bugs introduced in 0.78.
- Upgraded the version of phpBB included to 2.0.12.
- 0.77 to 0.78
- Added auto-redirects after a user posts a message. If you have a modified theme, see how the included theme uses the {JS_REFRESH_CODE} template variable.
- Simplified inclusion of the lib-common.php file. Should reduce debugging headaches and make mods easier to install.
- Fixed a bug where the lib-common.php file was not always included, especially during calls of message_die()
- 0.75 to 0.77
- Fixed a syntax error in functions.inc.
- Fixed a cosmetic bug where new users would look like moderators in the Who's Online block until they updated their profile.
- 0.70 to 0.75
- Updated the plugin to function with Geeklog 1.3.10 and phpBB 2.0.11. No more overwriting core Geeklog files! (for now)
- A modified version of phpBB now ships with this plugin. No longer do users need to modify and replace core phpBB files. This should make installations and upgrades much easier.
- Users no longer have to manually wrap the phpBB interface inside of Geeklog, as this is done automatically.
- Fixed a bug that caused moderators to lose their moderator coloring in the phpBB Who's Online block if they updated their Geeklog profile.
- 0.60 to 0.70
- There was a bug that prevented people whose sessions had expired from browsing directly to a phpBB page when the interface is wrapped. This has been fixed.
- Added functionality to import the posts and forums from the Geeklog Forum plug-in to phpBB.
- Added a script to re-sync the Geeklog and phpBB Users table which should be run if the data found in them is ever inconsistent.
- Revamped the plugin-install page with extra-helpful user options. Should make installing, upgrading, and performing the rare administrative task much easier.
- If users are allowed to change their usernames, this change will now propagate to the phpBB database.
- 0.50 to 0.60
- Fixed some phpBB session creation and keep-alive bugs.
- Added a link to the user's private messages in the GL user's block.
- Added a link to the phpBB admin panel in the GL admin block.
- Fixed some errors in the readme and added some new info.
- Fixed a bug that would prevent phpBB from being able to be wrapped inside the Geeklog interface.
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:
- Javier Caselli - For the Spanish translation of the plugin
- Ilmari Karimies - For the Finnish translation of the plugin
- Bruno Monteiro - For the Portuguese translation of the plugin