bbPress

Simple, fast, elegant

bbPress Plugin Browser »

bbPress Attachments (0.2.7)

Download

Version: 0.2.7

Last Updated: 2009-4-9

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
(16)

Your Rating

Author: _ck_


  1. What I really would like to get working is imagejpeg. That would solve my entire image quality issue altogether.

    Here's my function:
    if (!file_exists($output)) {
    $new= imagecreatetruecolor($new_width, $new_height);

    imagecopyresampled($new, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
    imagejpeg($new, $filename, 92);
    $save($new, $output);
    imagedestroy($new);
    }
    imagedestroy($img);

    imagejpeg is working, but it requires me to reload the browser at least twice for it to work (in Firefox) The first time it'll show the default jpeg quality, and then upon reload it'll show the higher quality 92 version.

    In Safari, it's even worse. It'll show an X the first time you load it, and then when you refresh it'll show the default image and not the high quality 92 version. You have to reload it several times to finally see the 92 version. Very odd, and it's not a cache issue. I've checked and checked.

    So I'm doing something wrong, but it seems so close to working that I wouldn't even need USM at all.

    Posted: 9 months ago #
  2. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    The X you are seeing is probably because of an unfortunately flaw in the way I render the inline images. They are produced "on demand" the first time they are used instead of immediately after the image is uploaded. This is to break up the server load and wait time by the uploader, especially if you are using the S3 option where it has to upload the image to Amazon.

    On some servers that are slow or use a server cluster or NFS, the image may have a rendering delay. Or more especially if you are using the S3 feature this may happen.
    There is at least one large site that rewrote this part so the inline image is rendered immediately after the upload but I have not changed the base code yet to do this.

    Apparently I also did not impliment the progressive jpeg feature yet like I had planned to, which may indirectly improve the reload problem you are having, you can try turing on

    imagecopyresampled($new, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
    imageinterlace($new, true);
    imagejpeg($new, $filename, 92);
    $save($new, $output);

    before the image is saved. Progressive uses a newer jpeg format supported by all modern browsers which makes somewhat smaller images and loads them in a more visually pleasing way.

    Posted: 9 months ago #
  3. The progressive jpeg feature does indirectly solve the Safari no image issue on first load! Thanks for the explanation and all your help. I was going nuts trying to figure out what I was doing wrong.

    Posted: 9 months ago #
  4. its not working i put the bb-attachments folder in :-

    /public_html/

    and in -

    /public_html/massbase.com/bb-attachments/ <---- where bbpress is installed.

    I chmodded both folders to 777.

    i am using RC1

    Posted: 9 months ago #
  5. this is not working CK, please help. nothing gets uploaded, do i have to have Amazone AWS for this work?

    Posted: 9 months ago #
  6. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    massbase it sounds like your database table did not get created properly, you'll have to create it manually - amazon aws is optional, not required

    Posted: 9 months ago #
  7. yeah i did create it manually and still nothing?

    Posted: 9 months ago #
  8. searbe

    Member

    bb-post.php doesn't use bb_post.php as the hook anymore, it's bb-post.php (dash not underscore). to get this plugin working I just had to change bb-attachments.php around line 90, bb_post.php -> bb-post.php

    Posted: 8 months ago #
  9. gabidavila

    Member

    Hi guys. When I activated the plugin, it Says that the occurred a fatal error. I did what you sayd about the bb-attachments folder be on root folder of my website. I did it, but I stilll get the error... What Should I do?

    I use the 0.9.0.5 version.

    Posted: 8 months ago #
  10. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    Fatal error during activation probably means the DB query to create the table probably failed.
    Who is your host and are they windows or linux?

    Posted: 8 months ago #
  11. This was working perfectly for me under BBPress 0.9.0.3 but I recently upgraded to 1.0 RC3 and noticed it's not working anymore.

    The form still appears to upload the files, but they aren't listed under the post anymore. Previous uploads are still listed, but new ones won't show up.

    Any ideas?

    http://cioes.org/bbpress

    Posted: 8 months ago #
  12. Hey Searbe, thanks for the post about "I just had to change bb-attachments.php around line 90, bb_post.php -> bb-post.php"

    It got the plugin working again for me on 1.0 RC3.

    Of course thanks to _ck_ for the plugin itself.

    Posted: 8 months ago #
  13. searbe

    Member

    No probs Caramboo - I spent ages trying to get this plugin working, amongst many other things. I really think that point should be put in an FAQ or something for this plugin as it simply won't work without that fix..! Should it not hook in to both actions (bb-press.php and bb_press.php) to maintain compatibility?

    Posted: 8 months ago #
  14. Even with that fix, Searbe, are you able to upload and display files? The only change it made for me was allowing me to upload images only, but they just end up becoming a red X in a square rather than the real image.

    I've been trying to sort through these comments but can't seem to find the fix and worried that older posts are going to get me in more trouble than I'm already in. Any ideas?

    Posted: 8 months ago #
  15. searbe

    Member

    Look in your database - is there a table for the attachments plugin? If not, you need to manually create it. Look a few pages back in this forum thread - there is a page with two CREATE TABLE commands. The first one is wrong and will give you a syntax error - you want to use the second one on the page.

    Failing that, have you definitely set set the bb-attachments.php config bits? Around line 67:

    $bb_attachments['path']=dirname($_SERVER['DOCUMENT_ROOT'])."/bb-attachments/"

    Note that is the document root - not the web root. So that'll be /user/clicknat/domain.com/bb-attachments/ *not* /user/clicknat/domain.com/public_html/bb-attachments . Make sure that folder is world-writeable, or at least writeable by apache. You could stick die($bb_attachments['path']); in line ~68 to make sure it is the right path. Obviously remove it once you've seen the path.

    Posted: 8 months ago #
  16. permex

    Member

    Is there any word on final 1.0 compatibility? Since it is one of the most powerful and useful plugins available, upgrading without it and losing all the previously attached files is not really an option. I realise it may not get officially updated for some time, but perhaps there is likely no significant issue as some users seem to relate?

    Posted: 8 months ago #
  17. freenettony

    Member

    I am using the windows, and install plug-ins after the opening, but the annex does not show upload, Database not bbPress Attachments table, I need how to do this can be achieved upload attachments?

    Posted: 8 months ago #
  18. To fix bb-attachments plugin for the latest version of bbPress (version 1.0.1) do the following:
    change line #90 of bb-plugins/bb-attachments/bb-attachments.php:

    from: add_action( 'bb_post.php', 'bb_attachments_process_post');
    to: add_action( 'bb-post.php', 'bb_attachments_process_post');

    Actually, bb_post.php action name was renamed to bb-post.php

    Enjoy! :)

    Posted: 8 months ago #
  19. phaniraj01

    Member

    @WarFrog: Thanks alot.

    I am waiting for this plugin to work. I am running a tech forum. Now I will convert my forum from smf to BBpress

    thanks,
    phani

    Posted: 7 months ago #
  20. gerikg

    Member

    WPMU+BP+BBPress 1.0.2

    It uploads the file, but the post doesn't show the file.

    Posted: 7 months ago #

RSS feed for this topic

Add a Comment »

You must log in to post.

Code is Poetry.