• 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

Custom Options

RPPatrick

Chevereto Member
So I am trying to add some options that are specific to what I need.

So in the Peafowl theme I opened up
Code:
dashboard.php

In there I added a copy of the "Download Button" code an renamed every part that was specific:

theme_peafowl_download_src_button:
HTML:
<div class="input-label">
    <label for="theme_peafowl_download_src_button"><?php _se('Enable source download button'); ?</label>
    <div class="c5 phablet-c1"><select type="text" name="theme_peafowl_download_src_button" id="theme_peafowl_download_src_button" class="text-input">
    <?php
        echo CHV\Render\get_select_options_html([1 => _s('Enabled'), 0 => _s('Disabled')], CHV\get_chv_setting('theme_peafowl_download_src_button'));
    ?>
    </select></div>
    <div class="input-below"><?php _se('Enable this if you want to show the source download button.'); ?> </div>
</div>

It shows up nicely in the settings pages, but the option is not saved (it always stays on disabled)

Is there something I am missing?

EDIT1:
Ah I needed to add the option in the Database table too.

Now for my second and new question:

On each image there is a button to "edit image details"
This modal has some options.
What I want to do is add 2 new options to this modal
1: a checkbox for "is source available?"
2: a dropdown with a list of extension to specify what the source extension is.

I want to be able to edit these options per image so that the button that downloads the source file gets all the correct info.
 
Last edited:
For dashboard you need to bind the values in route.dashboard.php

For question 2 and 3 you need to add it to the image forms at snippets and later add it in chevereto.js to send those values using ajax.
 
Back
Top