nextcloud / gallery

DEPRECATED Gallery app was replaced by Photos
https://github.com/nextcloud/photos
GNU Affero General Public License v3.0
108 stars 58 forks source link

Embeddable galleries #63

Open oparoz opened 8 years ago

oparoz commented 8 years ago

From @oparoz on July 26, 2015 15:6

User requested

User type: External

User level: Advanced

Description

It should be possible to create a special link which just renders the photowall, including the controls, but without the header and footer. We could also make the controls optional.

Those links would need to be loaded in an iframe and there may be some Javascript conflicts.

embedded_galleries

Competitive products

Make ownCloud hosted content available everywhere

Risk / caveats

Sponsorship

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Copied from original issue: owncloud/gallery#235

oparoz commented 8 years ago

From @arpee on August 17, 2015 7:7

+1

oparoz commented 8 years ago

From @arpee on August 17, 2015 7:8

At the moment - it seems it is not possible to embed gallaries in an iframe - even with all controls enabled etc.

oparoz commented 8 years ago

@LukasReschke - Do you have some doc handy on the CSP policy which needs to be applied at the controller level for people to be able to embed the HTML template they receive?

oparoz commented 8 years ago

From @setnes on August 29, 2015 14:0

I like this idea. A smaller step might be to somehow create a special share link (using the share interface) that includes html code you could use to embed a thumbnail link to a gallery directory. That might be a smaller hurdle.

oparoz commented 8 years ago

The plan is to use the new REST API (https://github.com/owncloud/gallery/issues/5) for that. Something like /api/gallery would send you the HTML and links to the JS, thumbnails and previews links.

oparoz commented 8 years ago

From @sagarshah007 on March 13, 2016 20:1

i am interested to work on this project because i have worked on webservices so much whenever i read the idea i thought i could help develop this api so any other website can embed gallery into their website and use all functionality of gallery offered by our website

oparoz commented 8 years ago

Cool :). There is already an API, but one or two new routes should be defined. The biggest problem to solve from my pov is how to make sure that it's easily embeddable in various CMS without having to modify security settings there. Luckily, we have an expert at ownCloud which will be able to assist.

oparoz commented 8 years ago

From @Karugi on March 17, 2016 10:57

The plan for embedding a gallery from ownCloud to other webpages is a great one.From my POV, the iframe idea will be much simpler to implement because the web is heterogenous where websites are built using different languages.This also is not a very customizable way for an end developer willing to integrate the feature to his/her webpage. The other option is create the routes providing the endpoints for the ownCloud gallery API then develop a php package which other developers can use to integrate the feature to their websites.This will give control to the website implementers on how they want the gallery feature to appear in their websites. This can be extended in due time to other languages as well. I would really want to contribute to this project.

oparoz commented 8 years ago

Yes, using an iframe makes it very easy to quickly add a gallery without having to move files to the CMS, forum, etc., but we have to make the result flexible so that it can fit most use cases. Some people may not want the embedded slideshow per example.

There are already endpoints in Gallery for people who want to retrieve a list of images or previews: https://github.com/owncloud/gallery/wiki/RESTful-API

They're free then to customise any Gallery app to present the information they get.

oparoz commented 8 years ago

From @Karugi on March 19, 2016 6:54

I think an embeddable widget can work perfectly for this project. The only thing the end user will need to do is put a code snippet containing a special code to their webpage and a gallery will be shown in return.

Your thoughts?

oparoz commented 8 years ago

Yes, this could be one of the features of this project.

oparoz commented 8 years ago

From @Karugi on March 19, 2016 8:12

What other features were you thinking of?

oparoz commented 8 years ago

I didn't really think about all the details. There are plenty of examples of API from platforms which specialise in serving images and videos and we should at least provide a basic set which matches what they can offer.

It has to be easy to set up and flexible. Some people will want a photowall, others a slideshow, etc. It's all about empowering ownCloud users so that they can keep their data where it is without giving up on ease of share.

oliverpool commented 7 years ago

I possibility would be to allow iframe embedding for public galleries: it would allow to have a photowall without effort.

For a slideshow, one may just have to add some url parameters like: https://demo.nextcloud.com/nexttest/apps/gallery/s/ubmPLT7HKxxlBeC?play=true#Coast.jpg

smacz42 commented 5 years ago

Has there been any follow-up with this?

EDIT:

This is the close I could get:

http://cziryak.com/nextcloud/index.php/s/Lfq5iTpDiZT5FJC

Using the following:

<iframe src="https://cziryak.com/nextcloud/index.php/apps/gallery/s/TyiLFMXQQdALe9Z#IMG_20190302_151135.jpg" onload="this.width=screen.width;" height="500px"></iframe>

You know, it's kinda sad that I can't even put a preview in here. Why can't I paste an image in here like the OP did with cloud.githubusercontent.com?!?!?!?