BuddyDev

Search

How can I best achieve my perfect single photo view?

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55540

    I have fixed it:

    class-mpp-admin-settings-page.php line 625:

    Was if (typeof(localStorage) !== 'undefined') {

    Now if (typeof(localStorage) !== 'null') {

    Now I can get back to understanding why MediaPress is not loading the right size photo, or the photo.php template file.

  • Keymaster
    (BuddyDev Team)
    Posts: 25057
    Brajesh Singh on #55541

    Hi George,
    those have very different meaning in javascript. It is not a type.
    1. If you want to check for null, there should be no quote, you would do typeof(localStorage) == null

    My code is for older browser to detect if localStorage is defined(available) or not. It has no impact on your situation.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55542

    I reset everything, and in the single image view, am now seeing the description, so the default template is loading. No lightbox, but the image size is correct. I’m making progress.

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55543

    Nonetheless Brajesh, I have found your bug, maybe you can confirm the issue? As in, it is when you check for, and try to load local storage on my browser, it fails, and throws that error. Unless you are saying that I am wrong, and there is nothing wrong with the code, and look elsewhere?

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55544

    Your suggestion works, though 🙂

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55545

    OK, back to the lightbox problem. It seems that the check for settings for the lightbox always returns false. and in that check in grid-post, if I make the answer to always be true, then I see the lightbox.

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55546

    That one I think is my bad, I did not set the shortcode atts, so that one now works too.

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55547

    My last issue is that I’m trying to overload the single image view – the one that appears when you click on the image in the lightbox, the one you see if you turn the lightbox off and the gallery thumbnail is clicked from the shortcode gallery, could you tell me which file I should be over-riding for that?

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55548

    I can over-ride the lightbox/photo.php

    However, it seems that the default photo.php is not being loaded. the image that appears does not have the mpp classes.

    This is where we started, but I’m pleased to have the lightbox up and working. Is there any way I can zoom that image?

  • Participant
    Level: Master
    Posts: 475
    Venutius on #55578

    I found I need to make some changes to Mediapress. I wanted to have WordPress Comments as the public point of interaction for images, but also, keep the BP activity stream as a private – site member only, point of discussion.

    I can also see that WordPress on my site does not recognise the Mediapress Images as valid attachments, and the reason I’m ending up with a medium image when the lightbox image is clicked, is because that is a WordPress fallback default. I ended up directly editing that fallback to show large, and include my zoooom class.

    This means that I now have a lightbox page that looks and works as I require.

    I then started thinknig about other features I need. As these are public images, it is clear, they need to have the Alt text set. Whilst this can be set by editing the attachment in WordPress Media, personally I do not find that a useful use case, and so I am starting to add the code needed to include the alt tsag in the Mediapress Gallery bulk editor, and also the front-end edit gallery shortcodes etc.

    I’ve added a couple of new bulk actions to automatically copy either the title, or the description to the alt field.

    Once I’ve done this, I will look into adding GIS information.

    I have also added a number of taxonomies to the images, and am looking at the differing ways these can be used.

    In my site galleries, there are often several photos of the same part of the building, for example. I would like to be able to group those photos into a collection that has its own comment stream. I can see that mpp attachments are hierarchical, and the gallery is the parent. I’m wondering about setting an image as the parent for a collection of images, and so deliver that commentable collection in that way?

You must be logged in to reply to this topic.

This topic is: not resolved