• 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

choose direct link for default

thaoly

banned
hi chevereto support team,

when an image was uploaded successfull, my website (pic4s.com) alway show viewing link. I want to change it to direct link (or forum, bbcode link, ...), how must I config, i also had find all option in admin dashboard but it not available.

Thanks and nice day.
 
You must edit app/themes/Peafowl/snippets/anywhere_uploader.php
 
You must edit app/themes/Peafowl/snippets/anywhere_uploader.php

Can you help me to explain more detail ? Must I edit below code?

Code:
<?php if(CHV\getSetting('theme_show_embed_uploader')) { ?>
            <div data-group="upload-result" data-result="success" class="c14 center-box soft-hidden">
                <div class="input-label margin-bottom-0">
                    <label for="uploaded-embed-toggle"><?php _se('Embed codes'); ?></label>
                    <div class="c7 margin-bottom-10">
                        <select name="uploaded-embed-toggle" id="uploaded-embed-toggle" class="text-input" data-combo="uploaded-embed-toggle-combo">
                            <?php
                                foreach(G\get_global('embed_tpl') as $key => $value) {
                                    echo '<optgroup label="'.$value['label'].'">'."\n";
                                    foreach($value['options'] as $k => $v) {
                                        echo '    <option value="'.$k.'" data-size="'.$v["size"].'">'.$v["label"].'</option>'."\n";
                                    }
                                    echo '</optgroup>';
                                }
                            ?>
                        </select>
                    </div>
                    <div id="uploaded-embed-toggle-combo">
                        <?php
                            $i=0;
                            foreach(G\get_global('embed_tpl') as $key => $value) {
                                foreach($value['options'] as $k => $v) {
                                    echo '<div data-combo-value="'.$k.'" class="switch-combo'.($i>0 ? " soft-hidden" : "").'">
                                        <textarea class="r2" name="'.$k.'" data-size="'.$v["size"].'"></textarea>
                                    </div>'."\n";
                                    $i++;
                                }
                            }
                        ?>
                    </div>
                </div>
            </div>
 
Sorry the file is app/themes/Peafowl/snippets/embed_tpl.php
 
Yup, thank you very much, i got it. But I want to show more field like Direct link, Embeded Code,... after user had uploaded success. How must I do?

Just follow the code structure and add more elements. Sadly there can't be 100% easy or neat ways to customize everything.
 
How can i edit this label:

2015-03-03_9-32-42.png
 
That is in app/themes/Peafowl/snippets/anywhere_uploader.php
 
If i want to show only 1 value (direct link, html code, ..), what must I set values for variables?

PHP:
<div id="uploaded-embed-toggle-combo">
                        <?php
                            $i=0;
                            foreach(G\get_global('embed_tpl') as $key => $value) {
                                foreach($value['options'] as $k => $v) {
                                    echo '<div data-combo-value="'.$k.'" class="switch-combo'.($i>0 ? " soft-hidden" : "").'">
                                        <textarea class="r2" name="'.$k.'" data-size="'.$v["size"].'"></textarea>
                                    </div>'."\n";
                                    $i++;
                                }
                            }
                        ?>
                    </div>
 
Like I said, just follow the structure of app/themes/Peafowl/snippets/embed_tpl.php
 
Like I said, just follow the structure of app/themes/Peafowl/snippets/embed_tpl.php
Nope, I mean my problem was resolved. But I want to add 1 or 2 field beside default link, so can you provide variable of direct link or bbcode which I believe that will set for $k or $v in below code:

Code:
<div id="uploaded-embed-toggle-combo">
                        <?php
                            $i=0;
                            foreach(G\get_global('embed_tpl') as $key => $value) {
                                foreach($value['options'] as $k => $v) {
                                    echo '<div data-combo-value="'.$k.'" class="switch-combo'.($i>0 ? " soft-hidden" : "").'">
                                        <textarea class="r2" name="'.$k.'" data-size="'.$v["size"].'"></textarea>
                                    </div>'."\n";
                                    $i++;
                                }
                            }
                        ?>
                    </div>
 
Sorry but I don't understand. You want to add another box? Why you are looking at the foreach function the only thing that does is convert embed_tpl to codes. If you want to add codes you need to edit embed_tpl not the foreach.
 
Sorry but I don't understand. You want to add another box? Why you are looking at the foreach function the only thing that does is convert embed_tpl to codes. If you want to add codes you need to edit embed_tpl not the foreach.
Yup, I want to add more box, because I want it more intuitive for users
 
Sorry but that is a little bit more complicated than just do some minor editing.

You should ask a friend or someone who knows more about coding because is something that changes how the embed codes works and to be honest is something that I've only seen requested once (you).

Don't take me wrong... I can give you hints, tell you in which file you should be focused, etc. But that's all. Sadly I can't help in extended styling because I've other priorities, just check this: https://chevereto.com/community/forums/requests-ideas-and-suggestions.1/?prefix_id=6

So it will be great if some advanced user here can help you but that is totally on good will. Hope you can understand.
 
Sorry but that is a little bit more complicated than just do some minor editing.

You should ask a friend or someone who knows more about coding because is something that changes how the embed codes works and to be honest is something that I've only seen requested once (you).

Don't take me wrong... I can give you hints, tell you in which file you should be focused, etc. But that's all. Sadly I can't help in extended styling because I've other priorities, just check this: https://chevereto.com/community/forums/requests-ideas-and-suggestions.1/?prefix_id=6

So it will be great if some advanced user here can help you but that is totally on good will. Hope you can understand.
Thanks you very much. I wish you have a nice day.
 
Back
Top