• 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

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