How to implement multiple phpBB forums into Wordpress site?

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Suggested Hosts
User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

How to implement multiple phpBB forums into Wordpress site?

Post by critterhub » Wed Jan 09, 2013 2:56 pm

Hi,

I am trying to install phpBB forums on my Wordpress site: www.critterhub.com

The site has different sections on it - Amphibians, Bugs, Reptiles, Small Animals, Freshwater, Saltwater.

I would like to have a separate forum for each of these sections.

How could this be done on my Wordpress theme?

Here are some pictures showing what I'm after...

Image
Image

A sincere thank you for any insights and help on this.

- Corey

User avatar
Christian 2.0
Former Team Member
Posts: 4507
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Christian 2.0 » Wed Jan 09, 2013 3:41 pm

Hi Corey,

This will take a fair amount of work to achieve, although it's definitely possible.

Talk me through what level of integration you currently have. Is the forum talking to the wordpress installation at all? Or are they currently just sat next to each other?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66849
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Lumpy Burgertushie » Wed Jan 09, 2013 4:23 pm

you could have one board, create a category for each critter. then make the links for the different critters go straight to each individual category.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Wed Jan 09, 2013 4:30 pm

Christian 2.0 wrote:Hi Corey,

This will take a fair amount of work to achieve, although it's definitely possible.

Talk me through what level of integration you currently have. Is the forum talking to the wordpress installation at all? Or are they currently just sat next to each other?
I have not made a forum yet. I planned on using the WP-United plugin for this, though.

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Wed Jan 09, 2013 4:34 pm

Lumpy Burgertushie wrote:you could have one board, create a category for each critter. then make the links for the different critters go straight to each individual category.


robert
This sounds good to me. I don't mind having one centralized forum board, as long as I could link to the separate forum categories for each type of critter.

My next question would be how to set it up so that the colors, header, and footer for each menu item on my website still show up when you go to that critter's forum. (Like in the pictures I posted in the first post).

Thanks again,

Corey

User avatar
Christian 2.0
Former Team Member
Posts: 4507
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Christian 2.0 » Wed Jan 09, 2013 4:37 pm

Thought so. :)

Robert posted what I also had in mind. Keep this as simple as one forum, one blog. Otherwise multiple phpBB installations will need to share users, as well as those two forums both sharing users with Wordpress. It'd be a big messy triangle.

So, install the forum next to the blog and get the romance going with WP-United. Create one category for each 'critter' , and then as Robert said link to each category directly from the navigation bar. It will be possible to change colours depending on which category a user is in later once the basic functionality is up and running.

WP-Unied comes with some kind of 'theme integration' system that allows Wordpress to wrap around your phpBB forum. Give that a try and see how well it does.

Once you get the basic functionality set up, we can start talking about how to change colours based on which category the user is in. :)

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Wed Jan 09, 2013 4:51 pm

Thanks for all of the awesome help so far, guys. It is very much appreciated. :)

I'll update this once I get the forum and WP-United working.

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Wed Jan 09, 2013 9:32 pm

Ok...

So I got phpBB3 and WP-United working. Very easy process. Props to the developers of both the forum and the plugin.

www.critterhub.com/forum

So that is where I'm at now. I created separate categories for each main type of "critter". Just need to get each one to show up with the header/background of its specific section on the site. Any insights?

Thanks,
Corey

User avatar
Christian 2.0
Former Team Member
Posts: 4507
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Christian 2.0 » Wed Jan 09, 2013 11:12 pm

Hi again Corey,

Good work getting them integrated :) . I've not had the pleasure of using WP-United yet, need it for a new site I'm working on so it's good to know it's an easy setup. :)

I'm thinking the best way to do this is to plant the forum ID as a class into the <body> tag, and then use CSS overrides to apply styling to the rest of the site.

First up, open up: /styles/prosilver/template/overall_header.html

Find:

Code: Select all

<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
Replace with:

Code: Select all

<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} cat{FORUM_ID}">
Now here's where the fun starts. Firstly you need to be able to find out what the forum ID is for the forum you want to style up. This is as simple as hovering over the forum URL and looking at the number on the end.

