We need some way to add new photos_image entity with media fields instead of the default image field.

Possible solutions:
Update the entity add form (/photos/image/add).
Add an option to select default image field for current upload forms on node/{node}/photos.

Then depending on usage we might need some way to disable the current upload form if images are not supported.

Comments

Nathaniel created an issue. See original summary.

  • Nathaniel committed a06ee68 on 8.x-5.x
    Issue #3118709 by Nathaniel: Add default photos_image entity add form.
    
nathaniel’s picture

Issue summary: View changes

Added the default add form for the photos_image entity: /photos/image/add

  • Nathaniel committed 8666ce6 on 8.x-5.x
    Issue #3118709 by Nathaniel: Support media input for photos image entity...
nathaniel’s picture

Added an option on /admin/config/media/photos under "Upload settings" to select "Default multi-upload field". Image fields and image media fields available on /admin/config/media/photos/fields should appear here and will be used on /node/{node}/photos (plupload or the classic upload form).

Also planning to add an option to disable the multi-upload form if the albums are being used for content other than images.

jhmnieuwenhuis’s picture

Hi,
I tested the latest dev-version
When adding a media image field and selecting that on /admin/config/media/photos under "Upload settings"
i can upload images.
They are uploaded as media images.
Excellent so far.

few remarks :

- I use a media image type called Photo. I created this myself.
I can not use that.
on /admin/config/media/photos under "Upload settings" i can only select a field that references the default image media type
( admin/structure/media/manage/image )
not the type i created myself
( admin/structure/media/manage/photo )
i guess all media types with a media source of type image should be available for select.
- so for now i tested with the default media image type.
- i noticed that on the edit rearrange tab, i see the correct number of images, but they are blank images (grey square)
- It would also be nice to be able to use existing media.
I have may pictures already available as media on my site.
At the moment I am using Blazy and Slick to display them.
But i do like the concept of a photo album, that is why i am testing this and will keep doing so.

Thanks for the work you put into this !!

Hans Nieuwenhuis, The Netherlands

jhmnieuwenhuis’s picture

I see thumbnail images on sort tab now.
I had to enable them on admin/config/media/photos/display/sort

regards,

jhmnieuwenhuis’s picture

Is it possible in the 8.x-5.x version to create different layouts as in the samples ?

Like a grid or a slider with thumbnails and a main image ?

If so, how do i do that ?

nathaniel’s picture

Thanks for testing and the feedback!

Working on fixing the media fields select options. I think I have it worked out getting ready to commit the changes to dev.

You might be looking for the "Photo Information" block. That will appear on the /photos/image/{photos_image} pages. The pager display is used for that block: /admin/config/media/photos/display/pager.

The 8.x-5.x branch will use view modes and display modes. Still might need to workout which ones appear where.

/admin/structure/display-modes/view
/admin/config/media/photos/display

  • Nathaniel committed 16897ef on 8.x-5.x
    Issue #3118709 by Nathaniel: Support media input for photos image entity...
jhmnieuwenhuis’s picture

ok, thanks.

What format should i use for the pager ( /admin/config/media/photos/display/pager ) then ?
I tried blazy and responsive mage and a few others, but do not see how i get a grid or a thumbnail slider.

Or is that not possible right now or am i missing something.

Regards and good health,
Hans

jhmnieuwenhuis’s picture

The album view shows a broken link in the contextual filter

jhmnieuwenhuis’s picture

I can place the photos information block, but nothing is shown .
Not even the block title.

nathaniel’s picture

StatusFileSize
new9.57 KB

The contextual filter should be "Album ID" that view can be changed to grid layout (or any other layout that you want). I would suggest using views for slideshows and any other custom layouts. You could duplicate the album view and modify as needed (after fixing the contextual filter).

It seems a bit complicated, but once all the display modes, view modes and views are all configured it should work nicely. We could work on some documentation / steps / examples and possibly more default view options to include with the module.

The home page on the demo site is a grid of album covers. It is here:
https://buysomephotos.com/photos-home-page-view-export

Under fields the broken handler can be replaced with "Album cover" for example. Attached an export of an updated view. The key here is "Photos: Album cover" view mode under fields.

jhmnieuwenhuis’s picture

Update :

1) in form field Default multi-upload field , i can now also choose a media with media source other then image.
Now i can select my own photo media type. Great !!

2) If i use the view that you send to me, i can display the albums in a grid display.
Great !!

3) Questions :

a) how do i display the contents of an album in a grid?
so all the images in an album are shown in a grid.
on the demosite, the albums are shown in a grid and if you open
an album the images in there are also shown as a grid.

b) Are you going to make it possible to select existing media for an album?
So not using upload, just select from the existing media.

c) What are the view modes Full Content and Pager are used for?
I see the use of the Album Cover and Sort view modes.

That's all for now.

Regards and good health,
Hans

nathaniel’s picture

StatusFileSize
new20.82 KB

Great! Thanks again for the testing and feedback.

Attached a view that should be close to what is on the demo site. You'll have to update the field_image to display the media field (and anything else) as needed.

Full content is currently used on:
/photos/image/{photos_image}

Pager also appears on /photos/image/{photos_image} in the "Photo Information" block. That block is designed to only appear on the image page.

Started a separate issue to track selecting multiple existing media entities: #3123526: Allow adding multiple existing media images to album. Currently only one can be added at a time.

jhmnieuwenhuis’s picture

StatusFileSize
new31.08 KB
new34.07 KB

Just a quick message.
I got it working now.
If i select an albums cover from the grid with albums, the images within the album are shown in a grid.
Great, that is what i needed !!

I got an error after importing the view and opening it.

See attached screenshots.
The error is caused by the contextual filter setting : provide default value : raw value from url.
When i change that to content id from url, the error disappears and it works.
The correct images for each album are shown.

Regards,
Hans

jhmnieuwenhuis’s picture

--

jhmnieuwenhuis’s picture

If will start to setup some documentation.
I do this for all my work.
Kind of a tutorial how to get from scratch to a working system with multiple albums and images.
It will include
- the installation and configuration of the modules
- the creation of content and media types
- the setup of the view modes and responsive image styles
- creating the views
- the creation of media
- the creation of albums
- maintaining albums and media
- etc.

Setting up documentation will of course create new questions.....

I could create a libreoffice and pdf document for you if you want.

Regards,

Hans

nathaniel’s picture

That would be awesome! We definitely need some updated documentation.

Thanks for the views feedback. I'll have to work on those and test a fresh install soon.

jhmnieuwenhuis’s picture

Username missing in Photo information block.

I see Uploaded on 03/31/2020 - 13:52 by

But no username.

nathaniel’s picture

Yep, I see the issue. Should be fixed in the latest dev version. Be sure to clear cache after updating the code.

#3124515: Name missing in photo information block

nathaniel’s picture

Status: Active » Fixed

I think I'm going to mark this one as fixed. Feel free to open other issues or comment on other issues as needed. Thanks for all your help on these issues!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.