Separating USER_ADMIN_MENU and ADMIN_MENU template blocks Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
 

News:

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

Main Menu

Separating USER_ADMIN_MENU and ADMIN_MENU template blocks

Started by rlm, November 03, 2004, 06:19:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rlm

hi,

on my theme's template.html i made room for 2 different admin menu sections (or blocks):

  • the first is the standard Admin ADMIN_MENU, nothing changed here,
  • the second is called USER_ADMIN_MENU, which of course is not in the standard template since it seems to be using the same block as ADMIN_MENU.

this would be ok (since they do not appear at once), but for the fact that i wish to present them differently and in different locations of the template.html page:

i need to separate the building blocks for these menus in the theme file and have different placeholders for them in the template file. Because they are to be presented differently, they are compiled separately in theme.php. They have different (html table) structures, sizes and styles. Having one placeholder for both menu types simply does not work for me.

Put simply, I want to have something like this in the template.html file:


<td>
  <!-- start of admin menu -->
{ADMIN_MENU}
  <!-- end of admin menu -->
</td> 


(and later, in a completely different section of the template's HTML table)


<tr>
  <!-- start of user admin menu -->
{USER_ADMIN_MENU}
  <!-- start of user admin menu -->
</tr>


who can help? ::)


many thanks.

richard



Casper

You need to add it to this array in theme.php;

$template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{MAIN_MENU}' => theme_main_menu(),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),


So you would want to add something like;

'{USER_ADMIN_MENU}' => theme_user_admin_menu(),

Please report if this works.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

rlm