Hey, _ck_! You forgot to global $bb_attachments in bb_attachments_recount!
bbPress Plugin Browser »
bbPress Attachments (0.2.9)
Download
Version: 0.2.9
Last Updated: 2011-11-28
Requires bbPress Version: 0.9 or higher
Compatible up to: 0.9
Average Rating





Your Rating
Author: _ck_
-
Posted: 2 years ago #
-
Boone, could you let me know what to put in my SQL please :'( I need to get this working soon but dont know how to change the data to make the table etc...
Posted: 2 years ago # -
Thanks for reporting that Nightgunner5, fixed
Posted: 2 years ago # -
Red X
Posted: 2 years ago # -
FirstAngel, it's not working for you because you do not have the database table setup for some reason.
I do not know why yet but the database creation seems to fail on some sites.
Try this, first the easiest test, deactivate and then reactivate the plugin.
Try uploading, if still red X we have to create the database table manually.Do you have phpmyadmin? If so, go into it, go into your bbpress database and then manually execute this SQL query
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_ciIt's possible my query is failing in certain versions of mysql without my knowledge.
Posted: 2 years ago # -
Ok this may be why.... I tried that and it says....
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''bb_attachments' (
'id' int(10) UNSIGNED NOT NULL auto_increment,
' at line 1Posted: 2 years ago # -
Just so you know, these are the server details
Apache version 2.2.11 (Unix)
PHP version 5.2.8
MySQL version 5.1.30
Architecture i686
Operating system LinuxPosted: 2 years ago # -
Sorry I should have tested that before I posted it, please use this instead
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_ciPosted: 2 years ago # -
Thank you thank you thank you!!! My attachments went on beautifully! :)
Posted: 2 years ago # -
Thank you for this plugin. Despite my pathetic knowledge of code, it's working (credit to you, not me).
I have set up Amazon S3 and it seems to work. I want to know how I can just have it go to Amazon instead of my own server too - that way I don't waste server space and upload bandwidth on my server? Any suggestions?
Thank you very much!
Posted: 2 years ago # -
Unfortunately S3 was an addon to the plugin, mirroring it locally is a requirement and a good idea for backup since S3 has downtime periodically.
In theory some code could be added to delete the local file once it's uploaded to S3 but I don't recommend that. As far as uploading direct to S3 I won't be doing that, there are too many security issues.
Posted: 2 years ago # -
You're making this too hard for yourself:
bb_register_activation_hook(str_replace(array(str_replace("/","\\",BB_PLUGIN_DIR),str_replace("/","\\",BB_CORE_PLUGIN_DIR)),array("user#","core#"),__FILE__), 'bb_attachments_install');should just bebb_register_plugin_activation_hook(__FILE__, 'bb_attachments_install');Posted: 2 years ago # -
My version will work with windows, yours (what bbPress actually uses internally too) won't.
I figured this out after several windows users complained about several plugins (some not mine) not working correctly. It may be fixed in newer versions of bbPress, I have not checked, but I still have to use the old code for people who use older bbPress.
Posted: 2 years ago # -
I'm having the same database issue: Table isn't getting created. FWIW. Creating the table solves the Red X problem for me (for all attachments uploaded post table creation, of course).
Posted: 2 years ago # -
I updated the plugin yesterday to try to replace the database routine.
Did you download it within the past 24 hours or so, or earlier than that?Posted: 2 years ago # -
I have this plugin installed and working. But I am unable to find were the files are being uploaded too.
I have a /bb-attachments/ folder installed in my forums subfolder folder.
http://www.domain.com/forum/bb-attachments/ and set with the 777 access. But none of the files are there!
They show up in the posts, and are able be downloaded. I think this is the wrong location for the folder?... But it seems to be working none the less.any idea were the files are being saved too?
the url for downloads looks like this
domoain.com/forum/topic/filename.zip
But of course there is acutally no topic subfolder in my directory sturcture.
Posted: 2 years ago # -
It must have been a bit older than that (but not by much!). Trying the new version now to see if it clears up another problem I'm having…nope, as it turns out I am running the latest version.
Posted: 2 years ago # -
__ck__, I'm having a problem, nicely illustrated at this URL:
http://jns.artificial-science.org/forum/topic.php?id=1007
The top image was uploaded via the form; the second was manually inserted into the db and bb-attachments folder by a script I wrote to convert from SMF forums to bbPress. Clicking on each results in two different, and incorrect, behaviors. Clicking on the first loads a blank page. Clicking on the second downloads the image instead of showing it in a page. Any idea what might be going wrong?
Here are the entries in the bb_attachments table
id time post_id user_id user_ip status downloads size ext mime filename
3 1241746091 8068 1 1153189881 0 3 17426 jpg image/jpeg logo.jpg
1739 1241430907 8035 2 1741220946 0 8 169344 jpg image/jpeg Snowplow_0002_redim.jpgPosted: 2 years ago # -
My system always renames the files on disk to a specific prefix to prevent duplicates and forgeries.
I suspect in your conversion you don't do that.
Why are you abandoning a working SMF install?
Posted: 2 years ago # -
gradek, go into your ftp and check for a bb-attchments directory above the webroot
Posted: 2 years ago #
Add a Comment »
You must log in to post.