BBPress Attachments
-
Hi,
With this plugin is it possible to only display media/files that are attached to BBPress Forum topics/replies?.
All BBPress attachments have the meta ‘_bbp_attachment’ so could your plugin only show those files via a shortcode?.Thanks.
-
Thanks for your question. You should be able to use the “Simple Custom Field Parameters” or the ‘ Custom Field Queries, the “meta_query” ‘ parameters to display BBPress attachments with the
[mla_gallery]shortcode. You can find more information in the Settings/Media Library Assistant Documentation tab.I have some experience with BuddyPress and BBPress, but I can’t see how to add an attachment to a BBPress forum topic. If you can give me the steps required to do this I can investigate further.
Thanks for any additional details you can provide and for your interest in the plugin.
Sorry I should have said, I’m using the GD BBpress Attachments plugin (https://en-gb.wordpress.org/plugins/gd-bbpress-attachments/) to enable attachments functionality. I think this is pretty much the ‘industry’ standard plugin used for enabling attachments on BBPress.
I’ll have another look through your documentation but if you could possibly share the shortcode parameters, that would be awesome!
Thank you.
After looking through your documentation this shortcode seems to be working perfectly!:
[mla_gallery post_parent=all post_mime_type=all meta_key=_bbp_attachment]Just wondered if I wanted to seperate the displays of different filetypes, for instance have all images in one row(s) and all PDFs in another would I need to use 2 different shortcodes or could it be done with shortcode templates?
Also, is it possible to change the images used for filetype icons like the PDF icon?
Thank you for this excellent plugin!
-
This reply was modified 5 years, 4 months ago by
andyinspired.
Thanks for your updates and the good news on your progress.
You asked “I wanted to seperate the displays of different filetypes, for instance have all images in one row(s) and all PDFs in another would I need to use 2 different shortcodes or could it be done with shortcode templates?” The shortcode templates do not have any conditional logic (aside from that in the Content Templates), so you will have to use separate shortcodes for each of the MIME types (filetypes) you want to highlight.
You asked “Also, is it possible to change the images used for filetype icons like the PDF icon?” There are two alternatives you can explore. First, you can change the thumbnail displayed for an individual item by assigned a “Featured Image” to items such as PDF documents that do not have a native thumbnail generated by WordPress (or MLA). Second, you can change the icon image used when no thumbnail image is available. To do that:
- Navigate to the Settings/Media Library Assistant “Uploads” tab.
- Find the entry for the file extension or MIME type you want to change.
- CLick the Quick Edit or Edit rollover action.
- Change the value in the “Icon Type” dropdown control.
- Click “Update” to record your new setting.
Note that the second approach is a global change. It will affect all shortcodes as well as the Media/Assistant table display. At this time there is no way to change the icon on a shortcode-by-shortcode level.
I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions. Thanks again for the positive feedback and for your interest in the plugin.
Thank you for your swift and informative reply.
With the first option will I need to change the featured image for every PDF file in the media library or just once? And will the same image be applied on future PDF uploads?
I looked at the 2nd approach, but that seems to just change the filetype image from a pre-determined list of images/criteria.
Thanks for the kind words and for the additional questions.
The first option was designed for applications that included a unique image for each document, so it is entirely manual. You would have to edit each item individually and you would have to manually update new items as they are added to the library. I realize this would be tedious at best for your application.
The second option is part of MLA’s support for a more attractive set of icons by file type. It allows you to select from a fixed set of 112 icon types/images you can find in the
media-library-assistant/images/crystalsubdirectory. I realize that neither option is a great fit for your application and I regret the news is not better.If you have some PHP skills and interest you could also use the filters and actions (hooks) provided by WordPress, MLA and perhaps GD BBpress Attachments to do something more suitable. I could investigate that and give you more specific guidance if you are interested. Thanks for your understanding.
Thank you, I’ll take another look at the list of images. I’m comfortable using filters/actions with some guidance if you wouldn’t mind.
Thanks again.
You wrote “I’m comfortable using filters/actions with some guidance if you wouldn’t mind.”
The best way to proceed will be by email so we can work out the details. You can contact me at my web site to begin the dialog. I will post a summary here when we have progress to report.
@andyinspired – Thanks for following up and contacting me at my web site. I replied to your message with some questions and ideas and I look forward to hearing back from you.
-
This reply was modified 5 years, 4 months ago by
The topic ‘BBPress Attachments’ is closed to new replies.