Fix bb_attachments plugin of bbPress
October 1st, 2009 | Tagged as: bbpress ¤ Fix ¤ pluginIf you are new here. You may want to sign up for e-mail updates or subscribe to my RSS feeds. Thanks for visiting!
bbPress as of now doesn’t allow any uploading feature with native support and the famous bb_attachments plugin which was developed for bbPress 0.9 versions doesn’t work with bbPress 1.0+ releases. For those who are new to this plugin, it adds uploading capabilities to your bbPress forum. Users can now upload files from their computer instead of uploading it to file sharing services and then sharing the URL. I have aggregated the information on how it can fixed from the Extends section of the bbPress.org
Here is how you can fix it :
- Download the 0.2.7 version of the plugin from the Extends section.
- Upload it to the my-plugins folder under your bbPress root. (Make sure file permissions of my-plugins & my-templates are 755. (How to fix file permissions of my-plugins & my-templates folder)
- Make a directory /bb-attachments/ above your webroot i.e. just above the folder which is accessible on internet. (This is for security purposes)
- Set file permissions of the bb-attachments folder to 777. (If you don’t know how to change the file permissions then follow the steps of the link given in step #2)
- Make sure that bb_attachments table has been created in your database. You can use phpMyAdmin to check. If its not there, you can run this SQL query to create it :
CREATE TABLE IF NOT EXISTS bb_attachments (
id int(10) UNSIGNED NOT NULL auto_increment,
time int(10) UNSIGNED NOT NULL default 0,
post_id int(10) UNSIGNED NOT NULL default 0,
user_id int(10) UNSIGNED NOT NULL default 0,
user_ip int(10) UNSIGNED NOT NULL default 0,
status tinyint(10) UNSIGNED NOT NULL default 0,
downloads int(10) UNSIGNED NOT NULL default 0,
size int(10) UNSIGNED NOT NULL default 0,
ext varchar(255) NOT NULL default '',
mime varchar(255) NOT NULL default '',
filename varchar(255) NOT NULL default '',
PRIMARY KEY (id),
INDEX (post_id)
) CHARSET utf8 COLLATE utf8_general_ci
$bb_attachments['path']=dirname($_SERVER['DOCUMENT_ROOT'])."/bb-attachments/";
If you face any issues, then leave a comment here and I will try to help.



Howdy! My name is Ashish K Saini aka Ashfame.

I don’t have a problem uploading all files, just .doc and .xls files. The newer .docx and .xlsx files upload just fine and all other file types (.pdf, .jpg, etc.) work without any issue as well. I’ve tried adding every MIME type I could think of, and as I want all of my users to have the same upload permissions, I’ve made the changes at all levels, yet none can upload .doc or .xls.
Got the same problem as Shane. Everything works fine but .doc and xml extensions. I’m trying to find any solutions on the plugin board right now.
@Shane @María
I will take a look at it after our festive season is over here! (1 week)
Hi!
Thanks a lot for your answer.
I think I found the problem – the mime type for .doc files was just not spelled correctly for my server, I guess. Tried different options and finally the one that worked fine is ‘application/msword’.
Have a nice holiday!
@María
Thanks for posting how you fix it. That will surely help someone.
Unfortunately, that MIME type is already in the MIME list on my server and in my php file. I still can not attach .doc files.
Hello !
Done exactly as instructed, it worked fine, database created.
Path is ok (i m sure cause i harcoded it and tested it)
Chmod is ok
When i upload , it creates the right record in the table but do not put the file in the right directory, does not put the file at all as i know.
Any idea ?
Thanks,
Jean (France)
@Shane @Jean
Try asking on the plugin’s page. I don’t know about the plugin in detail. So, its better to ask CK, the coder of the plugin.
So easy, Thanks!!!