Skip to:
Content
Pages
Categories
Search
Top
Bottom

Image upload


  • joesed
    Participant

    @joesed

    Hi

    In my opinion, one of the most useful aspects of any forum is the ability for users to upload and share images.

    Unless I’m missing something, bbpress doesn’t seem to have particularly good functionality in this regard.

    I notice that there are a couple of plugins that support users uploading images, however they seem to be fairly old and unsupported.

    Is the ability to add images to forum posts using current technology (ajax) likely to be something given attention in future releases of bbpress?

    Many thanks

    Joe

Viewing 8 replies - 1 through 8 (of 8 total)

  • Shmoo
    Participant

    @macpresss

    There is an option but it’s so WordPress. (half done)

    This will add a WP Media upload button above the form.

    
    <?php bbp_the_content( array( 'context' => 'topic', 'media_buttons' => true, ) ); ?>
    

    joesed
    Participant

    @joesed

    Hi Shmoo

    Thanks for your reply. If you can let me know where this code should go (i.e. which file and approximate line number), that’d be much appreciated.

    I’m really surprised that bbpress doesn’t have much better image upload functionality. If it did it would be right up there with other forum software. As it is, it seems inferior.

    Once again, thanks

    Joe


    Shmoo
    Participant

    @macpresss

    Yeah but they don’t wish to be like other forum software I guess.

    bbPress wants to stay very clean, lean en mean I think. They hope somebody will ever make plugins for bbPress to accomplish all those tasks even history has proven Plugins aren’t the best way to go forward.

    Anyway,
    The code-snippet should go in the template that handles the form-stuff.

    Find the next files.
    wp-content / pluings / bbpress / templates / default / bbpress / form-topic.php
    wp-content / plugins / bbpress / templates / default / bbpress / form-reply.php

    Copy & paste ( don’t drag & drop ) both files to your theme folder inside a new fodler called bbpress.
    wp-content / themes / your-theme-name / bbpress / ** paste them here **

    Open the files and search for a line that say:
    <?php bbp_the_content( …. ); ?>

    Line 66 and 92 I think it is.
    Change the code and Save it.

    Refresh the page and you should see a Media upload button above the toolbar.


    joesed
    Participant

    @joesed

    Hi Shmoo

    Thanks so much. I really appreciate all of your help with this.

    Much respect.

    Joe


    mariz_p
    Participant

    @mariz_p

    Hi @macpresss,

    The ‘media_buttons’ => true, ), seems to be not working.
    Are there any solutions for this?
    I really don’t want to use plugin for this.
    I hope for your response.

    Thanks.


    afgarcia86
    Participant

    @afgarcia86

    @macpresss, that tip helped me out, however I am getting an upload error when I try to add an image. Though if I refresh the page the image is uploaded. Any ideas?


    Frumph
    Participant

    @frumph

    ^ the user needs to have the correct rights for example

    
    function add_theme_caps() {
        $role = get_role( 'contributor' );
        $role->add_cap( 'upload_files' ); 
    }
    
    add_action( 'admin_init', 'add_theme_caps');
    

    If you want to add contributors and above to be able to upload_files, change that to subscriber if you want


    madman_18
    Participant

    @madman_18

    Hi guys!

    First, sorry for my bad english ;)

    I try to use bbPress and need add the option to upload some img in the forum.

    Well, with this steps i can see the button “Add object” but, when i push this, don’t works!

    ¿Anybody can help me? Thanks!! @macpresss

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.