3 Questions to the experts

Events happening in the community are now at Drupal community events on www.drupal.org.
funkyfrieder's picture

Hi, I have 3 little questions regarding the integration of PHPBB2.x into Drupal

1)When I click on the Profile link in PhpBB it redirects me to Drupal with a page not found message, even though I have checked the acces user profiles box in the access control panel
2)Why is the module creating a new separate user group in PhpBB tables for every new registered user?
3) Is there a way to run the PHPBB Forum in the content area of Drupal and not in a new window?

Comments

I forgot

funkyfrieder's picture

Just to add a bit more info on the third point.

I embedded the forum via Iframe, the problem is that everything takes places in the frame then. When I click on a link that usually redirects me to drupal, I does this, but in the fframe so that I have "drupall in drupal". Another thing is that with that solution I have two scroll bars, what isn't very nice.

Maybe you have some ideas.

Thanks

1) should not happen, could

arkepp's picture

1) should not happen, could be a bug in the .htaccess file for phpBB. Check the watchdog log to see what Drupal thinks you requested. What if admin requests that URL?

2) phpBB used to do this. I vaguely remember this has been discussed before someplace, so maybe it doesn't anymore. Any problems?

3) scrollbars you can disable in the iframe element, by adding scrolling="no"
I don't know much about iframes, but I assume you need to specify a target in the links to make them show up in the right iframe. You could do that by modifying your phpBB template, you only need to change the ones related to profiles and logins, as well as anything pointing back to Drupal.

Someone also emailed me about using include(url-to-phpbb) or curl to include a phpBB forum directly into the page (same as you are doing, except there would be no iframe). For low traffic sites that should be fine, and it gives you the option of rewriting the page on the fly if you need to modify URLs. But it is also very costly and slow.

Thanks

funkyfrieder's picture

Thanks for the quick reply.
The watchdog log only tells me that tere was a page not found.
When I log in with my admin account I'm redirected correctly to every profile I click on.
With other users I'm always redirected correctly to my profile and my private messages, but not to the profiles of other users.

One more question occured today (please only answer if you have time - I know I ask a lot:-) What is the update of the PhpBB user table for .. as I found out that PhpBB displays the username of Drupal on post and topic creation (what means that when a new topic is created, PhpBB gets somehow the username of drupal). Thats strange because the module doesn't actually change anything in PhpBB, I thought. (I came to that because I modify the module at the moment, so that my users can use a different name in Drupal and phpbb)

So all profiles work for all

arkepp's picture

So all profiles work for all users if you access them from Drupal (e.g. via the link in a comment)?

All the .htaccess file says is this:

RewriteCond %{QUERY_STRING} ^mode=viewprofile&u=(.)$
  RewriteRule ^profile.php(.
)$ ../user/%1 [L]

  RewriteCond %{QUERY_STRING} ^mode=editprofile(.)$
  RewriteRule ^profile.php(.
)$ ../user [L]

Which is similar to private messages

RewriteCond %{QUERY_STRING} ^folder(.)$
  RewriteRule ^privmsg.php(.
)$ ../privatemsg [L]

The only thing I can think off is that the u=[number] is not correctly transferred to the ../user/[number] , but I believe the syntax is correct.

In the phpBB 2.x version of the module Drupal controls the user table of phpBB absolutely. There are three types of updates to the user table, all in phpbb_user()
1) Creation (New Drupal user -> new phpBB user)
2) Login (Module installed after Drupal was taken in use, creates the missing phpBB users)
3) Updates (User or admin changes user profile, updates reflected in phpBB)
I am pretty sure that what you are trying to do will cause you pain, but the module is only dependent on the userid, so it shouldn't break the core functions.

Yes, it all works, the only

funkyfrieder's picture

Yes, it all works, the only thing that doesn't work is when you click on any user, e.g. the one that created the last post. Then the redirect fails - page not found. When I click on view profile in the header to see my own one, no problem. Private messages is also working.

The other point, what I ment was that even after changing the phpbb user name in the phpbb user table, it displays the drupal user name on my posts.

For some reason the stars

arkepp's picture

For some reason the stars (.* should be dot-star) are missing in the post above, but you can see them in the .htaccess file you have.

You need to create some test scenarios and test them yourself, such as
RewriteCond %{QUERY_STRING} ^test.php?u=(.*)$
RewriteRule ^test.php(.)$ ../test.php?q=%1 [L]

Request test.php?u=2 from your browser and see whether it displays ../test.php?q=2 , you will have to create to create the last file yourself.

Your other question: No installation of phpBB that I have ever seen puts usernames on posts before you delete a user. Use phpMyAdmin to check what value is actually stored in the phpBB user-database. That should be what you are seeing on posts. My guess is Drupal overwrites them because you havent disabled this part of the module.

Hi sorry for the late reply.

funkyfrieder's picture

You were right with the usernames (of course).

Just to follow up on the post...I found the problem with the redirect. I importet users via phpmy admin from an old installation and left the last access empty. So I found out, that I could redirect to users where the last access has avlue, not to those that haven't logged in to fresh drupal/phpbb site.

Good point

arkepp's picture

Ah, thanks for returning with that information.

Users are transfered from Drupal to phpBB upon creation, and preexisting users upon login. But old users who have not logged in after the module was installed never make it to phpBB.

I'll add a check before a profile is viewed.

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week