Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks  (Read 2934 times)

0 Members and 1 Guest are viewing this topic.

rlm

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
« on: November 03, 2004, 06:19:43 pm »

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:

Code: [Select]
<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)

Code: [Select]
<tr>
  <!-- start of user admin menu -->
{USER_ADMIN_MENU}
  <!-- start of user admin menu -->
</tr>

who can help? ::)


many thanks.

richard


« Last Edit: November 05, 2004, 04:05:15 pm by GauGau »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
« Reply #1 on: November 04, 2004, 07:40:28 pm »

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

Code: [Select]
$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;

Code: [Select]
'{USER_ADMIN_MENU}' => theme_user_admin_menu(),
Please report if this works.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
« Reply #2 on: November 05, 2004, 12:28:23 pm »

solved, many thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.