• 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

Image Page Doctitle

akchev

Chevereto Member
Hi Chevereto...

How can I make the Doctitle for an Image to spit out "Photo by USERNAME" rather than the images actual title? I found the code in routes/route.image.php but need assistance on what the code should be.

Here is what I found...
Code:
$pre_doctitle = $image_safe_html['title'] ?: ($image_safe_html['name'].'.'.$image_safe_html['extension']) . ' hosted at ' . CHV\getSetting('website_name');

Is this what needs to be changed?
Code:
$image_safe_html['title']

If so, what should ^^this line of code^^ be for it to spit out "Photo by USERNAME" rather than the title of the image? Please help, thanks regardless!
 
PHP:
if($image['user']['id'] !== NULL) {
    $pre_doctitle = 'Photo by ' . $image['user']['username'];
} else {
    $pre_doctitle = $image_safe_html['title'] ?: ($image_safe_html['name'].'.'.$image_safe_html['extension']) . ' hosted at ' . CHV\getSetting('website_name');
}
 
Hi Rodolfo thank you very much for the excellent support (as always). I figured it out prior your respond and figuring this out explained a lot for a PHP newbie. Incredible. Simply, incredible =). Thanks!
 
Back
Top