BuddyDev

Search

Mediapress features

  • Participant
    Level: Master
    Posts: 413
    Venutius on #15556

    Hi Brajesh,

    Sorry to hassle you but did you get anywhere with this?

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #15562

    Hi George,
    About this, I had a relook at the things and I noticed that at the moment, we are only showing the description on the single media page, lightbox and single gallery page(gallery description) if enabled.

    Adding description in the loop is as simple as adding tag but expecting that users will have variations in their length of description, It can make the layout look real bad.

    I am still thinking of a way to do it. If you have suggestion, Please do let me know.

  • Participant
    Level: Master
    Posts: 413
    Venutius on #15563

    Hi Brajesh, yes I understand. For my requirement I am setting up a research site where users will upload photo’s showing particular aspects of their research and it’s very important that accompanying the photo is a description of some sort to put the photo into context.

    I think it’s ok that in the grid view you do not see those descriptions, however it would be better if every photo had title and this was displayed rather than the filename, which is often meaningless.

    Regarding the description, I’d like this to be displayed in the single media page/lightbox for the image. However that does not need to be the formal description, since that’s not currently being used. One option I was thinking of was to in some way force the user to add an opening comment for the image which would serve as a description, that way this would be displayed in the single media view as per the current functionality.

    If we are going to use the description, could this not be displayed in a similar way to the comments? Comments cn obviously be variable length so similar formatting issues have already been dealt with. I guess the other option is to impose limits on the length of the description, however in a research context this is less than ideal.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #15568

    Hi George,
    Thank you.

    On the single media page it is already displayed(you will need a bit of css to make it look better though). I am concerned about the grid view(or media loops).

    The file name is actually saved as media title on upload. A user can change it from the lightbox or from the bulk edit/ single media edit pages.

    Those will be shown instead of the filename if available.

    For the description in the loop, I am thinking about the ui that doe snot break the grid. Another possibility is to change the grid to (or add new ) masonry layout. That way, we won’t have to worry much about the description length.

  • Participant
    Level: Master
    Posts: 413
    Venutius on #15572

    I’ve just added a description to an image, I then viewed it on the single image page and the lightbox view, neither showed the description. Think there’s an issue with the shortcodes with that maybe?

    If we can get the description displaying in the single media view, I think I’d like to use this as the anchor page for my own custom lightbox, one that allows a full page view and the ability to zoom. Many of these images are maps and they are to be studied.

    That would leave the question of how to get the descriptions added in the first place. How feasible is it to serve a bulk edit page covering only the images added immediately after the uploads?

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #15577

    1. Please visit Dashboard->MediaPress->settings->Theming and enable “Show Media description”.
    That will do it.

    2. Bulk edit, I haven’t tried but I too want to have a better way to allow updating title/description at the time of upload. For me, UI is the biggest issue and that’s why haven’t done it on upload till now.

    I will explore it next week and let you know if we can do a selective bulk update.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 413
    Venutius on #15583

    Actually it looks like the problem is that descriptions added in the Admin Gallery editor are not being saved. I just added a description from the front end and could see it in the single image view.

    Actually I’ve been thinking about it and the UX I would like to create would be as follows:

    1. User clicks upload, and selects a file.
    2. File upload box is hidden.
    3. Image Title and Description boxes are revealed, for the user to complete.
    4. On completion, the image upload box is revealed again ready for the next upload.

    There’s a hook I could use to place the content, I wonder if it’s possible to write a suitable JS routine to handle the rest? Any suggestions?

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #15587

    I will test for the admin update. It might have happened recently if I did not notice it.

    For the UX

    1. In MediaPress we do auto upload. It means, the file gets queued and uploads as soon as it is selected. A little modification to your strategy will work though.

    a. When the file upload is complete, show the title/description form for the media
    You can attach to the event “mpp:uploader:upload.success”

    You can see that it passes the uploader as well as the received data from server.

    https://github.com/buddydev/mediapress/blob/master/assets/js/uploader.js#L254

    This even is fired for each file upload. If you want to hook to when all the selected files get uploaded, you can attach to “mpp:uploader:upload.complete” as implemented here
    https://github.com/buddydev/mediapress/blob/master/assets/js/uploader.js#L262

    Here is an example on how to attach

    
    	$(document).on('mpp:uploader:upload.success', function (event, mpp_uploader, attachment ) {
    		// do something.
        });
    

    There are other events available too(on selection etc). Please do note that if you go this route, It may need more attention that what seems on the surface.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 413
    Venutius on #15597

    Thanks Brajesh, I’ve put together a simple input form linked to js which reveals the form on upload complete, I’ve linked this to js submit function that calls an Ajax function which will add the title and description to the image. What I need to do now is write the function that will add this info to the gallery image. is there an mpp function I can use?

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #15599

    Hi George,
    That’s good to know.

    Yes, you can use

    
    mpp_update_media() function
    

    Here is the function definition
    https://github.com/buddydev/mediapress/blob/master/core/media/mpp-media-functions.php#L299

    and here is an example use

    https://github.com/buddydev/mediapress/blob/master/core/media/mpp-media-actions.php#L89

    This is what we use to update the single media details.

    Hope that helps.
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved