[Solved]: Remove/hide full menu from displayimage.php [Solved]: Remove/hide full menu from displayimage.php
 

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

[Solved]: Remove/hide full menu from displayimage.php

Started by cimona, November 28, 2009, 08:37:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cimona

Hi, I need a bit of help with my template to remove the sys menu, sub menu and admin menu from displayimage.php
I use a modified oranje template on my second website simonamar.com and its been a while since I installed and modified the template for my first website so I feel a bit lost again.
I read several posts but no luck, I am sure I have seen a post before a few months ago for removing everything in the displayimage.php and just leave the image but I can't find it anymore so if you atleast point me in the right direction would be helpfull.
Should i edit theme.php or displayimage.php?
Any help or hints would be greatly appreciated.
Simona

phill104

Can you start by posting a link to your site as required by the board rules?

http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616

There are many reasons why we ask this but 80% of our users do not post a link or argue when we ask. I am sure you can understand how frustrating this is to have to ask everytime. In your case the link will allow us to see exactly what you are attempting to do. It may be a simple mod or there may be tables that need editing. Without a link we just cannot tell.

Sorry if that sounds long winded. I am not getting at you (well, just a bit), it is just that this evening I have had to ask for a link in 8 different threads. It wastes the time of both supporters and users. So to anybody else reading this, post a link or I will be forced to beat you to death with a wet kipper!
It is a mistake to think you can solve any major problems just with potatoes.

cimona

Hi, thank you for your reply, I did write my websites name simonamar.com but here is a full link :

http://www.simonamar.com/gallery/displayimage.php?album=lastup&cat=0&pos=0

As you can see I am trying to add above the image by using the MiniCMS plugin a html template but to show it better I will really need that menu removed and I didn't manage to find out how.


Joachim Müller


cimona

Quote from: Joachim Müller on November 29, 2009, 07:03:34 PM
Upgrade first!
Hi GauGau,
my initial inslallation was 1.4.25 but I installed like silly Stramms modpack 1.4.20 without checking. Thank you for pointing it out I would of not noticed it.
Now my gallery is 1.4.24.

Joachim Müller

To display the menu (or any other item) on all pages but one you add a simple if/then toggle into the section where the menu is created that checks what page you're on. The global variable $PHP_SELF should do what you need. Remember to change the scope of that variable to global within functions. If you have no idea what I'm talking about, zip your custom theme folder and attach the zip to your posting.

cimona

Quote from: Joachim Müller on December 01, 2009, 07:25:39 AM
To display the menu (or any other item) on all pages but one you add a simple if/then toggle into the section where the menu is created that checks what page you're on. The global variable $PHP_SELF should do what you need. Remember to change the scope of that variable to global within functions. If you have no idea what I'm talking about, zip your custom theme folder and attach the zip to your posting.
I have a tiny idea but I can't say I know how to do it myself,  because I really am what it says under my username but not only coppermine newbie, php newbie too.
I did look at the admin menu in theme.php also I believe the functions you are talking about are function theme_display_image and maybe function theme_display_film_strip because they are in the same page.. I can only go by guessing I don't know what I'm doing.
For that reason I attached the zip file for my theme, but please note that my theme is in early stage so there might be few mistakes there.
Thank you again for your time and support!

Joachim Müller

Quote from: cimona on December 01, 2009, 05:57:44 PM
php newbie too.
Then you should perform one step at a time. Looks like you're trying to accomplish too much in one step, as your theme is just a mash-up of pseudo-code that can't work and is just wishfull thinking.

Imo you should hone your HTML skills first: your site currently makes the W3C's HTML validator sort-off wave the white flag at you: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.simonamar.com%2Fgallery%2Fdisplayimage.php%3Falbum%3Dlastup%26cat%3D0%26pos%3D0 shows more than 500 validation errors. At least remove the linedefine('THEME_IS_XHTML10_TRANSITIONAL',1);from theme.php, as it looks really very silly to boast about the validity of your code if your template is quite the opposite of valid.

Anyway, back to your original question: to display an element on all pages but displayimage.php, use the codeif ($PHP_SELF == 'displayimage.php') {
   // do something if we're on displayimage.php (or do nothing at all)
} else {
   // Do something else on all other pages
}
As an example, take a look at your customized admin menu: replace// HTML template for gallery admin menu

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

EOT;
with// HTML template for gallery admin menu
if ($PHP_SELF == 'displayimage.php') {
   $template_gallery_admin_menu = <<<EOT
<!-- BEGIN admin_approval -->
<!-- END admin_approval -->
<!-- BEGIN log_ecards -->
<!-- END log_ecards -->
<!-- BEGIN documentation -->
<!-- END documentation -->
EOT;
} else {

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

EOT;
}
and you will see the admin menu on all pages but displayimage.php. However, what you're actually trying to accomplish is something else: you use a fixed-width template with a three-column layout to display content that is wider than the width you specify in your template. That's why you want to move the menu items not to show up when displaying your wide content. That's not a bright idea imo. Instead, I suggest you take a look at pre-existing stuff like the enlargeIt plugin.

Additionally, I can see in your left column that you appear to be trying to remove the "Powered by Coppermine" footer from where it currently resides at and move it into the left column: stop that, you're not allowed to do that license-wise!

cimona

Quote from: Joachim Müller on December 04, 2009, 10:16:11 AM
Then you should perform one step at a time.
define('THEME_IS_XHTML10_TRANSITIONAL',1);from theme.php,
Additionally, I can see in your left column that you appear to be trying to remove the "Powered by Coppermine" footer from where it currently resides at and move it into the left column: stop that, you're not allowed to do that license-wise!
Hi GauGau, thank you for your reply and for the support, I think it was too early to ask for any help when I had so many problems with my theme to start with.
I started to think my html skills were quite good :)  its a surprise to see my website still looks alright with 500 errors and no skills at all lol
My theme was originaly modified a few months ago for my first website and the theme.php was modified only with the help from different threads found in this forum.
The code define('THEME_IS_XHTML10_TRANSITIONAL',1); is in the oranje theme.php
I will take your advice and I think I will keep the menu atleast for now and check the enlargeIt plugin.
About removing "Powered by Coppermine" I am not sure what I did.. to make you think that I wanted to remove it but this really wasn't my intention.
Thank you again for checking my template and for the support.

Joachim Müller

Quote from: cimona on December 07, 2009, 01:36:53 AMmy website still looks alright
That is a matter of taste and not a matter of skills, so I'd rather not discuss this here.

Quote from: cimona on December 07, 2009, 01:36:53 AMI started to think my html skills were quite good :)
If you think that div containers before the <body>-tag are a good idea, then no: your HTML skills are not that good.

Quote from: cimona on December 07, 2009, 01:36:53 AMits a surprise to see my website still looks alright with 500 errors and no skills at all lol
The website defintely does not look the same on all operating systems / browsers / resolutions. Some elements will work, others won't. It's up to the browser to decide how to display your invalid markup. Subsequently, your website might look as desired on your PC, but trust me: it doesn't look that way for everyone else. But if your idea of webdesign is "do it my way or don't look at it at all", then fine. If I were you, I would have asked what to do to remedy that, but you're obviously self-confident enough not to care, so why should I?

Anyway, your initial question is sort-of resolved, so I'll mark this thread accordingly (although I would have prefered it if you would have played by board rules and done so for yourself).

Joachim