novafacile / novagallery

novaGallery - a beautiful and and ease to use php image gallery for your photos - flat file - no database required - modern responsive design
https://novagallery.org
GNU Affero General Public License v3.0
75 stars 13 forks source link

show file name #14

Closed dcordovez closed 2 years ago

dcordovez commented 2 years ago

Hello! I am very interested in acquiring the licensed version. Is it possible to configure so that the file name is displayed along with the photo?

david-novafacile commented 2 years ago

Hi, yes, this can be achieved with a small enhancement to a theme or with creating an individual theme.

In the theme the file name is available in the foreach iteration in the variable $element

e.g. in /nova-themes/novagallery/album.php beetween line 32 and 36.

There you can add the file name where you like with <?= $element ?>

For example Line 34: <img src="<?php echo Image::url($album, $element, Site::config('imageSizeThumb')); ?>" loading="lazy" class="rounded"><br><?= $element ?>

To show the filename in the lightbox view, just add it as title to the image tag (Line 34) <img src="<?php echo Image::url($album, $element, Site::config('imageSizeThumb')); ?>" loading="lazy" class="rounded" title="<?= $element ?>"><br> You can extend this with individual functions, for example to remove the file extension.

Of course it could be better but for that I recommend to create an individual theme: just copy paste a theme, change what you like to change (including the metadata.json of the theme) and activate it in the config file.

If you need personal support for creating an individual theme (including a pro license), just let me know. ;-)

dcordovez commented 2 years ago

Thank you! I have already bought the license. Should I receive an email with the download or do I use the same files as the free version?

david-novafacile commented 2 years ago

You should have received an email from Paddle with the download link and support info right after your order.

If you haven't received it, I can also send you the download link from novaGallery Pro Support. Just send a short email to support@novagallery.org

david-novafacile commented 2 years ago

seems to be solved.