• 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

Embed.tpl - removing options from the array doesn't apply

Majen

Chevereto Member
How do I exactly remove option from the embed.tpl? I've tried to comment out the "html_codes" section of the outer array ($embed_tpl), but the image page still shows all embed options. I've tried to restart the browser (Firefox, Chrome and Safari) and deleted the cache in all of them, but it didn't change anything.
 
Code:
$embed_tpl = [
        'links' => [
                'label' => _s('Links'),
                'options' => [
                        'viewer-links' => [
                                'label'         => _s('Viewer links'),
                                'template'      => '%URL_VIEWER%',
                                'size'          => 'viewer'
                        ],

                        'direct-links'  => [
                                'label'         => _s('Direct links'),
                                'template'      => '%URL%',
                                'size'          => 'full'
                        ]
                ]
        ],
        /*'html-codes' => [
                'label' => _s('HTML Codes'),
                'options' => [
                        'html-embed'    => [
                                'label'         => _s('HTML embed'),
                                'template'      => '<img src="%URL%" border="0">',
                                'size'          => 'full'
                        ],
                        'html-embed-original'   => [
                                'label'         => _s('HTML original linked'),
                                'template'      => '<a href="%URL_VIEWER%"><img src="%URL%" border="0"></a>',
                                'size'          => 'full'
                        ],
                        'html-embed-medium'             => [
                                'label'         => _s('HTML medium linked'),
                                'template'      => '<a href="%URL_VIEWER%"><img src="%MEDIUM_URL%" border="0"></a>',
                                'size'          => 'medium'
                        ],
                        'html-embed-thumbnail'  => [
                                'label'         => _s('HTML thumbnail linked'),
                                'template'      => '<a href="%URL_VIEWER%"><img src="%THUMB_URL%" border="0"></a>',
                                'size'          => 'thumb'
                        ]
                ]
        ],*/
        'bbcodes' => [
                'label' => _s('BBCodes'),
                'options' => [
                        'bbcode-embed'  => [
                                'label'         => _s('BBCode embed'),
                                'template'      => '[img]%URL%[/img]',
                                'size'          => 'full'
                        ],
                        'bbcode-embed-original' => [
                                'label'         => _s('BBCode original linked'),
                                'template'      => '[url=%URL_VIEWER%][img]%URL%[/img][/url]',
                                'size'          => 'full'
                        ],
                        'bbcode-embed-medium'   => [
                                'label'         => _s('BBCode medium linked'),
                                'template'      => '[url=%URL_VIEWER%][img]%MEDIUM_URL%[/img][/url]',
                                'size'          => 'medium'
                        ],
                        'bbcode-embed-thumbnail' => [
                                'label'         => _s('BBCode thumbnail linked'),
                                'template'      => '[url=%URL_VIEWER%][img]%THUMB_URL%[/img][/url]',
                                'size'          => 'thumb'
                        ]
                ]
        ]
];

?>
 
The code is correct and it works in my localhost. Are you sure that you uploaded the file and that you are editing the current theme that you are using?
 
Yes, I'm editing via vi directly on the server. I've added an "echo "embedded debug";" to embed_tpl.php and it's correctly showing up.
 
The code is correct I'm not getting right why is failing for you. As you mentioned you cleared the cache and everything. Are you using Cloudflare or something like that?
 
Hello,

Sorry to revive old threads but this is happening to me as well. I have the same code and all. Not really sure why it doesn't work.

Regards,
Imagonos
 
Check server side cache. If enabled, try flushing the cache.
 
embed.tpl controls the dynamic embed codes (uploader, selection, etc.). If you want to remove /image embed codes you need to edit app/themes/Peafowl/views/image.php
 
Back
Top