• 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:

  • 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

How to remove this annoying tag?

I couldn't see an easy way to hide this, nothing in the back end as far as I can see.

Consequently, for now, I copied the file api_v1.php located in:

content/legacy/themes/Peafowl/views

and placed it in the theme overrides:

content/legacy/themes/Peafowl/overrides/views

Then I edited the file and removed all the content after <div class="text-content"> and before <?php require_theme_footer(); ?>

In it's place I added the following line: <p>Our API is currently disabled.</p>

So basically it does not get rid of the menu item but nothing shows anymore.

There really needs to some way to turn off that menu item in the dashboard.
 
This menu can be removed by removing some code in /content/legacy/themes/Peafowl/header.php

It is best to copy the file into /overrides/ to keep the change with future updates.

Once you have copied the header.php into /overrides/ edit the header.php and around line 382 remove this section:

Code:
                            <?php
                    if (getSetting('website_privacy_mode') == 'public' || (getSetting('website_privacy_mode') == 'private' && Login::isLoggedUser())) {
                        ?>
                    <?php
                            if (Handler::var('pages_link_visible')) {
                                ?>
                        <li data-nav="about" class="phone-hide pop-btn pop-keep-click">
                            <span class="top-btn-text">
                                <span class="icon far fa-question-circle"></span><span class="btn-text phone-hide phablet-hide laptop-hide tablet-hide desktop-hide"><?php _se('About'); ?></span>
                            </span>
                            <div class="pop-box arrow-box arrow-box-top anchor-right">
                                <div class="pop-box-inner pop-box-menu">
                                    <ul>
                                        <?php
                                                    foreach (Handler::var('pages_link_visible') as $page) {
                                                        ?>
                                            <li<?php if ($page['icon']) {
                                                            echo ' class="with-icon"';
                                                        } ?>><a <?php echo ($page['link_attr'] ?? ''); ?>><?php echo ($page['title_html'] ?? ''); ?></a>
                                            </li>
                    <?php
                                                    } ?>
                                    </ul>
                                </div>
                            </div>
                        </li>
    <?php
                            } ?>
<?php
                    } ?>
            </ul>
        </div>

This will remove the (?) menu completely.

If you want to have this toggled by an admin option within settings drop me a message and I will give you the files you need to edit.
 
Yes, Oakley and I have the same opinion and idea. We don't want to delete the whole menu, but we only want to delete the api option entry. However, Oakley, I have also thought about blocking the content in the api page, but other people can still use other chevereto operators. By changing the domain name to use my api interface, it may cause my api to be abused
 
Ok to answer the original question I've managed to remove the API entry from the menu by removing some code code located in web.php

app/legacy/load/web.php

Removed the following from around line 531:

Code:
    $api_page = [
        'type' => 'link',
        'link_url' => get_base_url('api-v1'),
        'icon' => 'fas fa-project-diagram',
        'title' => 'API',
        'is_active' => 0,
        'is_link_visible' => 1,
        'attr_target' => '_self',
        'sort_display' => -2,
    ];
    Page::fill($api_page);
    $pages_visible[] = $api_page;

Remember that any future updates may overwrite the change.
 
Ok to answer the original question I've managed to remove the API entry from the menu by removing some code code located in web.php

app/legacy/load/web.php

Removed the following from around line 531:

Code:
    $api_page = [
        'type' => 'link',
        'link_url' => get_base_url('api-v1'),
        'icon' => 'fas fa-project-diagram',
        'title' => 'API',
        'is_active' => 0,
        'is_link_visible' => 1,
        'attr_target' => '_self',
        'sort_display' => -2,
    ];
    Page::fill($api_page);
    $pages_visible[] = $api_page;

Remember that any future updates may overwrite the change.
Maybe need one more thing, prevent API key generation.

2q2ai.png


/app/legacy/routes/settings.php

line 115 and 123

PHP:
    $routes = [
        'account' => _s('Account'),
        'profile' => _s('Profile'),
        'password' => _s('Password'),
        'security' => _s('Security'),
        #'api' => 'API',
        'connections' => _s('Connections'),
        'homepage' => _s('Homepage'),
        'powered' => _s('Powered by'),
    ];
    $icons = [
        'account' => 'fas fa-user',
        'profile' => 'fas fa-id-card',
        #'api' => 'fas fa-project-diagram',
        'password' => 'fas fa-key',
        'security' => 'fas fa-shield-alt',
        'connections' => 'fas fa-plug',
        'homepage' => 'fas fa-home',
        'powered' => 'fas fa-power-off',
    ];
 
Back
Top