Patch: Categories for version 0.8
-
For those interested in adding forum categories to their brand new bbPress 0.8 install, there is an updated patch on the development site.
Download the last attachment “categories-build701.patch”, this is the build number for version 0.8
To patch, simply go to your install directory:
$ cd /path/to/installation/
Then (on Unix, Linux and OSX) patch using patch
$ patch -p0 < /path/to/patchfile/categories-build701.patch
On windows you will have to use some other patching tool – but the premise is the same.
Upgrade your database by running the upgrade script at /bb-admin/upgrade.php
Go to the category admin area and create a category/s, then go to the forum admin area and assign your forums to your category/s.
Done.
-
Awesome! Thanks Sam.. I’ll apply this path on the PC first, modify my theme files accordingly.. then upload them all..
spencerp
Great patch thanks. The instructions are clear and precise.
Thanks
Note -You must assign a category to all forums . Tested assigning only three of my forums at first —- syntax errors. Set them all and no errors.
Does this category patch work with the private forums plugin?
Check out above site. It is running with
allow-images, bb-avatar, bb-memberlist, bb-post-count,
bb-privatemessages, display-name, forum-restriction and private-forums.
bbpress .80 with categories patch.
Note -You must assign a category to all forums . Tested assigning only three of my forums at first —- syntax errors. Set them all and no errors.
I’ve never experienced this problem, can you recreate and post the error here? You may need to manually remove a forum from a category in the database to recreate it.
It may have something to do with one of the plugins.
got it… thanks…
I applied this patch as per the instructions, but when I go to upgrade the database, I get a blank screen. The error from the server is Permission denied in config.php on line 60. Is there something I’ve missed?
I applied this patch as per the instructions, but when I go to upgrade the database, I get a blank screen. The error from the server is Permission denied in config.php on line 60. Is there something I’ve missed?
Make sure all your php files are readable by the apache user. Patching may have changed some permissions, although I don’t know why it would.
Thanks for replying. I’ve tried everything I can think of, and still get the same error. I can’t see that any permissions have been changed, so I don’t know what to try next.
Colleen
A couple more questions on this… it appears the patch only mods the default template so assuming I have to make those changes manually… probably could edit the patch file by hand, but I have already modded some of those files in my theme… no package available of the modded files?
Are there any more planned releases between 0.8 and 1.0? which I believe I read somewhere is the planned formal release with this incorporated… Roadmap shows 1.0 next but it may not be current…
thanks…
Thanks for replying. I’ve tried everything I can think of, and still get the same error. I can’t see that any permissions have been changed, so I don’t know what to try next.
Try again with a fresh install of 0.8 and then add your customisations/plugins again. You should be able to use your existing database.
it appears the patch only mods the default template so assuming I have to make those changes manually
That’s right.
probably could edit the patch file by hand, but I have already modded some of those files in my theme… no package available of the modded files?
Modding the patch file would be difficult, sometimes patch can work out what to do when the files it’s patching are modified (i.e. the line numbers are different).
The easiest thing to do is start from scratch with a fresh 0.8 install, patch that, then add your customisations. Following the default template after patching, you should be able to work in categories to your custom theme.
Are there any more planned releases between 0.8 and 1.0? which I believe I read somewhere is the planned formal release with this incorporated… Roadmap shows 1.0 next but it may not be current…
The roadmap is current. The 1.0 milestone has a ticket against it for this. That doesn’t mean it will necessarily make it into that release.
perhaps if i didnt already have a heavily modded theme from previous versions… seems I always get lots of experience modding core files 😉
luckily I can work around code fine enough… just hope I dont have to do it too often before it gets formally included…
having problems getting this to worked… because of mods, applying the patch by hand… so its probably me but really stumped…
after doing the changes, had an error, so double checked everything… still no dice… so I decided to bite the bullet and do it the patch way… as luck would have it my host doesnt seem to allow patch to work – diff issue I will take up with him…
anyways, started from a clean 0.8 install and applied the patch by hand again… end up getting the same error again… double checked and everything looks good…
Here’s the error:
Fatal error: Cannot redeclare get_categories() (previously declared in /xxxxxx/wp-includes/category.php:14) in /xxxxxx/forums/bb-includes/functions.php on line 3
oh man… AAARGGH… as I sit here typing this in, it just hit me what is wrong and why I wasted time into the wee hours trying to solve it…
has anyone tried this category patch in a bbpress integrated with wordpress?? it seems the category functions are clashing between the two…
geez… I dont know how many times I read that last night and never noticed that… another reason why you do work real late at night 😉 helps if you can read too 😛
any thoughts on this working with a bbpress/wordpress integrated situation?
I haven’t tried an integrated install. But this is a real problem if the function names clash. Soon when I have more time I’ll look at this properly, but in the meantime you can probably rename that function to patch_get_categories and then change all the references to it to match (there are only a few).
thats my plan Sam, but I am pretty sure I have verified that it is indeed a function name clash for both get_category and get_categories at a minimum… havent checked the rest though when I start modding the patch, I am sure I will find them 😉
okay Sam, some serious wordpress integration issues here… below are the clashes with wordpress and the offending files…
get_category()
get_categories()
root: forum.php, topic.php, index.php
admin: content-categories.php, content-forums.php, bb-category.php
bb-includes: functions.php, template-functions.php, cache.php
is_category()
bb-includes: functions.php, template-functions.php
get_category_link()
bb-includes: functions.php, template-functions.php
category_description()
template: category.php, front-page.php
bb-includes: template-functions.php
get_category_rss_link()
bb-includes: template-functions.php
whew… after adding bb_ to the front of all those items in bbpress, I finally got it to run the upgrade script, which worked…
now to see if it works as something looks a bit odd in the display of the category…
you can see this in work now at http://test.158th.com
still some styling work to do and such… also going to port the forums and data in from phpBB (actually nukeBB)
ooopsss… actually, you have to to the forums page to see all the forum stuff… http://test.158th.com/forums
though you did get a peek at my wordpress plugin to display latest forum stuff in wordpress…
I’ve just updated the previous patch file to address the WordPress integration/function naming issues.
Download from here – categories-build701.patch
You should read the relevant comment about the updated patch.
thanks Sam!… Not sure I caught everything you changed… any summary? similar to what I did?
Yes, similar, but more complete. I changed all the category function names (basically appended “bb_”) to meet the new guidelines and in turn fix this issue.
Is this going to get submitted into the SVN trunk for 1.0 soon, or..? I’m really hoping so, all this “applying patches” is getting tiresome and confusing, sigh.
It’s one of the main reasons I haven’t even upgraded my bbPress forums to the latest full .80, with category enhancement, just seems pointless…
spencerp
Categories patch will not work on bbpress .8.1 . It will need a tweak.
New patch for 0.8.1 (build 719) just uploaded here. I have not tested this patch on a fresh install, but the changes from the last patch are minimal. Just a couple of line numbers and implementing the new attribute escape function in a couple of places.
spencerp – you should consider using an SVN client to update your live site, it is much easier to apply the changes to core using SVN, they generally don’t conflict with this patch.
- You must be logged in to reply to this topic.