Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
hi - the 'Download Dump' link in the sidebar of the Admin Panel is not showing up for a logged in Admin user (it is there when logged in as Super Admin). Looking at the code in gen_dump.php
Code: Select all
    if( $AUTH->user->access_level < K_ACCESS_LEVEL_ADMIN ) die( '<h3>Please login as admin.</h3>' );
it does seem like it should be there. Any ideas?
TRY NOT TO MESS UP WITH THE CODE, YOU DO THIS AT YOUR OWN RISK

Ok so with this said, I will first guide you to the file that actually holds the link for "Download Dump".
(considering that you have not changed the name of the couch folder, in case you have, just replace couch from below with the name of your folder).

Please navigate to:
Code: Select all
couch\theme\_system\


In the "_system" folder you will find 64 items (2 folders, 61 HTML files, 1 PHP file). But you shall be interested in "main.html" alone. Open "main.html" in a text editor of your choice and navigate to
Code: Select all
Line No #61


On this line you will find a <cms:if>, defined as:
Code: Select all
<cms:if k_user_access_level ge '10'>


Change it to:
Code: Select all
<cms:if k_user_access_level ge '7'>


Make sure you don't disturb anything else and only replace 10 with 7.

Hit Save. Go to the couch admin panel in your browser and:
1. refresh, if already logged in, and the changes will be reflected
2. after login it will just appear

Again as a caution. These are the system files and are need by CouchCMS to function uninterrupted. So I would request you to not try and change anything except 10 with 7.

Hope you find this reply useful, do let us know if you achieved what you aimed for!

Regards,
GenXCoders
Image
where innovation meets technology
hi genxcoders - many thanks for your speedy and super-clear instructions. That is exactly what I needed. The only tweak I made was to hide the 'Generate .htaccess' link from the Admin as I don't want to confuse the client! Thanks again for your help!
Code: Select all
                <cms:if k_user_access_level ge '7'>
                    <div id="nav-links">
                        <a href="<cms:show k_admin_link />gen_dump.php">Download Dump</a>
                        <cms:if k_user_access_level ge '10'>
                            <cms:if k_prettyurls >
                                <a class="popup-ajax" href="<cms:show k_admin_link />gen_htaccess.php" target="_blank">Generate .htaccess</a>
                            </cms:if>
                        </cms:if>
                    </div>
                </cms:if>
@potato,
You are most welcome. Nice to know my reply was helpful. :D
Regards,
GenXCoders
Image
where innovation meets technology
4 posts Page 1 of 1