• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • 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