• 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
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

How to change the alt value of embed code?

Status
Not open for further replies.

koxle

Chevereto Member
I would like to output the image title into the alt value instead of the ID.jpg
I have edited the route.image.php at route and the embed.php in snippets.
The anywhere uploader and the page of image can output the title to alt value correctly(replace %FILENAME% to %TITLE%),
but the album and the user image list cannot output the correct alt value.
How can i change it correctly?
 
It seems no one know.
I have to give up.

Sure I know how to do it but I don't have time to get into this. I'm about to release a new version, please try to figure out yourself or just wait.
 
This controls listings: app/themes/Peafowl/tpl_list_item/image_cover_image.php

PHP:
<img src="%IMAGE_DISPLAY_URL%" alt="%IMAGE_TITLE%" width="%IMAGE_DISPLAY_WIDTH%" height="%IMAGE_DISPLAY_HEIGHT%">

This controls embed codes: app/themes/Peafowl/snippets/embed.php

Replace this:
PHP:
alt="%FILENAME%"

With this:
PHP:
alt="%TITLE%"

To make it work with listings open app/lib/functions.render.php

Replace this:
PHP:
$object = G\array_filter_array($item, ['image', 'medium', 'thumb', 'name', 'extension', 'size_formatted', 'display_url', 'how_long_ago', 'url', 'url_viewer', 'filename']);

With this:
PHP:
$object = G\array_filter_array($item, ['image', 'medium', 'thumb', 'name', 'title', 'extension', 'size_formatted', 'display_url', 'how_long_ago', 'url', 'url_viewer', 'filename']);

In the future keep in mind that I can't be on top of each customization need.

Cheers,
Rodolfo.
 
Status
Not open for further replies.
Back
Top