Example, the link to your "frogs" forum is:
Here we can see the ID for the frogs forum is 10.

Using this information, we can start planting CSS to override elements in the stylesheet. Add all your custom CSS to the bottom of colours.css , as this is the last stylesheet to be called by phpBB.

Here's an example:

Code: Select all

body.cat10 {
    background-image: none !important;
    background-color: #123456 !important;
}

body.cat10 #logo-bar {
    background-image: none;
    background-color: #abcdef;
}
When your users are in forum ID 10 (frogs), the above CSS will be applied.

In some cases, due to the way WP-United integrates the wordpress style, you may need to force the browser to use your CSS instead of WP-United's. To do this, add !important to the end of the CSS property..but before the ; on the end of the line.

You can see in the second block of code how to target particular elements inside the wordpress style using CSS child selectors. It's targeting the #logo-bar div, so any CSS you apply there will be applied to #logo-bar when the user is in forum ID 10.

I hope I've given you a basic idea as to how to go ahead with this. Obviously it's much easier and straight forward if you're familiar with basic CSS. I'm not sure if you are or not, hence the simple instructions.

Do let me know if you need anything clarified. :)

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Wed Jan 09, 2013 11:39 pm

Christian 2.0 wrote:
I hope I've given you a basic idea as to how to go ahead with this. Obviously it's much easier and straight forward if you're familiar with basic CSS. I'm not sure if you are or not, hence the simple instructions.

Do let me know if you need anything clarified. :)
Wow. You are awesome. Thank you so much for taking the time to point me in the right direction. Much appreciated. I'm going to start messing with it per your instructions and see what I can come up with.

Thanks again,
Corey

User avatar
Christian 2.0
Former Team Member
Posts: 4507
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Christian 2.0 » Wed Jan 09, 2013 11:44 pm

No problem , always here for tips. :)

User avatar
Lumpy Burgertushie
Registered User
Posts: 66849
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Lumpy Burgertushie » Thu Jan 10, 2013 2:05 am

that is amazing christian. I would have been trying to do it in ways a lot harder than that.

It really pays to know your css etc.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
critterhub
Registered User
Posts: 14
Joined: Wed Jan 09, 2013 2:40 pm

Re: How to implement multiple phpBB forums into Wordpress si

Post by critterhub » Thu Jan 10, 2013 6:31 am

Christian 2.0 wrote: Do let me know if you need anything clarified. :)
I am most definitely a complete noob to basic CSS. Haha.

So I understand about putting the custom CSS into the colours.css file. But I don't really understand how I know what CSS needs to go in there...

For Example:

The header/logo/background are different on this page: http://www.critterhub.com/small-animal/

What exactly do I need to put into colours.css for the small animals forums to pick up on the changes? http://www.critterhub.com/forum/viewforum.php?f=7

I'm pretty confused when it comes to this stuff. :( I'm sorry.

Corey

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21681
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: How to implement multiple phpBB forums into Wordpress si

Post by Mick » Thu Jan 10, 2013 8:22 am

This topic is getting beyond the realms of vanilla phpBB support so, for want of a better place, I'll move it to phpBB discussion.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
Christian 2.0
Former Team Member
Posts: 4507
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: How to implement multiple phpBB forums into Wordpress si

Post by Christian 2.0 » Thu Jan 10, 2013 10:58 am

critterhub wrote:What exactly do I need to put into colours.css for the small animals forums to pick up on the changes? http://www.critterhub.com/forum/viewforum.php?f=7
Something like this should do the trick. :)

Code: Select all

body.cat13 {
background-image: url("http://www.critterhub.com/wp-content/uploads/2012/09/smallanimalsbg.jpg") !important;
}

body.cat13 #logo-bar-wrapper {
    background-color: #5E4218;
}
There's not a great deal that can be done about the different logos. They are inserted by the Wordpress style via an <img> tag and cannot be overwritten using CSS.

Post Reply

Return to “phpBB Discussion”