WordPress.org

Support

Support » Plugins and Hacks » [Resolved] any plans to add upload options for docs (.doc, .pdf, etc.)

[Resolved] any plans to add upload options for docs (.doc, .pdf, etc.)

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hope
    Member

    @amalsh

    I was looking for this too… It would be a very good feature to add.
    If anybody knows how, would be great to share the solution with us…. Thanks

    ajamm
    Participant

    @ajamm

    Nice idea!

    ajamm
    Participant

    @ajamm

    Okay, have added pdf option in two files in the plugin:

    buddypress-activity-plus/js/bpfb_interface.js
    and
    buddypress-activity-plus/lib/class_bpfb_binder.php

    This now allows uploading of pdf docs…

    Just need to mod it to open pdfs in a new window… can anyone help?

    jeffacubed
    Participant

    @jeffacubed

    Hi ajamm – any chance you could share your <custom-code> for enhancing the ability of the ‘BuddyPress Activity Plus’ plugin to handle the uploading of .pdf’s?

    Cheers,

    Jeff

    ajamm
    Participant

    @ajamm

    Check out these code changes…

    In buddypress-activity-plus/js/bpfb_interface.js

    var uploader = new qq.FileUploader({
    			"element": $('#bpfb_tmp_photo')[0],
    			"listElement": $('#bpfb_tmp_photo_list')[0],
    			"allowedExtensions": ['jpg', 'jpeg', 'pdf', 'png', 'gif'],

    and in buddypress-activity-plus/lib/class_bpfb_binder.php
    $uploader = new qqFileUploader(array('jpg', 'pdf', 'jpeg', 'png', 'gif'));

    ajamm
    Participant

    @ajamm

    Still dont know how to make them open in a new window. If you find an answer to this, please share!

    jeffacubed
    Participant

    @jeffacubed

    As a follow up I did find on WPMU

    I did find that I could add more file types by adding them in these two files:
    js/bpfb_interface.js LINE 213 “allowedExtensions”: [‘jpg’, ‘jpeg’, ‘png’, ‘gif’, ‘pdf’],
    and
    lib/class_bpfb_binder.php. There is LINE 163
    $uploader = new qqFileUploader(array(‘jpg’, ‘jpeg’, ‘png’, ‘gif’, ‘pdf’));

    Which 100% works to get .pdf’s uploading to the bpfb ‘media-folder’ but there’s no list/thumbnails for the pdf’s.

    Somewhere, in the activity-plus source code, there must be a way to generate small thumbnails for attached pdf? Solving this would make this bp-plugin top notch in my books!

    Jeff

    jeffacubed
    Participant

    @jeffacubed

    Before I tackle

    Still dont know how to make them open in a new window. If you find an answer to this, please share!

    Were you able to get the attached pdf’s to at least show/list in the activity stream? Using your method (ajamm) I seem the pdf’s going to the bpfb folder (so that’s working) – but what I don’t see (quite yet) is any list of the pdf’s in the activity stream. I get an activity event when I upload a pdf now (good!), but I don’t see the pdf, even when I revert back to the Buddypress default theme – curious. I’ll keep digging.

    I’m using WP (multisite) 3.5.1, bp 1.6.4

    -Jeff, Vancouver (Canada)

    ajamm
    Participant

    @ajamm

    Hello Jeff,

    I will have to go and check. I think it gave a link in the activity stream… :-S

    Can’t remember…

    Why not use buddypress group documents plugins which can be integrated with activity plus.

    ajamm
    Participant

    @ajamm

    Sounds interesting, not sure if I tried this one.

    ajamm
    Participant

    @ajamm

    What is the proper name for it, I cant find it?

    jeffacubed
    Participant

    @jeffacubed

    Whoa – great catch/call yzqlang – I’d forgotten abou the buddypress group documents plugin, as support for buddypress 1.5+ had dropped off some time ago. Another developer has picked up the plugin, which you can find the most recent (15/5/2012) version here

    Ajamm – I’ve tested the above group-documents w/ buddypress 1.6.4 + WordPress 3.5.1 – & everything I’ve tested works A’OK with pdf attachments into the group activity stream. All documents attachments, from the activity stream, get collected under a new group ‘tab’ (which you can name whatever you like). Overall, I’d have to say it’s a great add-on/integration w/ the bp-activity-plus plugin.

    I also want to test this out w/ bp 1.7 beta2, just to be sure of longer-term compatibility.

    Thx all √

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] any plans to add upload options for docs (.doc, .pdf, etc.)’ is closed to new replies.