It can be done with PHP.
I’ve never done the random thing, but the Cutline theme for WordPress offers this functionality. You can read about it here:
http://cutline.tubetorial.com/totally-random-header-images-for-cutline/
I think you could adapt that for your uses.
In WordPress, for a specific background tied to a specific page, I just do something like this in header.php:
<div id="container" style="background: #fff url('<?php bloginfo('template_directory'); ?>/images/<?php echo $post->ID; ?>.jpg') left top no-repeat;">
That gives the container
div the background image of the post ID.jpg, so if you were viewing post 52, you would have a background image of 52.jpg
. You could easily adapt this to bbPress calls by using the forum number and $forum_id
, whichever div you want a background for (#wrapper or #main?) and then the proper location of your images (whether they are stored in your template folder or your forum root or something.) It fails OK too since there is a color code for the background and that is used if the image cannot be found (I think that’s what happens anyway.)
Let me know if that makes sense. This is how I’ve done it in WordPress, but the same approach will work for bbPress I think.
These look good…I will download and see how well they fit. I agree that it is “funny” that bbPress is affiliated with WP but doesn’t run as a PLUGIN….I’m sure there is some reason….but it feels weird from this end of the transaction….Thanks for the links…
Hello,
I am currently in developement of a theme for a gaming group’s website that I maintain. We play multiple games and I wanted to have different backgrounds get picked randomly for the site and then if you select one of the games in their given section … it would pick that game background for that page. Perhaps, if I could for that game’s forum also on bbPress.
I know this may be a lot to ask of a PHP script but is there anything out there?
To help aid in any responces here is my idea overviewed:
Parent Link – Randomly picked background from backgrounds database
Games > Warcraft – Warcraft background
Forums – Randomly picked background from backgrounds database
Warcraft Forums – Warcraft background
Any ideas?
So these are plugins for WP and they are forums? … Wouldn;t that make a lot of things easier if bbPress was this way also?
I didn’t actually see your forum, so I’m not sure. I don’t think so though – you have to do some more work to get that level of integration. If you browse threads tagged integration here, you will see lots of tips.
*slaps self*
I didn’t realise it was a WP plugin!
If I install this – will it solve the require_once(blah blah…) function error I am getting (this is placed in my bbPress config.php file). I am trying to get the whose online plugin sidebar that’s on my bbPress template to show up in WordPress you see.
Garry
Yesssss I did it!!!
Instructions for Apache users:
1. Append to <bbpress-root>/bb-includes/template-functions.php before “?>” code from first message in this topic.
2. Create or edit .htaccess file in <bbpress-root> directory and put into then next code
Options +FollowSymlinks
RewriteEngine On
RewriteBase /!!!!!! your bbpress root dir!!!!!!!/ #edit this!!!!
RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ tags.php [L,QSA]
RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]
RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]
RewriteRule ^rss/?$ rss.php [L,QSA]
RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]
RewriteRule ^bb-login.php$ index.php
RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]
RewriteRule ^([^/.]+)/([^.]+)/?$ topic.php?id=$2 [L,QSA]
RewriteRule ^([^/.]+)/page/([0-9]+)/?$ forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^([^/.]+)/?$ forum.php?id=$1 [L,QSA]
Since it’s a WordPress plugin, log into your WordPress admin panel, Plugins > bbPress. That’s where you enter your bbPress table prefix.
This is the URL once you’re logged in.
http://www.example.com/wp-admin/plugins.php?page=bbpress-integration
Replace example.com with your domain and you should end up right where you need to be.
I have installed the bbPress-integration plugin as instructed. However, the readme file says to configure it, I need to:
Go to Plugins -> bbPress and enter your bbPress table prefix
What does it mean go to Plugins? There is no where in the bbPress dashboard plugin section to enter my table prefix.
Sorry for such a dumb question but I’m new to this!
Thanks,
Garry
Looks like your blog is fine, but bbPress is not. Assuming you’re using the same database for both, then the connection details should be the same, other than the name of the constants (BBDB_ for bbPress instead of DB_ for WordPress – if you copied the whole section over, the constant names would be wrong.)
It’s hard to troubleshoot these things remotely since someone needs to be able to log into your control panel to see the actual connection details, then view and edit your config.php to make sure the settings are the same. Without trusting someone with that info, you’re going to have a hard time finding help for the problem.
P.S. please don’t post the connection details here.
P.P.S. you can contact me directly using any email found on the site linked in my profile, or just google my name (screen name or real name, matters not). I will be glad to help off-list.
bbPress is not a plugin for WordPress. There are forum plugins for WordPress if that’s what you’re looking for.
Here are a couple. I have no experience with them, I just know they exist.
http://www.stuff.yellowswordfish.com/simple-forum/
http://www.fahlstad.se/wp-plugins/wp-forum/
causes a fatal error and then lots of errors when i go to log out
I’m trying to track down the same problem with “Cannot select DB.” The problem is actually upstream in a call to mysql_connect. The mysql_connect is fails, but without any separate error handing in db.php. But I don’t know why the mysql_connect is failing. The params look right, and the bbpress database has been added via my Plesk control panel.
— Mark
I have installed bbPress and it is authenticating with my WP install but it is not clear to me how to have bbPress show up looking like an integrated part of my WP site. I have included require_once(‘../wp-blog-header.php’); into the config file but it doesn’t seem to get picked up. What am I missing. I sure wish bbPress was as easy to integrate into WP as all the other plugins are.
My problem is different. I moved all my WP & BBpress file into different directory in my server. Then all the links lead to 404 pages. I updated permalinks (by a single click) in wordpress and it solves the problem. Now i can’t update it in my BBpress site. Any help will be very appreciated.
Thanks.
ATTN: This post appears on both WordPress.org as well as bbPress.org forums so I can get the best response possible!
Alright, well some of you out there have been kind enough to help me via the forums or within the mIRC channel while we waiting on status of the new bbPress. First of all, thank you so much for all the help! After much research, I think I know what I need to do…
I laid out what I want my actual users to be able to do! A very basic overview would be this:
Primarily WordPress Accounts: Posting ability on the “main site” (AKA WordPress install), posting ability on the forums of the site, ability to post comments to WordPress posts and a robust profile.
Primarily bbPress Accounts: Posting ability within the forums, ability to post comments to WordPress posts and a robust profile.
What these two types of accounts need to share is a unified Registration page, unified login/password recovery/login form.
I think I know how to go about this… basically I want my header.php to be the same throughout the website AND forums. That way it is the same login form, same link to register, same password recovery. And to change the register form I just need to use the WordPress one and just have the WordPress Intergration plugin, display name plugin and name with spaces plguin for bbPress … I believe.
I’m still kinda new to all this so I could use any input possible.
Thanks in advance and sorry for the long read!
Major help is needed. I’m new to bbPress and am quite ‘nooby’; with these things
I done everything and I can’t access my forums:
http://raiderfanzone.10gbfreehost.com/forums/
Whats wrong?….
There’s no simple way to do this… and there’s a ton of possible security holes if you do it wrong.
You will need to have a database table to store session information, and check that on every page load.
The iframe approach would need to only indicate that the user was logged on, but make sure you don’t set the password cookie that way… just the sessionid or userid, and then each application would have to check the shared session store.
The auto-close-tags was broken in earlier versions of bbPress but if I am not mistaken, this is possibly fixed in 0.9 (out any day now).
I just tested it on bbshowcase.org and leaving off the end tick simply treats the open tick like any other character (ie. no text is converted to code)
This indeed is a very tricky problem because everything about a browser’s security is designed to prevent this from happening.
WordPress.com addresses it in one possible way (across multiple domain names) via I believe a hidden iframe (as Sam suggests).
I’ve noticed cookies are still sent with images loaded from another domain so that might be another way but you’ll still not be able to read them on the server since it’s not the local domain.
I’m using this plugin at http://geekdc.com/forum and I’m having problems with loginb in while on PDA/mobile phone. Could this be on the fault of the devices?
There may be some trickery you could do using iFrames to get the two different domains sending cookies at the same time on login. It wouldn’t be pretty though, and you would have to really test your code for vulnerabilities.
@McKrazie – I just removed the bbPress registration stuff and require my users to register through my WordPress (MU) installation, although I’m actually running its registration through a totally customized process as well.
http://mybabyourbaby.com/
If you set up your cookies in bbP and WPMU properly, then users should only have to log in once (as long as it’s all on the same domain/subdomain) – see here for how i did it https://bbpress.org/forums/topic/wpmu-integrated-installation#post-14346
HTH