Removing tables for the admin menu ? Removing tables for the admin menu ?
 

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

Removing tables for the admin menu ?

Started by Corinne, May 11, 2006, 02:20:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corinne

Hello,

While trying to customize my menus, I realize the admin menu (the one used for configuration) was going above my main design on low resolutions (800x600 i.e.) I found out that it was because the admin menu is built with tables (each link is in a <td>). I would like to remove the cells and put the links in a simple line (simple links seperated by some image or character) - but didn't find the page that produces this table.

Can somebody tell me in which page is the admin menu code generated ?

Thanks very much in advance !

Joachim Müller

If the admin menu is not in your custom theme's theme.php, then copy the corresponding section from the sample theme. This applies to everything you want to see changed. In your special case, edit themes/sample/theme.php, find// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>

EOT;
and copy it into themes/yourtheme/theme.php (into a new line before ?>). Then edit the code as you see fit - you could change the table to consist of two rows, you could change the entries to a bullet list, you can change the tet to icons - whatever. The only thing that is mandatory to have is the stuff in curly brackets and the html comments (like <!-- BEGIN documentation -->) that are used internally by the theming engine.
If you need ideas how an admin menu could look like, take a look at themes/hardwired/theme.php that has a two-rows admin menu like this:// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
                                </tr><tr>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>
EOT;
Another option would be a bullet-list admin menu like it is being used in the kubrick theme:// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                        <li class="sidebar_item">
                                <h2 class="sidebar_item">Admin</h2>
                                <ul>
<!-- BEGIN admin_approval -->
                            <li id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}" class="navmenu">{UPL_APP_LNK}</a></li>
<!-- END admin_approval -->
                            <li class="sidebar_menu"><a href="admin.php" title="{ADMIN_TITLE}" class="navmenu">{ADMIN_LNK}</a></li>
                            <li class="sidebar_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}" class="navmenu">{CATEGORIES_LNK}</a></li>
                            <li class="sidebar_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}" class="navmenu">{ALBUMS_LNK}</a></li>
                            <li class="sidebar_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}" class="navmenu">{GROUPS_LNK}</a></li>
                            <li class="sidebar_menu"><a href="usermgr.php" title="{USERS_TITLE}" class="navmenu">{USERS_LNK}</a></li>
                            <li class="sidebar_menu"><a href="banning.php" title="{BAN_TITLE}" class="navmenu">{BAN_LNK}</a></li>
                            <li class="sidebar_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}" class="navmenu">{COMMENTS_LNK}</a></li>
<!-- BEGIN log_ecards -->
                            <li class="sidebar_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}" class="navmenu">{DB_ECARD_LNK}</a></li>
<!-- END log_ecards -->
                            <li class="sidebar_menu"><a href="picmgr.php" title="{PICTURES_TITLE}" class="navmenu">{PICTURES_LNK}</a></li>
                            <li class="sidebar_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}" class="navmenu">{SEARCHNEW_LNK}</a></li>
                            <li class="sidebar_menu"><a href="util.php" title="{UTIL_TITLE}" class="navmenu">{UTIL_LNK}</a></li>
                            <li class="sidebar_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}" class="navmenu">{MY_PROF_LNK}</a></li>
<!-- BEGIN documentation -->
                            <li class="sidebar_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation" class="navmenu">{DOCUMENTATION_LNK}</a></li>
<!-- END documentation -->
                                  </ul>
                                </li>

EOT;

Corinne

Hello GauGau, thank you very much for the explanatory answer (and sorry for being so late) :)
I'm going to try !