• 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 codes in BB Code full

Nirjonadda

πŸ’– Chevereto Fan
@Rodolfo Sorry if this are not correct forum for this topic. How can disable all code without BB Code full or BB Code full selected by default after upload complete?

ScreenShot00614.png
 
Comment out what you want to remove, like comment out everything in the link bracket, html-code bracket or delete it so it's only the BB code left.

Please can you show me what code need comment out ? I am getting error from comment out.

ScreenShot00664.png

Code:
<?php if (!defined('access') or !access) {
    die('This file cannot be directly accessed.');
}
global $embed_tpl;
$embed_tpl = [
    'links' => [
        'label' => _s('Links'),
        'options' => [
            'viewer-links' => [
                'label'        => _s('Viewer links'),
                'template'    => '%URL_SHORT%',
                'size'        => 'viewer'
            ],
            'direct-links'    => [
                'label'        => _s('Direct links'),
                'template'    => '%URL%',
                'size'        => 'full'
            ]
        ]
    ],
    'html-codes' => [
        'label' => _s('HTML Codes'),
        'options' => [
            'html-embed'    => [
                'label'        => _s('HTML image'),
                'template'    => '<img src="%URL%" alt="%FILENAME%" border="0">',
                'size'        => 'full'
            ],
            'html-embed-full'    => [
                'label'        => _s('HTML full linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%URL%" alt="%FILENAME%" border="0"></a>',
                'size'        => 'full'
            ],
            'html-embed-medium'        => [
                'label'        => _s('HTML medium linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%MEDIUM_URL%" alt="%MEDIUM_FILENAME%" border="0"></a>',
                'size'        => 'medium'
            ],
            'html-embed-thumbnail'    => [
                'label'        => _s('HTML thumbnail linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%THUMB_URL%" alt="%THUMB_FILENAME%" border="0"></a>',
                'size'        => 'thumb'
            ]
        ]
    ],
    'bbcodes' => [
        'label' => _s('BBCodes'),
        'options' => [
            'bbcode-embed'    => [
                'label'        => _s('BBCode full'),
                'template'    => '[img]%URL%[/img]',
                'size'        => 'full'
            ],
            'bbcode-embed-full' => [
                'label'        => _s('BBCode full linked'),
                'template'    => '[url=%URL_SHORT%][img]%URL%[/img][/url]',
                'size'        => 'full'
            ],
            'bbcode-embed-medium'    => [
                'label'        => _s('BBCode medium linked'),
                'template'    => '[url=%URL_SHORT%][img]%MEDIUM_URL%[/img][/url]',
                'size'        => 'medium'
            ],
            'bbcode-embed-thumbnail' => [
                'label'        => _s('BBCode thumbnail linked'),
                'template'    => '[url=%URL_SHORT%][img]%THUMB_URL%[/img][/url]',
                'size'        => 'thumb'
            ]
        ]
    ],
    'markdown' => [
        'label'    => 'Markdown',
        'options' => [
            'markdown-embed'    => [
                'label'        => _s('Markdown full'),
                'template'    => '![%FILENAME%](%URL%)',
                'size'        => 'full'
            ],
            'markdown-embed-full' => [
                'label'        => _s('Markdown full linked'),
                'template'    => '[![%FILENAME%](%URL%)](%URL_SHORT%)',
                'size'        => 'full'
            ],
            'markdown-embed-medium'    => [
                'label'        => _s('Markdown medium linked'),
                'template'    => '[![%MEDIUM_FILENAME%](%MEDIUM_URL%)](%URL_SHORT%)',
                'size'        => 'medium'
            ],
            'markdown-embed-thumbnail' => [
                'label'        => _s('Markdown thumbnail linked'),
                'template'    => '[![%THUMB_FILENAME%](%THUMB_URL%)](%URL_SHORT%)',
                'size'        => 'thumb'
            ]
        ]
    ]
];
 
How to comment out code.

Comment out a block, use

Code:
/*

Code

*/

to comment out just a line, use

Code:
// Code

or

# Code
 
Yeah as @bee said. You have commented out only two lines with your "//" so the system is sending you a code error for the remaining code in between these lines.
 
Yeah as @bee said. You have commented out only two lines with your "//" so the system is sending you a code error for the remaining code in between these lines.

Does this correct code for commented out ?

Code:
<?php if (!defined('access') or !access) {
    die('This file cannot be directly accessed.');
}
global $embed_tpl;
$embed_tpl = [
    /*'links' => [
        'label' => _s('Links'),
        'options' => [
            'viewer-links' => [
                'label'        => _s('Viewer links'),
                'template'    => '%URL_SHORT%',
                'size'        => 'viewer'
            ],
            'direct-links'    => [
                'label'        => _s('Direct links'),
                'template'    => '%URL%',
                'size'        => 'full'
            ]
        ]
    ],
    'html-codes' => [
        'label' => _s('HTML Codes'),
        'options' => [
            'html-embed'    => [
                'label'        => _s('HTML image'),
                'template'    => '<img src="%URL%" alt="%FILENAME%" border="0">',
                'size'        => 'full'
            ],
            'html-embed-full'    => [
                'label'        => _s('HTML full linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%URL%" alt="%FILENAME%" border="0"></a>',
                'size'        => 'full'
            ],
            'html-embed-medium'        => [
                'label'        => _s('HTML medium linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%MEDIUM_URL%" alt="%MEDIUM_FILENAME%" border="0"></a>',
                'size'        => 'medium'
            ],
            'html-embed-thumbnail'    => [
                'label'        => _s('HTML thumbnail linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%THUMB_URL%" alt="%THUMB_FILENAME%" border="0"></a>',
                'size'        => 'thumb'
            ]
        ]
    ],*/
    'bbcodes' => [
        'label' => _s('BBCodes'),
        'options' => [
            'bbcode-embed'    => [
                'label'        => _s('BBCode full'),
                'template'    => '[img]%URL%[/img]',
                'size'        => 'full'
            ],
            'bbcode-embed-full' => [
                'label'        => _s('BBCode full linked'),
                'template'    => '[url=%URL_SHORT%][img]%URL%[/img][/url]',
                'size'        => 'full'
            ],
            'bbcode-embed-medium'    => [
                'label'        => _s('BBCode medium linked'),
                'template'    => '[url=%URL_SHORT%][img]%MEDIUM_URL%[/img][/url]',
                'size'        => 'medium'
            ],
            'bbcode-embed-thumbnail' => [
                'label'        => _s('BBCode thumbnail linked'),
                'template'    => '[url=%URL_SHORT%][img]%THUMB_URL%[/img][/url]',
                'size'        => 'thumb'
            ]
        ]
    ],
    /*'markdown' => [
        'label'    => 'Markdown',
        'options' => [
            'markdown-embed'    => [
                'label'        => _s('Markdown full'),
                'template'    => '![%FILENAME%](%URL%)',
                'size'        => 'full'
            ],
            'markdown-embed-full' => [
                'label'        => _s('Markdown full linked'),
                'template'    => '[![%FILENAME%](%URL%)](%URL_SHORT%)',
                'size'        => 'full'
            ],
            'markdown-embed-medium'    => [
                'label'        => _s('Markdown medium linked'),
                'template'    => '[![%MEDIUM_FILENAME%](%MEDIUM_URL%)](%URL_SHORT%)',
                'size'        => 'medium'
            ],
            'markdown-embed-thumbnail' => [
                'label'        => _s('Markdown thumbnail linked'),
                'template'    => '[![%THUMB_FILENAME%](%THUMB_URL%)](%URL_SHORT%)',
                'size'        => 'thumb'
            ]
        ]
    ]*/
];
 
Ups 😎

Code:
/*
This is a multiple-lines comment block
that spans over multiple
lines
*/
 
Oh, sorry I thought you'd get the answer.
Code:
<?php if (!defined('access') or !access) {
    die('This file cannot be directly accessed.');
}
global $embed_tpl;
$embed_tpl = [
/*
    'links' => [
        'label' => _s('Links'),
        'options' => [
            'viewer-links' => [
                'label'        => _s('Viewer links'),
                'template'    => '%URL_SHORT%',
                'size'        => 'viewer'
            ],
            'direct-links'    => [
                'label'        => _s('Direct links'),
                'template'    => '%URL%',
                'size'        => 'full'
            ]
        ]
    ],
    'html-codes' => [
        'label' => _s('HTML Codes'),
        'options' => [
            'html-embed'    => [
                'label'        => _s('HTML image'),
                'template'    => '<img src="%URL%" alt="%FILENAME%" border="0">',
                'size'        => 'full'
            ],
            'html-embed-full'    => [
                'label'        => _s('HTML full linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%URL%" alt="%FILENAME%" border="0"></a>',
                'size'        => 'full'
            ],
            'html-embed-medium'        => [
                'label'        => _s('HTML medium linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%MEDIUM_URL%" alt="%MEDIUM_FILENAME%" border="0"></a>',
                'size'        => 'medium'
            ],
            'html-embed-thumbnail'    => [
                'label'        => _s('HTML thumbnail linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%THUMB_URL%" alt="%THUMB_FILENAME%" border="0"></a>',
                'size'        => 'thumb'
            ]
        ]
    ],
*/
    'bbcodes' => [
        'label' => _s('BBCodes'),
        'options' => [
            'bbcode-embed'    => [
                'label'        => _s('BBCode full'),
                'template'    => '[img]%URL%[/img]',
                'size'        => 'full'
            ],
            'bbcode-embed-full' => [
                'label'        => _s('BBCode full linked'),
                'template'    => '[url=%URL_SHORT%][img]%URL%[/img][/url]',
                'size'        => 'full'
            ],
            'bbcode-embed-medium'    => [
                'label'        => _s('BBCode medium linked'),
                'template'    => '[url=%URL_SHORT%][img]%MEDIUM_URL%[/img][/url]',
                'size'        => 'medium'
            ],
            'bbcode-embed-thumbnail' => [
                'label'        => _s('BBCode thumbnail linked'),
                'template'    => '[url=%URL_SHORT%][img]%THUMB_URL%[/img][/url]',
                'size'        => 'thumb'
            ]
        ]
    ],
    /*'markdown' => [
        'label'    => 'Markdown',
        'options' => [
            'markdown-embed'    => [
                'label'        => _s('Markdown full'),
                'template'    => '![%FILENAME%](%URL%)',
                'size'        => 'full'
            ],
            'markdown-embed-full' => [
                'label'        => _s('Markdown full linked'),
                'template'    => '[![%FILENAME%](%URL%)](%URL_SHORT%)',
                'size'        => 'full'
            ],
            'markdown-embed-medium'    => [
                'label'        => _s('Markdown medium linked'),
                'template'    => '[![%MEDIUM_FILENAME%](%MEDIUM_URL%)](%URL_SHORT%)',
                'size'        => 'medium'
            ],
            'markdown-embed-thumbnail' => [
                'label'        => _s('Markdown thumbnail linked'),
                'template'    => '[![%THUMB_FILENAME%](%THUMB_URL%)](%URL_SHORT%)',
                'size'        => 'thumb'
            ]
        ]
    ]*/
];

This should work, if it doesnt, just delete the stuff you don't need.
 
This should work, if it doesnt, just delete the stuff you don't need.

This work but How to also comment out this code? Does this edit overwrite with chevereto update?

Code:
            'bbcode-embed-medium'    => [
                'label'        => _s('BBCode medium linked'),
                'template'    => '[url=%URL_SHORT%][img]%MEDIUM_URL%[/img][/url]',
                'size'        => 'medium'
            ],
            'bbcode-embed-thumbnail' => [
                'label'        => _s('BBCode thumbnail linked'),
                'template'    => '[url=%URL_SHORT%][img]%THUMB_URL%[/img][/url]',
                'size'        => 'thumb'
            ]
        ]
    ],
 
Just do the same thing, look at the code! if you want to bulletproof this, make a copy of the embed.php and place it in overrides
 
Just do the same thing, look at the code! if you want to bulletproof this, make a copy of the embed.php and place it in overrides

Thanks for your great support. Just need your confirmation if this code correct ?

Code:
<?php if (!defined('access') or !access) {
    die('This file cannot be directly accessed.');
}
global $embed_tpl;
$embed_tpl = [
/*
    'links' => [
        'label' => _s('Links'),
        'options' => [
            'viewer-links' => [
                'label'        => _s('Viewer links'),
                'template'    => '%URL_SHORT%',
                'size'        => 'viewer'
            ],
            'direct-links'    => [
                'label'        => _s('Direct links'),
                'template'    => '%URL%',
                'size'        => 'full'
            ]
        ]
    ],
    'html-codes' => [
        'label' => _s('HTML Codes'),
        'options' => [
            'html-embed'    => [
                'label'        => _s('HTML image'),
                'template'    => '<img src="%URL%" alt="%FILENAME%" border="0">',
                'size'        => 'full'
            ],
            'html-embed-full'    => [
                'label'        => _s('HTML full linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%URL%" alt="%FILENAME%" border="0"></a>',
                'size'        => 'full'
            ],
            'html-embed-medium'        => [
                'label'        => _s('HTML medium linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%MEDIUM_URL%" alt="%MEDIUM_FILENAME%" border="0"></a>',
                'size'        => 'medium'
            ],
            'html-embed-thumbnail'    => [
                'label'        => _s('HTML thumbnail linked'),
                'template'    => '<a href="%URL_SHORT%"><img src="%THUMB_URL%" alt="%THUMB_FILENAME%" border="0"></a>',
                'size'        => 'thumb'
            ]
        ]
    ],
*/
    'bbcodes' => [
        'label' => _s('BBCodes'),
        'options' => [
            'bbcode-embed'    => [
                'label'        => _s('BBCode full'),
                'template'    => '[img]%URL%[/img]',
                'size'        => 'full'
            ],
            'bbcode-embed-full' => [
                'label'        => _s('BBCode full linked'),
                'template'    => '[url=%URL_SHORT%][img]%URL%[/img][/url]',
                'size'        => 'full'
            ],
            /*'bbcode-embed-medium'    => [
                'label'        => _s('BBCode medium linked'),
                'template'    => '[url=%URL_SHORT%][img]%MEDIUM_URL%[/img][/url]',
                'size'        => 'medium'
            ],*/
            /*'bbcode-embed-thumbnail' => [
                'label'        => _s('BBCode thumbnail linked'),
                'template'    => '[url=%URL_SHORT%][img]%THUMB_URL%[/img][/url]',
                'size'        => 'thumb'
            ]*/
        ]
    ],
    /*'markdown' => [
        'label'    => 'Markdown',
        'options' => [
            'markdown-embed'    => [
                'label'        => _s('Markdown full'),
                'template'    => '![%FILENAME%](%URL%)',
                'size'        => 'full'
            ],
            'markdown-embed-full' => [
                'label'        => _s('Markdown full linked'),
                'template'    => '[![%FILENAME%](%URL%)](%URL_SHORT%)',
                'size'        => 'full'
            ],
            'markdown-embed-medium'    => [
                'label'        => _s('Markdown medium linked'),
                'template'    => '[![%MEDIUM_FILENAME%](%MEDIUM_URL%)](%URL_SHORT%)',
                'size'        => 'medium'
            ],
            'markdown-embed-thumbnail' => [
                'label'        => _s('Markdown thumbnail linked'),
                'template'    => '[![%THUMB_FILENAME%](%THUMB_URL%)](%URL_SHORT%)',
                'size'        => 'thumb'
            ]
        ]
    ]*/
];

ScreenShot00667.png
 
Back
Top