Custom theme doesn't look the same after upgrading from 1.4.10 to 1.4.12 Custom theme doesn't look the same after upgrading from 1.4.10 to 1.4.12
 

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

Main Menu

Custom theme doesn't look the same after upgrading from 1.4.10 to 1.4.12

Started by blackRock, July 13, 2007, 01:34:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blackRock

I was using CPG 1.4.10 modpack v1 (stable) and now I'm using CPG 1.4.12 modpack v2 (stable).

The problem is that the $template_user_admin_menu code in my theme.php is ignored!

To be more specific:

Portion of code from template.html that displays the {ADMIN_MENU} block:

<div id="leftSideBar">
{ADMIN_MENU}
<div class="menuBox">
<h1>Gallery Menu</h1>
{SUB_MENU}
</div>
</div>


Portion of code from theme.php that defines the look of {ADMIN_MENU} for administrator and users:

// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT
<div class="menuBox">
<h1>Menu Διαχείρισης</h1>
<!-- BEGIN admin_approval -->
<span class="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></span>
<!-- END admin_approval -->
<a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a>
<a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a>
<a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a>
<a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a>
<a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a>
<a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a>
<a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a>
<!-- BEGIN log_ecards -->
<a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a>
<!-- END log_ecards -->
<a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a>
<a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a>
<a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a>
<a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a>
<!-- BEGIN documentation -->
<a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a>
<!-- END documentation -->
</div>
EOT;

// HTML template for user admin menu
$template_user_admin_menu = <<<EOT
<div class="menuBox">
<h1>Menu Διαχείρισης</h1>
        <a href="albmgr.php" title="{ALBMGR_TITLE}">{ALBMGR_LNK}</a>
        <a href="modifyalb.php" title="{MODIFYALB_TITLE}">{MODIFYALB_LNK}</a>
        <a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a>
<a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a>
</div>
EOT;


When administrator is logged in, the theme renders fine the $template_gallery_admin_menu code and the result is as expected.
Portion of rendered code for administrator (from index.php):

<div id="leftSideBar">
<div class="menuBox">
<h1>Menu Διαχείρισης</h1>

<a href="admin.php" title="Go to config">Config</a>
<a href="catmgr.php" title="Go to category configuration">Categories</a>
<a href="albmgr.php?cat=0" title="Go to album configuration">Albums</a>

<a href="groupmgr.php" title="Go to group configuration">Groups</a>
<a href="usermgr.php" title="Go to user configuration">Users</a>
<a href="banning.php" title="Go to the banned users">Ban Users</a>
<a href="reviewcom.php" title="Review all comments">Review Comments</a>

<a href="picmgr.php" title="Sort my pictures">Sort my pictures</a>
<a href="searchnew.php" title="Go to the batch add process">Batch add files</a>

<a href="util.php" title="Go to the admin tools">Admin Tools</a>
<a href="profile.php?op=edit_profile" title="Go to my personal profile">My profile</a>
<!-- BEGIN documentation -->
<a href="docs/index.htm" title="Coppermine manual" target="cpg_documentation">Documentation</a>
<!-- END documentation -->
<!-- BEGIN Search Albums -->
<a href="index.php?file=search_album/plugin_config" title="Configure Search Album Plugin" >Search Albums</a>

<!-- END Search Albums -->
</div>

<div class="menuBox">

... etc, {SUB_MENU} is OK.


When a user is logged in, the $template_user_admin_menu is not rendered as expected.
The result is (from index.php):

<div id="leftSideBar">
<div align="center">
<table cellpadding="0" cellspacing="1">
<tr>
<td class="admin_menu"><a href="albmgr.php" title="Create and order my albums">  Create / order my albums</a></td>
<td class="admin_menu"><a href="modifyalb.php" title="Go to modify my albums">Modify my albums</a></td>
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="Go to my personal profile">My profile</a></td>
<td class="admin_menu"><a href="picmgr.php" title="Sort my pictures">Sort my pictures</a></td>
</tr>
</table>
</div>

<div class="menuBox">

... etc, {SUB_MENU} is OK.


As you can see the {ADMIN_MENU} block is as defined in the theme.inc.php file and not as in mine theme.php

I didn't have this problem with CPG 1.4.10 and I didn't find anything in documentation about changes in the themes.
What can I do to render the block as expected?

blackRock