• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

File naming random but with original filename as title on site

Status
Not open for further replies.

vlaur

Chevereto Member
Hi,

I use random method for filenaming but i want on site the pages with image t0 have original filename as title, now chevereto is using same method for filename and for title when is displayed on site.

Is someone maked an custom code or something to make 2 separated renaming for this function ?
- one method to use filename on storage
- one method to use filename as title in site
 
Last edited:
Since the uploader hasn't a friendly way to add titles to images I think that this could help a loot with content context and I think that it could be include by default, not only the images uploaded using random filename mode.
 
Thank you Rodolfo!

--
Just installed 3.4.6 and seen posting title/description is not working how I expected. Is good but i'm ussing random file naming, and all my title and description got some weird names like "365c569a2fd25657".

What this option should doing, is to copy the filename from original image and to post it as default description/title. What is doing now is posting description as filename after the file was saved on storage.
 
Last edited:
Actually is not that hard to fix:

app/lib/classes/class.image.php

Replace this:
PHP:
            if(!$params['description']) {
                $description_from_filename = preg_replace('/[-_\s]+/', ' ', $image_upload['uploaded']['name']);
                $image_insert_values['description'] = ucfirst($description_from_filename);
            }

With this:
PHP:
            if(!$params['description']) {
                $description_from_filename = preg_replace('/[-_\s]+/', ' ', $image_upload['source']['name']);
                $image_insert_values['description'] = ucfirst($description_from_filename);
            }
 
Status
Not open for further replies.
Back
Top