• 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

twitter card

Theme overrides: https://chevereto.com/docs/theme

app/themes/Peafowl/head.php

PHP:
// Set twitter card
$twitter_card = [
    'card' => 'summary',
    'description' => function_exists('get_meta_description') ? get_meta_description() : null,
    'title' => G\str_replace_last(' - '.CHV\getSetting('website_name'), null, get_doctitle()),
    'site' => CHV\getSetting('twitter_account') ? ('@'.CHV\getSetting('twitter_account')) : null,
];
switch (true) {
    case G\is_route('image'):
        $twitter_card['card'] = 'photo';
    break;
    case function_exists('get_admin') and G\is_route('album'):
    case function_exists('get_user') and G\is_route('user'):
        $twitter_card['card'] = 'gallery';
        if (G\is_route('album')) {
            $twitter_card['creator'] = get_album()['user']['twitter']['username'];
        } else {
            $twitter_card['creator'] = get_user()['twitter']['username'];
        }
        $list_output = function_exists('get_list') ? get_list()->output_assoc : null;
        if (is_array($list_output) && count($list_output) > 0) {
            for ($i = 0; $i < 4; ++$i) {
                $twitter_card['image'.$i] = $list_output[$i]['display_url'];
            }
        }
    break;
}
foreach ($twitter_card as $k => $v) {
    if (!$v) {
        continue;
    }
    echo '<meta name="twitter:'.$k.'" content="'.$v.'">'."\n";
}
 
Back
Top