photo gallery - Forum

Forum Navigation
You need to log in to create posts and topics.

photo gallery

Hi @luishp I would like to make a gallery using nanophotosprovider2 from https://nanophotosprovider2.nanostudio.org.

I have downloaded and follow the instruction but I get an error and I'm not sure about my integration :

Uncaught TypeError: jQuery(...).nanogallery2 is not a function
<anonymous> https://pha78.kappatau.fr/nano_photos_provider2/#!/NewPage line 2 > injectedScript:3
jQuery 9
<anonymous> https://pha78.kappatau.fr/nano_photos_provider2/#!/NewPage line 2 > injectedScript:2
jQuery 6
Angular 21
jQuery 13

Can you help me ?

Regards

Uploaded files:

@phil78 it seems you are trying to use a plugin for Nanogallery2:

https://nanogallery2.nanostudio.org/

You should be sure to include Nanogallery2 before trying to include any other script.
Regards.

@luishp You are right, I have added the call to the library in the metadata but I have the same error ?

Uploaded files:

Phil, please do not include JQuery again (as it's already included in VisualNEO Web) and use the "body" metadata section intead of the "head" one.

<link  href="https://cdn.jsdelivr.net/npm/nanogallery2@3/dist/css/nanogallery2.min.css" rel="stylesheet" type="text/css">
<script  type="text/javascript" src="https://cdn.jsdelivr.net/npm/nanogallery2@3/dist/jquery.nanogallery2.min.js"></script>

 

@luishp I have added the tags <body> et </body> but there is no difference. But perhaps this is not at the good place.

Please, can you send me back my file with your modification ?

@phil78 you have added the code here:

Project > Properties > Advanced > Custom Metadata > Head

Just move it to:

Project > Properties > Advanced > Custom Metadata > Body

And please do not add <body> tags!

@luishp I am sorry to waste your time, I am probably stupid but I do not see the part Properties > Advanced > Custom Metadata > Body ?

Uploaded files:
  • Capture-decran-2024-03-28-170423.png

@phil78 that's the correct place. It seems the French translation is not very exact. Sorry!

@luishp ok but in this case I always have the same errors...

Uncaught ReferenceError: jQuery is not defined
jQuery 2
jquery.nanogallery2.min.js:21:162
Uncaught TypeError: jQuery(...).nanogallery2 is not a function
<anonymous> file:///E:/Philippe/Documents/VisualNeoWeb/Projets/nano_photos_provider2/diapoNano_Test/index.html#!/NewPage line 2 > injectedScript:3
jQuery 2
index.html:3:41

@phil78 please take a look at the attached app and be sure to change your language preferences to English as I think something is not working correctly when in French.

Uploaded files:

@luishp  I do not see where is the call to the link and the script? My langage preference was empty and I do not see any difference ?

If I compile your app I have a different error.

nanogallery2: Could not retrieve nanoPhotosProvider2 data. Error: error - Uncaught Error: Call to undefined function exif_read_data() in /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.json.class.php:580 Stack trace: #0 /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.json.class.php(857): galleryJSON->image_fix_orientation(Resource id #11, Array, 'nano_photos_con...') #1 /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.json.class.php(715): galleryJSON->GenerateThumbnail2('nano_photos_con...', 'berlin3C.jpg', 'berlin3C_auto_1...', 'auto', '150', 0) #2 /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.json.class.php(445): galleryJSON->GetThumbnail2('nano_photos_con...', 'berlin3C.jpg') #3 /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.json.class.php(1237): galleryJSON->GetAlbumCover('nano_photos_con...') #4 /www/wwwroot/sites_philippe/pha78.kappatau.fr/nano_photos_provider2/nano_p
(nano_photos_provider2.json.class.php/580) [my_nanogallery]

@phil78 please check the attached image for the English language.
The error you see comes from your server .php file:
https://pha78.kappatau.fr/nano_photos_provider2/nano_photos_provider2.php

I can't help you much more as I have not worked with that library.

Uploaded files:
  • body-tab.png

Ok thank you @luishp. I've modified the language file so that I can see the tabs correctly. Here it is to update the distribution.

 

Uploaded files:

Thank you @phil78!
I have just added it to the current version 24.03.29 :)
Kind regards.