Buddypress Group Documents for BP 1.5 and WP 3.3.


This plugin lets users upload files into BuddyPress groups. A simple, install-and-go plugin. You can specify what file formats you accept via the Plugin options.

The initial plugin of  Peter Anselmohis is no longer available, and the old version is not compatible with WordPress 3.3. and Buddypress 1.5.

So I start edited it in order to work with  Wordpress 3.3. and Buddypress 1.5 and Chris Keeble made a great contribution, since 0.4.3.1 version.

Many thanks to the wordpress.org forum for debugging!!!

Update (30/4/2013):  Buddypress Group Documents for BP 1.7 

 

Version 0.4.3.3 (13/5/2012) for BP 1.5

Changelog

Version 0.4.3.3 (May 13, 2012)

  • By Keeble Smith Ltd (http://keeblesmith.com)
  • Fixed layout of sidebar (early closing of div) in some configurations

Version 0.4.3.2 (May 8, 2012)

  • Minor fixes at style.css
  • New strings in .pot file

Version 0.4.3.1 (May 5, 2012)

  • This update by Keeble Smith Ltd (http://keeblesmith.com)
  • *** Please Note:
  • *** This update includes a complete rewrite of style.css to allow themes to override correctly, simplify, create clearer element identification and remove obsolete css
  • *** You may need to update any css overrides you are implementing
  • *** This update also includes major changes to the form layout and other HTML elements which may cause require additional css changes, but should allow future updates to be more stable
  • Added BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR default setting (false)
  • Added conditional use of wp_editor, based on BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR setting (to provide theme authors with some control – ideally should be a setting.
  • Added logical check of BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR so description is stored correctly either way
  • Added logical check of BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR in do_post_logic for description property population in add and edit contexts
  • Updated get_file_size to test file_exists, avoiding warning messages being written to the error_log
  • Fixed category filter disappears if no documents exist in the selected category, making it impossible to then change the filter back and see any documents.
  • Multiple changes to the form layout and styling – simpler, cleaner HTML and CSS which now validates and is compatible with more themes:

– Moved Document List heading so it will appear even if there are no documents to show
— Updated document description display to use stripslashes if using wp_editor and nl2br if not
— Updated bp-group-documents-delete to a class instead of ID (avoiding duplicate IDs in HTML)
— Removed obsolete spacer div (using css for styling instead)
— Corrected immediate closing of bp-group-documents-form tag (invalid HTML)
— Fixed layout of headings and categories list being bunched up
— Added a margin at the bottom of bp-group-documents div
— When no documents exist in a group the ‘upload a new document’ button no longer overlaps the ‘There are no documents…’ message in some themes
— Only output the existing categories list if there are any existing categories
— Moved submit button to below the categories list (for easier styling customisation)

  • Multple invalid HTML fixes and cleanup:

– Removed unnecessary br tags (use CSS for styling)
— Added <p> tag around the Valid File Formats text.
— Added rows and cols attributes to bp-group-documents-description textarea (required for valid HTML)
— Removed empty label tag
— Replaced unclosed BR tags with closed BR tags
— Renamed group-documents-edit-link target from #e to #edit-document-form to remove ambiguity
— Updated group-documents-icon to bp-group-documents-icon
— Renamed document-info div to bp-group-documents-document-info for unambiguous & consistent identity

  • Added verion caching control for general.js so sites updating plugin will get latest version of the JavaScript
  • general.js – updated to adopt changes made from ID to class, and naming consistency

In 0.4.3. version:

  • Add activity dropdown filtering
  • Add option for administrators to rename the group documents navigation tab
  • Add some strings in .pot
  • Add en_US.po file in order to allow developers to rename the English strings

In 0.4.2. version:

  • Add wp_editor support
  • Fix the style and js script position
  • Added some localized strings
About these ads

94 thoughts on “Buddypress Group Documents for BP 1.5 and WP 3.3.

  1. Pingback: Top 10 BuddyPress Plugins to Build Your Own Social Net

  2. Hey guys,

    thanks for the nice plugin. It´s a sad thing it has been removed from wordpress repository.

    I would like to make buddypress documents available in activity stream. Is it possible?

    Regards,

    Felipe

    • Hi Felipe.
      Based on your comment I created the 0.4.3 version. See the link in post.
      Thanks for the great idea.

  3. Pingback: Just released new version of Buddypress Group Documents… « WP MS + Buddypress experiences

  4. Thank you so much for the update. Now I can rename the navigation tab on single site but still it doesn’t work on multisite (wpmu). Thanks anyway.

  5. There is no error message. My buddypress is in secondary blog so that wp_2_options is the table kept all infos for group documents. When I change the nav tab name in admin (network activated), this only changed the one in wp_options. I changed it manually in wp_2_options (in phpmyadmin). Probably you need to consider to get the table correctly from global buddypress setup. Thank you for the wonderful plugins.

  6. Hi lenasterg,

    Thanks for updating the plugin.

    I’ve found a few issues, which I’ve resolved – would you like me to send you the updates?

    Added BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR default setting (false)
    Renamed group-documents-edit-link target from #e to #edit-document-form
    Added conditional use of wp_editor, based on BP_GROUP_DOCUMENTS_ALLOW_WP_EDITOR setting (to provide theme authors with some control – ideally should be an admin setting.
    Updated get_file_size to test file_exists, avoiding warning messages being written to the error_log

    Kind regards,

    Chris

  7. Also discovered (and resolved) the category filter disappearing if no documents exist in the selected category, making it impossible to then change the filter back and see any documents.

    Have improved the message as well, depending on whether a category filter has been selected or not.

    Chris

  8. Hi lenasterg
    I’m running WP + BP + Theme Social + this wonderful Plugin. From the Dashboard->Widgets I’v added Popular Group Documents to Group Right Widget. Then I come to the front end Groups Directory of my website. Here the Group Right Widget sidebar should display Popular Documents from several groups but only Popular Documents from only the first group is being displayed in the Group Right Widget. It’s okay if we are browsing a particular group. How to fix this? Please advise.

  9. @lenasterg

    Since posting above, we’ve made a lot of additional adjustments, which including styling fixes etc. I will send over now, but so far it’s only been tested with a (very) customised bp-daily child theme, and the widget hasn’t been tested. (Note, the plugin details have been edited to prevent our site admins accidentally updating until yours and our versions are back in sync)

    @ayaz.K

    The edit for this particular issue is relatively simple, however there are plenty of other issues which our latest version (0.4.3.1) addresses. I’m sending over to @lenasterg so hopefully it will be available from his site very shortly. I’d recommend us keeping one source, but if you need in a hurry I can send to you also.

    Chris

  10. @Chris
    I uploaded the new version with your additions. Thanks a ton!!! for the great work.

    @ayaz. K.
    Please try the 0.4.3.2 version and let as know if you still having troubles.

      • Same for me while using BP 1.5.5 with default theme. All sidebar stuff is gone incl. avatar and logout button.

      • @HansRuedi – is this with the v0.4.3.3 I sent to you yesterday?

        Please can you send me screenshots with and without?

      • @dkcho – Thanks for letting us know about this. The problem is fixed in v0.4.3.3, which should be available as soon as Lena has had chance to update here.

        If you need it more quickly, please let me know your email address and I will send it over?

        (We are planning to get this back into the WordPress plugin repository soon, which will make obtaining future updates easier)

        Kind regards

        Chris

      • well, I tried it but I got an error on buddypress-group-documents/index.php so that it’s automatically disabled.

      • @dkcho Take the folder inside «buddypress-group-documents0_4_3_3» to install the plugin!

      • Thanks HansRuedi. I totally forgot about that. Now it’s working fine.
        I didn’t see any issue in sidebar. BTW there used to be a admin setup for group document, right ? so that I was able to change the name of the tab but now I cannot find. my buddypress is in the second blog in wordpress MU.

      • The “Group navigation page name” field is found on the Dashboard -> BuddyPress -> Group Documents screen – you should be able to change it there?

        Chris

      • Saying you still can’t do something, without providing any information on what happens, what you do / don’t see, any error message you get, etc. doesn’t give us too many clues.

        Could you elaborate a little more perhaps?

        FYI – I notice that when the changes are saved on the Group Documents admin settings page, in our test setup it takes us to the network control panel – I’ve logged that to be looked into. But it does work and changes the name correctly.

      • Chris and Lenasterg : I’m sorry. I thought I added my reply in your previous comment (above) but Apparently I didn’t. Of course there is no error at all. Your plugin perfectly changes the name correctly as long as in wp_options table. The problem is that my buddy press is not in primary site but in secondary site which is using wp_2_options table. Of course I can change it manually using phpmyadmin. Naturally if your plugin gets the correct table regardless of the location of buddypress site and change the information, it will be perfect. Thank you for the wonderful plugin.

      • @dkcho,

        No problem at all – and I’m glad it’s working for you. I’ve logged your suggest for multi-site WP installations and we’ll try and implement that in the near future. Thanks for the feedback.

      • Thanks Chris. I have another problem or question. When I uploaded a large file (>10MB) in activity (Home) tab, it complained that “File is too large”. But If I uploaded it in Documents tab, I can upload a large file without any problem. Is there any difference ?

    • @vfowler – Hi Vernon, yes, I think as soon as we’ve ironed out some of the remaining issues Lena and I will get this plugin back on the WordPress plugin repository. Until then if you can let us know here if you experience any problems that would be great.

  11. Pingback: Another update on Buddypress Group Documents http lenasterg… « WP MS + Buddypress experiences

  12. I get an error when uploading documents…

    “There was a problem saving your file, please try again.”

    I’ve tried .zip and .pdf, no joy…

    Permissions for the uploads folder in the plugin’s directory are 777…

    The only things I can think of are:

    * I’ve changed the name for the tab in the group to ‘Uploaded Files’
    * I’m running S2Member which might impact uploading, but I’m not sure
    * Some other .htaccess based rule that prevents this?

    Interestingly, when I edit the plugin’s settings, my own admin account is logged out and another admin account logs in automatically(!) but this seems intermittent…

    Any other thoughts?

  13. Great plugin. One thing that I’ve noticed tho, is that after changing some settings within this plugin, my menu is changed to a a multisite menu, thus not allowing me to return to my pages without manipulating the URL manually.

  14. Hi,

    I still no luck to install on WP 3.4 and BP 1.5.6


    Installing Plugin from uploaded file: buddypress-group-documents0_4_3_3.zip

    Unpacking the package…

    Installing the plugin…

    Warning: Invalid argument supplied for foreach() in /home/emelcior/public_html/wp-admin/includes/class-wp-upgrader.php on line 558

    The package could not be installed. No valid plugins were found.

    Plugin install failed.

    Return to Plugins page

    Regards,
    [bayu]

    • Buddy Press Docs is a nice plug in but it’s a completely different tool [more like a wiki] as opposed to one that uploads pre existing docs in various formats.

  15. Great plugin but also having same problem as Jimmy – when i save settings within plugin my dashboard menu changes to multisite menu even though I have a single site WordPress installation.

  16. Thanks for updating this plugin. This is a core plugin for the site we are building.

    I have 2 problems currently and was hoping this would solve them. Unfortunately, this did not.

    1) – Categories – Unable to create them. In the ADMIN tab, when I attempt to create them they build in the display as expected but when I save, they vanish. They do not appear on the upload interface. When I attempt to add a new file and add a category, it does not retain the information.

    2) – Notifications – I have installed the Buddypress Group Email Notification http://wordpress.org/extend/plugins/buddypress-group-email-subscription/ and the Group Documents feature is listed but does not allow a setting to be changed and saved. When you select an option, you do not get Yes or No selected

    • Update – I have solved both of these problems.
      1 – Categories – Turns out it was a conflict with Role Scoper plugin. Deactivating RS and reactivating solved this one.

      2 – Notifications – solved this by revising the returned type for the check on the meta data. I can submit these changes if you can give me an email address to submit to.

      Thanks

      • I’m dealing with the same problem (2). Could you explain the changes to meta data so that my groups don’t receive notifications with every upload?

        Thanks

      • Jesse

        The change is in buddypress-group-documents/includes/notifications.php

        The example of the change – you will have to repeat this for each get_user_meta .

        in orig FIND:
        if ( !get_usermeta( $current_user->id,’notification_group_documents_upload_member’)

        REPLACE:
        if ( !get_user_meta( $current_user->id,’notification_group_documents_upload_member’,true)

        2 changes
        * function name should be get_user_meta (notice the underscore between user and meta)
        * add true for single argument.

        For reference:

        http://codex.wordpress.org/Function_Reference/get_user_meta

        Hope that helps.

        D

  17. Hi from Brazil :] I have a question … I set (mp3) to member upload files, then I have:

    <a class="bp-group-documents-title" id="group-document-link-id; ?>” href=”url(); ?>” target=”_blank”>name; ?>

    <?php
    if (get_option('bp_group_documents_display_file_size')) {
    echo ' (‘ . get_file_size($document) . ‘)';
    }
    ?>

    How I get this and play sound ? ;\

    When click, we have a new blank page and play sound … good, but, I want play the song in the same page, understand ? Great Job you made in this plugin :] See ya

    Help me! Thanks, Sorry about my english

    Cesar

  18. Hi, what’s the possibility of upgrading from the previous “old version” to your new version, and still keep the documents as they are, without re-uploading etc? We have a lot of documents on there (we use BP and BP Documents etc as our company intranet) We stopped upgrading from WP 3.1 and BP just because of the BP Doc plugin.. but now there is hope :-) Thanks!

  19. Thank you for your efforts reviving this plugin. I am testing it with WP 3.4.1 and BP 1.5.6. Here’s a screenshot of an error displaying on Mac OS X Safari ( http://screencast.com/t/35oVuCz7mHR ) when trying to save the group’s Documents settings permissions (since, in wp-admin, I set it to the “Let individual moderators decide” setting). The settings seem to not save either, even though I say yes to the prompt.

    Secondly, whenever saving plugin settings options, it takes me to a page as if it was a MultiSite install, but it’s not a MultiSite install. I was on this page ( /wp-admin/admin.php?page=bp-group-documents-settings ) and, upon saving, I ended up at this page ( /wp-admin/network/admin.php?page=bp-group-documents-settings ).

    Finally, in the BuddyPress group tabs, it displays “Documents (1)” — yet all other tabs that have counters don’t have parentheses around the number. I think you should remove them to be consistent with other tab counters.

    Again, thank you for your efforts, and I look forward to a plugin update or commentary about these issues/concerns.

    • I wanted to clarify that if I select “Let individual moderators decide” but cannot make the changes per group (like in the screenshot), then it defaults to “Members & Moderators” permissions (looser), which I personally think is a mistake. I think it should default to “Moderators Only” (tighter) unless specified per group… Or, better yet, give that as a sub-option under the “Let individual moderators decide” option, if selected.

      When I select “Members & Moderators”, only Moderators can upload/edit/delete and Members can only upload (not edit/delete). When I select “Moderators Only”, only Moderators can upload/edit/delete.

      • Also, I think it was a HUGE issue that I didn’t realize all the group members were going to receive email notifications whenever a document was uploaded. That should be a setting, able to be on/off. Thank you for listening to my suggestions.

      • How do I delete categories? I entered “Financials, Rosters” and it created a single category by that name instead of my intended 2 categories “Financials” and “Rosters”.

  20. hey i was wondering if you could make a private document deposit like a person uploads a document and only the admin can view it but a seperate one thanks i really need this cause we are a school and we need this

  21. You will encounter a “Page not found” error because of a wrong link when you change the group slug and go to a group’s Admin -> Documents. To fix this:

    include/group-admin.php:

    inside bp_group_documents_group_admin_nav() function change $bp->groups->slug to: bp_get_groups_root_slug();

    @Clifford The setting to turn off notification is per user. Account->Settings->Notifications.

  22. Hello, congratulations for modifications in the plugin! It was a great help!
    I want to report two bugs I found:
    1) ‘BuddyPress > Group Documents> Save Settings’ lateral menu (in admin) is modified and displays only those items ‘Themes’ and ‘Plugins’. Clicking on one of these two options the following error appears: ‘Multisite support is not enabled’.
    2) The download link can be done by anyone with the link (public or private groups and members or not members).
    The problem 1 doesn’t affect me, but the second yes. Is there any solution to the issue download files?
    Thanks and sorry for my bad english.

  23. Thanks for the keeping this plugin alive! My only issue is with Excel spreadsheets (xls and xlsx). I can upload these files successfully, but when clicking on the uploaded file, only a blank screen appears. Any help is much appreciated!

    • Here works normal. Clicking on the name of the file in .xls or .xlsx download is done automatically. If you use Google Chrome, look at the bottom of the browser or access by Ctrl + J.

  24. Magnificent goods from you, man. I’ve keep in mind your stuff prior to and you’re simply too wonderful. I actually like what you have obtained here, really like what you are saying and the way in which by which you say it. You are making it entertaining and you continue to take care of to keep it smart. I cant wait to read far more from you. This is actually a tremendous website.

  25. Hi to all. Sorry I can’t keep up with the latests comments/requests about this plugin, but I ‘m currently very busy with a complete different project (non WP) which don’t leave me much time free :-(.

    • The BP Group Document Plugin is NO LONGER supported – that’s a fact.

      The author doesn’t respond to emails or any other communication and “lenasterg” wrote «I can’t keep up with the latests comments/requests about this plugin…»

      A new solution is needed… That’s the status end of 2012, I would say.

  26. Thanks for having resurrected this plugin, I couldn’t understand who and why removed it from wordpress.org. What was the problem?
    I think it would be nice to have it back on the main repo, there are still reasons for not having it there?

    • The BP Group Document Plugin is NO LONGER supported – that’s a fact.

      The author doesn’t respond to emails or any other communication and “lenasterg” wrote «I can’t keep up with the latests comments/requests about this plugin…»

      A new solution is needed… That’s the status end of 2012, I would say.

  27. Hello,
    I would like to adapt “oEmbed html5 audio” to the description of a document.
    How can I do this?
    if( BP_GROUP_DOCUMENTS_SHOW_DESCRIPTIONS && $document->description ){ echo '
    ' . nl2br($document->description) . ''; }

    is that I can filter “description”?
    Thank’s for this plugin

    • The BP Group Document Plugin is NO LONGER supported – that’s a fact.

      The author doesn’t respond to emails or any other communication and “lenasterg” wrote «I can’t keep up with the latests comments/requests about this plugin…»

      A new solution is needed… That’s the status end of 2012, I would say.

  28. Hi, Not sure if anyone can help me but I have just tried to install the plugin and am getting this error message

    Fatal error: require() [function.require.html]: Failed opening required ‘/home/chris116/public_html/wp-content/plugins/buddypress-group-documents/include/group-forum-attachments.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/chris116/public_html/wp-content/plugins/buddypress-group-documents/index.php on line 74

    • The BP Group Document Plugin is NO LONGER supported – that’s a fact.

      The author doesn’t respond to emails or any other communication and “lenasterg” wrote «I can’t keep up with the latests comments/requests about this plugin…»

      A new solution is needed… That’s the status end of 2012, I would say.

      • Hans, unfortunatelly you have right.
        I ‘ll be glad to see, someone else releasing a new version -same way I did on the initial plugin.

        I ‘m really sorry, guys :-(

      • Hi everybody,
        This plugin is very usefull, and I’m very sad for this end.
        Is there anybody that have time to write on a new version. I can help him (her) to write an test some code
        Merry christmas and happy new year from the south of France

  29. Hi Lenasterg! I would be very interested to have BP Group Doc for BP 1.5 but with the possibility to have a max number of file by user and an other tab added in a member’s profile like “My Docs” for all the documents uploaded everywhere in every groups. This way, even if he has the max number of file uploaded reached, the user will be able to delete his group documents even if he’s banned of the group by the admin. Can you get back on me with this one please. I really need that.

  30. Hi,

    any possibility to change the way folders are created. Instead of by group_id by group_slug. I’m using a online web-file manager and it’s not very clear what group is what…

    • Hi zackasan,
      I believe this will cause many problems, for example long slugs will lead to long folders names, slugs from group with non English names will translated to “%CE%B51-%CE%BA%CE%BF%CF%81%CE%AF%CF” type of folder names

      Bests
      Lena

  31. Hi,

    I’ve BP group documents 0.4.0 plugin installed. I have a problem fixed with 0.4.3.1:
    “category filter disappears if no documents exist in the selected category, making it impossible to then change the filter back and see any documents.”

    Is it possible to know how to solve this issue? Or could you please help me to upgrade the plugin correctly?

    Thanks!

  32. Hi all. I’ve tried to convert this plugin to use the group extension api (http://codex.buddypress.org/developer/plugin-development/group-extension-api/) but hit a wall. What I’ve managed to do:

    * Fresh install works again (at least an empty table is created)
    * “Documents” tab is shown, along with an upload form
    * Files get uploaded (to /uploads/group-documents/[blogid]/123456-filename.jpg

    That’s about it. Lots of errors, UI still says nothing was uploaded, table still empty, etc. If anyone wants to continue where I, sadly, have to stop – feel free to contact me and I’ll send you the files. They’re too incomplete to post anywhere..

    • Hans, I installed this and like you, am waiting for the limitation of admin only uploads Did you have success with this plugin, here, in limiting who can upload? thx.

  33. Hi, I am trying to use this Plugin for my site. Is there a option to create sub folders? i.e sub categorize to the main categorize ? It will be really helpful Thanks

  34. I just updated to buddypress 1.7 and the plugin is still active, yet it no longer appears in the buddypress menu.

    • Upon further inspection of our error logs I found that there was a SQL error raised:

      [Mon Apr 29 23:18:25 2013] [warn] [client x.x.x.x] mod_fcgid: stderr: WordPress database error 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 ‘WHERE group_id = 30′ at line 1 for query SELECT COUNT(*) FROM WHERE group_id = 30 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, bp_template_redirect, do_action(‘bp_template_redirect’), call_user_func_array, bp_actions, do_action(‘bp_actions’), call_user_func_array, bp_group_documents_setup_nav, BP_Group_Documents::get_total, referer: http://DOMAIN/groups/admin-test-group/calendar/

      It seems that {$bp->group_documents->table_name} is returning blank in get_total. I did a vardump on $bp and there doesn’t seem to be anything in there for group_documents.

  35. Hi, I ‘m in a middle of working on a beta version for BP 1.7, right now. I hope I will be able to have a working version this week, so please be parient.

    • True. It’s a great plugin.
      I wish someone make a migration script from BP group documents to BuddyDrive.

Comments are closed.