somehow, I have lost my sys_menu somehow, I have lost my sys_menu
 

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

somehow, I have lost my sys_menu

Started by sean porter, October 16, 2008, 08:26:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sean porter

While it seems most people new to CPG are trying to remove the sys_menu buttons, somehow I've achieved that with flying colors and now I'd like it back!

for the sake of simply evaluating the way the site would look, I commented out the sys_menu in my template.html.  well I un-commented it, and now it is nowhere to be found.  I must be missing something.  I tried to copy over all the original, relevant code from the sample template.php and template.html to make sure I hadn't mistakenly disabled it elsewhere, but no luck.

from my custom template.html
</head>
<body>
  {CUSTOM_HEADER}
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td valign="top" style="border: 0px solid #666666;background-color:#FFFFFF;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
            <!--  <a href="index.php"><img src="themes/sample/images/site_logo.png" border="0" alt="" /></a><br /> -->
            </td>
            <td width="100%" align="center">
              <h1>{GAL_NAME}</h1>
              <h3>{GAL_DESCRIPTION}</h3><br />
              {SYS_MENU}<br />{SUB_MENU}
            </td>
          </tr>
        </table>


anything relevant from my custom template.php:
// HTML template for the album list
$template_album_list = <<<EOT

<!-- BEGIN stat_row -->
     <!--   <tr>
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
        </tr> -->
<!-- END stat_row -->
<!-- BEGIN header -->
        <tr class="tableb_compact">
<!-- END header -->

<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="80%" align="center" cellspacing="5" cellpadding="0">
        <tr>
                <td width="50%" height="20" align="right" valign="middle" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
                       <td align="center" valign="middle" class="thumbnails_home">
                       <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                       <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
               
                <td valign="middle" align="left" class="tableb_compact">
                        {ADMIN_MENU}
                </td>
        </tr>
        </table>
        </td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact">
                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{COLUMNS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                   
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;


I tried the trick of accessing another theme through the url to see if it was just my theme that was messed up, but the sys_menu doesn't show using the classic theme either.  what I'm I doing wrong?

TIA,

another new new one

Nibbler

Make sure you don't have a template.html in your root Coppermine directory. If you have one there it will override the theme's template.html.

sean porter

Thanks, I did check that as well.

I was able to turn up some new information that may help solve the problem.  I logged in by accessing the login through url, and immediately the sys_menu showed up.  It's there in either user mode or admin mode, but as soon as I log out again it disappeared. 

on the one hand, I dig it.  But I guess it would be good for me to know why its that way, and what I did to accomplish it.


sean porter

If this is in the wrong thread, because now its a permissions issue of sorts, I'll gladly move it.

here's a link to the gallery: http://www.seanporterdp.com

I couldn't find anything along these lines in a search (especially since I haven't change much code at all, and only formatting)

thanks in advance for any guidance or suggestions if I'm still overlooking any other board rules.


Joachim Müller

Zip the entire content of your custom theme folder and attach it to your posting please.

sean porter


Joachim Müller

The theme you attached doesn't explain the double headers, so either your webhost is injecting stuff or you're messing with the custom_header.

Some of your edits of theme.php are nonsensical - to disallow rating or comments, just turn off the corresponding option on the groups control panel instead of messing with the theme. I cleaned up your theme.php a bit, you should use this:<?php
// HTML template for the album list
$template_album_list = <<<EOT

<!-- BEGIN stat_row -->
<!-- END stat_row -->
<!-- BEGIN header -->
        <tr class="tableb_compact">
<!-- END header -->
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="80%" align="center" cellspacing="5" cellpadding="0">
        <tr>
                <td width="50%" height="20" align="right" valign="middle" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
                       <td align="left" valign="middle" class="thumbnails_home">
                       <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                       <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
                
                <td valign="middle" align="left" class="tableb_compact">
                        {ADMIN_MENU}
                </td>
        </tr>
        </table>
        </td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="80%" cellspacing="0" cellpadding="0">
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact">
                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{COLUMNS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                    
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="80%" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="80%" class="statlink" align="left">your looking at <b>{ALBUM_NAME}</b><br /><a href="index.php">&lt;&lt; go back</a></td>
                        </tr>
                        </table>

EOT;

// HTML template for thumbnails display
$template_thumbnail_view = <<<EOT

<!-- BEGIN header -->
        <tr> 
<!-- END header -->
<!-- BEGIN thumb_cell -->
        <td class="thumbnails" width="{CELL_WIDTH}" align="center">
                <table width="80%" align="center">
                        <tr>
                                <td width="50%" valign="bottom" align="right">
                                       {CAPTION}
                                       {ADMIN_MENU}
                                </td>
                                <td valign="center" align="left">  
                                <a href="{LINK_TGT}">{THUMB}<br /></a>      
                                </td>
                        </tr>
                </table>
        </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" class="thumbnails" align="center">&nbsp;</td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr>
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
 <!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

// HTML template for the thumbnail view when there is no picture to show
$template_no_img_to_display = <<<EOT

                <tr>
                <td class="tableb" height="200" align="center">
                        <font size="3"><b>{TEXT}</b></font>
                </td>
        </tr>
        </table>
<!-- BEGIN spacer -->
<!-- END spacer -->

EOT;

// HTML template for the image navigation bar
$template_img_navbar = <<<EOT
        <tr>
         <td align="right" valign="middle" width="50%">
                        <a href="{THUMB_TGT}">{THUMB_TITLE}</a> :: 
                </td>
                <td align="left" valign="middle">
                       <a href="{PREV_TGT}" title="{PREV_TITLE}">{PREV_TITLE}</a> :: 
                       <a href="{NEXT_TGT}" title="{NEXT_TITLE}">{NEXT_TITLE}</a>
                </td>
        </tr>

EOT;

// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;

function 
theme_html_picinfo(&$info)
{
    global 
$lang_picinfo$mime_content$CONFIG$CURRENT_PIC_DATA;
$path_to_pic $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
if ($mime_content['content']=='movie') {
$info[$lang_picinfo['download_URL']] = '<a href="' $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' '' '/') . $path_to_pic.'">'$lang_picinfo['movie_player'] .'</a>';
}

    
$html '';

    
$html .= "       <tr><td colspan=\"2\" class=\"tableh2_compact\"><b><!-- {$lang_picinfo['title']} --></b></td></tr>\n";
    
$template "        <tr><td align=\"center\" valign=\"top\">%s: %s</td></tr>\n";
    foreach (
$info as $key => $value$html .= sprintf($template$key$value);

    return 
$html;
}
?>
This won't fix your "missing" menu items though: as I said above: look at your other edits and temporarily disable plugins.

sean porter

Thanks you for the thoughts, and certainly for going through and tidying up my code.  Admittedly I don't know a thing, I just meddle out of necessity.  I'd be into knowing how some of these changes work, but I'll leave that out of this thread.  Anyway thanks again, I'll keep at it.

sean