Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allow Comments On Picture Upload By Default

  • Avatar of karlschweigert
    karlschweigert
    Member

    @karlschweigert

    How do you allow comments on picture uploads by default? Currently, you have to click “save” after uploading a picture, which a lot of users don’t do. Currently, this results in comments not being allowed and I’d like them to be allowed unless one specifically changes the setting. I’m using version 0.1.8.11. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of foxly
    foxly
    Participant

    @foxly

    @karlschweigert

    In the file “bpa.screens.php” inside the “else” block at line 442 before any other code, paste the following code:

    `
    $pic = new BP_Album_Picture($id);
    if(bp_is_active(‘activity’)){
    bp_album_record_activity($pic);
    }
    `

    Note that I haven’t tested this on a live system, so its not guaranteed to work.

    This functionality is fully configurable in BP-Media at the “Social Settings”->”Comments” menu.

    ^F^

    Avatar of karlschweigert
    karlschweigert
    Member

    @karlschweigert

    Thanks @foxly ! I finally got the chance to try this today on two sites. It worked perfectly on one site, but not the other. Both are running buddypress 3.2.1 but the one with the error has a lot more plugins installed. The error is as follows:

    `Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘dpa_handle_action_bp_album_data_after_save’ was given in /home/username/public_html/wp-includes/plugin.php on line 405

    Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/wp-includes/plugin.php:405) in /home/username/public_html/wp-includes/pluggable.php on line 934`

    Any guidance on this would be much appreciated, thanks!

    Avatar of foxly
    foxly
    Participant

    @foxly

    @karlschweigert

    It looks like another plugin installed on the site is trying to hijack the activity stream write action from BP-Album.

    Disable all the plugins on the site and re-activate them one at a time until you find the one that’s causing the problem. Post us a link to that plugin’s WP repo page …we’ll do some testing to find out what’s going on.

    ^F^

    Avatar of karlschweigert
    karlschweigert
    Member

    @karlschweigert

    @foxly thanks for that! Based on what you wrote, I realized that I added some code to integrate the Achievements plugin with BP-Album. I removed the code and the new bpa.screens.php now allows comments on pics without clicking the save button error free!

    Thanks again!

    Avatar of foxly
    foxly
    Participant

    @foxly

    Always glad to help out.

    ^F^

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

You must be logged in to reply to this topic.