Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: change theme only for loged in users?  (Read 1040 times)

0 Members and 1 Guest are viewing this topic.

railgun

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
change theme only for loged in users?
« on: July 17, 2016, 11:55:47 am »

hello i want to delte the complet normal header from copermine to get a custom menu bar

for this i need to delte at the template theme
Code: [Select]
    <div id="cpg_header_block_outer">
        <div class="cpg_header_block_inner">
            <div id="main_menu">
                    {SYS_MENU}
                    {SUB_MENU}
                    {ADMIN_MENU}
            </div><!-- Begin IE7 support --><img src="images/spacer.gif" class="menuheight" alt="" /><!-- End IE7 support -->
            <div class="clearer"></div>
            {MESSAGE_BLOCK}
        </div>

but if i do this this change will be also happen for all loged in users, and then its triki to navigate though the options,
is there a way to display it like the admin_menu ? so that's only be visible if i loged in?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: change theme only for loged in users?
« Reply #1 on: July 18, 2016, 12:04:41 pm »

Copy the function pageheader from themes/sample/theme.php to your theme's theme.php file, if it doesn't already exist. Then, find
Code: [Select]
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
and replace with
Code: [Select]
        '{SYS_MENU}' => USER_ID ? theme_main_menu('sys_menu') : '',
        '{SUB_MENU}' => USER_ID ? theme_main_menu('sub_menu') : '',
Logged

railgun

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: change theme only for loged in users?
« Reply #2 on: July 18, 2016, 08:27:38 pm »

thanks again andree, and have a nice day :)
work perfectly
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 21 queries.