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

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(19)

Your Rating

Author: _ck_


  1. Hey, _ck_! You forgot to global $bb_attachments in bb_attachments_recount!

    Posted: 2 years ago #
  2. 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 #
  3. Thanks for reporting that Nightgunner5, fixed

    Posted: 2 years ago #
  4. Red X

    Posted: 2 years ago #
  5. 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_ci

    It's possible my query is failing in certain versions of mysql without my knowledge.

    Posted: 2 years ago #
  6. 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 1

    Posted: 2 years ago #
  7. 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 Linux

    Posted: 2 years ago #
  8. 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_ci
    Posted: 2 years ago #
  9. Thank you thank you thank you!!! My attachments went on beautifully! :)

    Posted: 2 years ago #
  10. Shripriya

    Member

    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 #
  11. 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 #
  12. 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 be bb_register_plugin_activation_hook(__FILE__, 'bb_attachments_install');

    Posted: 2 years ago #
  13. 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 #
  14. 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 #
  15. 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 #
  16. 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 #
  17. 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 #
  18. __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.jpg

    Posted: 2 years ago #
  19. 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 #
  20. gradek, go into your ftp and check for a bb-attchments directory above the webroot

    Posted: 2 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.