WP_PHPBB_Integration (Version 1) (78 posts)

  1. WDuluoz
    Posted 10 years ago #

    After a lot of help from Fluffy ( http://trikuare.cx/ ) and Skippy ( http://www.skippy.net ), I have finally manage to make the plugin work.
    This plugin integrates WordPress and PHPBB, using PHPBB as the comment engine.
    (unfortunately it is not a completely one-click plugin yet)

    For complete information, directions, and a demonstration go to

    I am working on other features, but also working on a MA thesis. (so forgive me if they dont get implemented quickly)

    Feedback is always welcomed.

  2. skippy
    Posted 10 years ago #

    This looks like a good start! phpBB by itself is extremely complicated; but it looks like you're making good headway. Keep it up!

  3. WDuluoz
    Posted 10 years ago #

    Updated to WPHPBB-V1.1

    Version 1.1: Fixed typos.
    Changed name to something catchy and easier to type, added $redirect_name for symbolic links,
    separated $phpbb_root_path and $phpbb_path to work with permalinks
    temporary fix for theme_editor.php problem by placing it link in header.

    The plugins_loaded was causing the wp theme_editor.php to not find the template.

    Getting close to login integration and trying to setup admin page.

  4. dss
    Posted 10 years ago #

    This is totally fascinating to me.

    I'm a little unclear about how PHPBB and WP are integrating in your example. But I'm all for this kind of hybrid (strangely enough.)

    If you need a hand, let me know.


  5. dmx
    Posted 10 years ago #

    there an example of the outcome? i know me and lots of people lookin for the forum and wp integration. good job

  6. WDuluoz
    Posted 10 years ago #

    The demonstration is my site. I have it working at http://www.happypoet.com
    The comments are actually posts in PHPBB, and using a script Fluffy made and PHPBB fetch all to pull the text, avatars, such in to the template of WP.
    Let me stress again that I am a php "noob". Without Fluffy's integration script (MT and PHPBB) , I wouldnt have even thought of doing it.

    My problem now is how to make WP login the user with a name and password. I have setup a small extension to the comment integration that checks WP's user database to see if the PHPBB user is there. If not, it adds all the information needed to register. If they are, it checks to see if everything matchs, and if not, updates to PHPBB's database. This keeps the databases synced.
    I am having trouble making the cookie, so the user will be logged into WP after logging into PHPBB, and then clearing the cookie, when they log out. I can clear the cookie easily, but setting the cookie is stumping me at the moment.
    Back to tinkering.

  7. WDuluoz
    Posted 10 years ago #

    WPHPBB Version 1.62

    Version 1.62 (07042005)
    (In all regards should have been 1.0)
    the user has to define first before activating if they need to activate to define, hehe)
    creates Integrate Table on Activation (if needed)
    added options panel to configure plugin
    integrated the integration script (Fluffy’s Integration Script).
    fixed more typos and errors (slowly becoming clean and standard (ok standardish)
    moved integrate table to wp database
    uses table prefix of wp to make it match (so multiple wp’s can be used with multiple wphpbbs not interfering)
    phpbb_prefix not needed

    Login integration is still giving me trouble.

    Woring on currently:
    Add Ability to define and change div tags for Comment and Comment Form in Options
    Add Recent Discussions section (pull select number of recent topics from specified forum or all forums)
    Login integration (if I can just figure it out)
    Redefine get_userdata and make_clickable without having to change wordpress function names.
    Standardizing the code.

  8. WDuluoz
    Posted 10 years ago #

    WPHPBB V1.7
    Updated (again):
    new features: polls (from phpbb), users online, and recent discussions.
    css can be configured in options panel.
    comments counts now include ping, trackback, and old wp comments.

    Still having problems with figuring out Login Integration.

    Future: same as before.

  9. dss
    Posted 10 years ago #

    This is very cool.

    Where is the actual phpbb on your site?

  10. WDuluoz
    Posted 10 years ago #

    http://www.happypoet.com is the WP site and http://boards.happypoet.com is the PHPBB site.

    http://www.happypoet.com/?p=119 (the page for WPHPBB)

    The comments (not the trackback) is being pulled from a Forum in PHPBB.
    Here is the forum:

    Also, the recent discussion, poll, and users online shown in the sidebar are from phpbb.

  11. WDuluoz
    Posted 9 years ago #

    I have login integration working.
    I am testing currently to make sure it handles all situations.
    Its a separate page which can be called to with a form, similiar to wp-login.php (actually its a frankenstein version of PHPBB's login and WP-login.)
    Verifies off of PHPBB's users file and if the user is not there it inserts new user into WP, after a successful login of PHPBB. Also updates user's information if different on checkin. This should keep the users tables sync.
    Working on making it more versatile and read phpbb's cookie and log both in.

  12. schrantz
    Posted 9 years ago #

    Forget syncing tables...what about merging the wp_users and phpbb_users tables into one table? Then you could rewrite WP's code to look to the phpbb_users table for user authentication. It would need more than just a plugin; you've have to do major surgery on WP, but I can't think of any reason it shouldn't work. I'm about to embark on this myself, but has anyone else already tried it? Any suggestions? Any warnings?

  13. WDuluoz
    Posted 9 years ago #

    The work involved with reediting WP and PHPBB with each update would seem to outweight any benefit.
    A few pointers which might help:
    integrate the databases into one. This way you will not have to worry about doing "$wpdb->select(DB)" each time you have to switch databases.
    create or adapt one login page to either read and write both cookies or force one system to read the others.
    keep track of how you had to change the logins.
    take a look at 1.6. (not only do I think you will find it will be easier to do what you are thinking about, but it is changing the user system, so might as well prepare for it)
    Using one user table for both woulda problems with the way I have my server setup. I have multiple blogs running seperate installations (so the authors can each do whatever they want with their respective blog) but they all use phpbb for the comment system. Users can keep up with all the blogs through the phpbb. I want it to be possible for a user to log into one site and be able to go to any site at happypoet.com and not have to log back in, but I dont want the users to share privileges across the server. I dont want someone with a writing privilege on the community blog to also have writing privileges on my personal blog. Plus as bbpress moves more and more to a stable product, I want to have the option to move to bbpress or another forums system.
    I also created WPHPBB because I wanted to make it fairly simple for someone to integrate two systems without messing with the code or preventing them from abandoning not only my plugin, but also WP or PHPBB without sacraficing the other.
    (Also I learn a lot of php these last few weeks.)

    Just my thoughts,


  14. WDuluoz
    Posted 9 years ago #

    Version 1.90 (07132005)

    login integration (whoo hoo)
    polls now show results if user is not logged in or logged in and already voted.
    several new options to customize the level of integration
    three styles of posts
    link directly to the forums (instead of pulling them)
    multiple users and/or categories options(unlimited except to database limits)
    all options are now in one line of the wp_options table (easier to manage)
    some other stuff I cant remember
    the Options page tries to explain everything

  15. MFC
    Posted 9 years ago #

    Regarding the integration of WP with PHPbb the script from happypoet seems somewhat corrupt at least with my version. I have seen folks on the net who got it working but I am stuck.

    Before I continue describing my problem:
    WP Version 1.5
    WPHPBB 1.91
    PHPbb Version 2.0.16

    My problem is that the simple steps (getting fetch-all and the other files copying them, renaming the two functions in WP) are taken care of. I activate the script (WPHPBB) and then I figure that I need to configure it so I head off to the configuration panel to change the options for WPHPBB. I can see the WPHPBB panel, the link points to /wp-admin/wphpbb_options but the file cannot be found. I look carefully at the link and realize that all other links in the panel for configuring WP has ".php" at the end, and of course they reside in the wp-admin directory. My question is.. where the heck is the wphpbb_options.php if there is supposed to be one?
    If no then I wonder which file is the "options" file because I have tried renaming some of the files that came with the package.

    Any help is appreciated because as I can see some people have got it working (perhaps my version of WP is weird?) and I would also very much get it to work!


  16. WDuluoz
    Posted 9 years ago #

    The options file is not a separate file.
    It is another page added to the admin area under options.
    Go to the WP's admin area, click on Options and below (if you are using the default) you will see a list (General, Writing Reading, Discussion, Permalinks, Various Names of Plugins you have installed and WPHPBB) Click on WPHPBB and you will see all the options.


  17. MFC
    Posted 9 years ago #

    That is what I did, I went under the Options and clicked on WPHPBB and the only thing I get is "Page cannot be found" and when I examine the link ("WPHPBB") then I see that its linked to "wp-admin/wphpbb_options" and under my wp-admin there is no "wphpbb_options" so that explains the "Page cannot be found". What I want to know is what the link is supposed to point to since there is no wphpbb_options in the wp-admin dir?


  18. WDuluoz
    Posted 9 years ago #

    Are you using WordPress v1.5 , v1.5.1 or v1.5.1.3?
    There is no separate page, its part of the plugin. wphpbb_options is a function inside wphpbb. When the plugin is activated, the page is added through WP's function add_options_page, which imports the html into the admins style. If its not showing up, then something is interfering with it.
    Have you modified admin panels? Are you using a plugin to modify the panels (such as Tiger Style Administration by Steven Smith [though I know it works with this one])? What plugins are activated? Have you tried disabling all plugins except this one to see if the options screen appears? (there may be a conflict with another plugin.) Are you logging in with your administrator login? It shouldnt show at all for anyone below 8 and since you were able to activate that shouldnt be the problem.
    The url should actually read "wp-admin/options-general.php?page=wphpbb_options".
    If you have done all of this and still having problems, email me(which you already did) and we will try some other options.

  19. MFC
    Posted 9 years ago #

    Nevermind, for some out of this world reason the thingie started to work. I am confident that this has something to do with the three reboots I did this morning because yesterday it didn't work even after updating.

    I am running WP

    Now I am off to save the world of blogging, at least for the time being!

    Thanx for the quick replies.

    I have bookmarked this thread because I intend to return with the link when I am finished..


  20. MFC
    Posted 9 years ago #

    One thing..

    Because WP recommends using UTF-8 but phpBB uses iso-8859-1 I created a script I implemented in the netclectic "functions_insert_post.php" under the "function_insert_post" function:

    $iso_array = array("å","ä","ö");
    $utf_array = array("å","ä","ö");

    $message = str_replace($utf_array,$iso_array,$message);
    $subject = str_replace($utf_array,$iso_array,$subject);

    What this does for me is that it ensures that the swedish åäö (last 3 in the se-alphabet) remains intact after a comment to a post.

    I am not finished so I shall return with the finished result.

    I don't know if this one of those must-implement thingies but it sure helped me.

  21. Jaxia
    Posted 9 years ago #

    Anybody know anything about phpbb? When I try to run the test post, I get this error:

    Error in posting


    INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('title', , 1121541604, 1, 0, 0, 0)

    Line : 122
    File : functions_insert_post.php

    I have no idea what that means. Thanks for any help!

  22. dss
    Posted 9 years ago #

    sounds like there's an issue with phpbb and the database. possibly a permissions issue?

    make sure you're using a vanilla install of the script and check out phpbb.com for support.

  23. WDuluoz
    Posted 9 years ago #

    If you look at the sql statement you are missing the topic_post. you have topic_title = 'title', topic_poster = , then topic_time = 1121541604, then forum_id = 1, topic_status = 1, topic_type = 0, and topic_vote = 0.

    It will fail if it doesnt have all of those attributes defined. If you put 2 as your topic_poster, which would be the id for the admin login, then it should work.

    PS: oh how many times I have had to find where that little topic_poster got lost. hehe

  24. HardinComp
    Posted 9 years ago #

    I'm trying to get wphpbb installed on my site, and I'm saying the logins should be integrated. On your site you say

    Select Integrated Logins in Options Panel (places a small script to clear WP’s cookie if user is not logged into PHPBB, since WP’s cookie is set for a year.)

    Add to wherever you would like login links displayed:

    if function_exists(’wphpbb_login’){ wphpbb_login();}

    I'm trying to add it to the sidebar where it currently has

    < ? php wp_register(); ? >

    but every time I do I get an error when the page loads. Can you be a little more specific as to how you're supposed to insert that code?

  25. WDuluoz
    Posted 9 years ago #

    are you putting < ?php and ? > around it (without the spaces)?

    What is the exact error message?


  26. HardinComp
    Posted 9 years ago #

    I tried that. Let me get into my coding suite later and I'll post the error I get.

  27. HardinComp
    Posted 9 years ago #

    I changed line 91 of /wp-content/themes/default/sidebar.php from

    < ? php if function_exists(’wphpbb_login’){ wphpbb_login();} ? >


    < ? php if function_exists(’wphpbb_login’){ wphpbb_login();} ? >

    I got the following error

    Parse error: parse error, unexpected T_STRING, expecting '(' in /home/hsir/public_html/wp-content/themes/default/sidebar.php on line 91;

  28. WDuluoz
    Posted 9 years ago #

    < ?php if (function_exists('wphpbb_login')){ wphpbb_login();} ? >


  29. WDuluoz
    Posted 9 years ago #

    Well Ive done it now.

    Finally made it to version 2.0 (I realize most would say this should be 1.0, but I feel 1.0 was completely capable for my previous needs.)
    But now.
    I cannot think of anything else that should be integrated into WP from PHPBB. Nope Nothing.

    So I present to you WPHPBB Version 2.0.

      New Manage Panel allows you to edit the wphpbb_integrate table and the PHPBB posts (minimally for your own safety).
      completely custom PHPBB posts (thanks to skippy's subscribe 2 ideas).
      now allows single quotes(') in div tags
      loads of new options (some I cant remember right now).


    If anyone else has any suggestions on what its missing, I will be happy to entertain the idea of maybe going to 3.0 hehe.
    (it still needs all the bugs worked out.)


    PS about changing the two functions. The easiest solution I could come up with would be for the end user to edit the files and put checks to see if function does not exist around the original functions in both WP and PHPBB. And have WPHPBB rewrite the functions to work with both systems. This would seem to be almost as much editing of the original files as the other choice of just changing the few occurences in WP to something else. I dont know if this would make it easier for the end user or more complicated.

    Matt (developer) prefers putting the if !function_exists around make_clickable in WP, since both, WP and PHPBB's, seem to do roughly the same thing (transform html into clickable urls).
    (there would still be problems.)
    This would work, but we would still have to fix it for get_userdata.

    Opinions on this would be appreciated.

  30. HardinComp
    Posted 9 years ago #

    You bugger. And I had it almost ready to go live. ;) I'll snag the update after dinner and install it. I'll also try that login link, but right now it's time for me to make some Chicken Progresso so I have something to eat tonight.

Topic Closed

This topic has been closed to new replies.

About this Topic