coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: FatManc on January 28, 2005, 11:49:20 AM

Title: Removing links from the main menu
Post by: FatManc on January 28, 2005, 11:49:20 AM
Hi all,

I'm running Coppermine 1.2.1 and would like to remove a few of the links off the main user menu (ie Comments, Top Rated, etc).

I tried just removing the HTML links in the theme.php file but I got an error message (something to do with an function or module not existing in index.php) as soon as I saved it.

Can someone help me please? Sorry if the message is a bit vague but I'm can't reproduce the error during work time  ;)

Thanks in advance

John
Title: Re: Removing links from the main menu
Post by: Nibbler on January 28, 2005, 02:30:42 PM
Comment out the html links, making sure you leave the existing comments in place.
Title: Re: Removing links from the main menu
Post by: FatManc on January 28, 2005, 10:53:02 PM
I tried that but i get the following error message

Fatal error: Call to undefined function: theme_display_album_list_cat() in /home/virtual/site35/fst/var/www/html/gallery/index.php on line 493

I commented out the following in theme.php

                       // <br />

                       <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::

                       //<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::

                       <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::

                       <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::

                       //<a href="{FAV_TGT}">{FAV_LNK}</a> ::

                       <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

Any ideas why I'm getting this error? I'd really like to remove the items commented out.

Thanks again

John
Title: Re: Removing links from the main menu
Post by: kegobeer on January 29, 2005, 02:19:20 AM
Wrong type of commenting.  Everything within <<EOT and EOT; is treated as HTML and not PHP.  You would use <!-- and --> to comment out those lines.

<!-- I don't want this to show up -->
Title: Re: Removing links from the main menu
Post by: FatManc on January 30, 2005, 05:47:07 PM
Same error, I'm afraid  :(

Any ideas?

Thanks

John
Title: Re: Removing links from the main menu
Post by: kegobeer on January 30, 2005, 05:54:26 PM
Did you remove the function theme_display_album_list_cat from your theme's theme.php file?
Title: Re: Removing links from the main menu
Post by: FatManc on January 30, 2005, 11:04:41 PM
Nope, it's there...

This isn't a show stopper but I would like it to work :-)
Title: Re: Removing links from the main menu
Post by: kegobeer on January 30, 2005, 11:45:35 PM
Post a link to your site so we can see this, and post your modified theme.php file (you'll have to attach it as a text file).  There is definitely a problem with your theme file if the function isn't being found.
Title: Re: Removing links from the main menu
Post by: FatManc on January 31, 2005, 09:51:23 AM
Hi again

The website is http://www.coastercentral.com/gallery

It's working at the moment because i'm using the default theme.php file.

I've attached the modded theme.php file as requested

Thanks

John
Title: Re: Removing links from the main menu
Post by: kegobeer on January 31, 2005, 12:36:47 PM
If all you did was comment out those lines, try replacing
                        <!-- <br /> -->
                        <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <!-- <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> :: -->
                        <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::
                        <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::
                        <!-- <a href="{FAV_TGT}">{FAV_LNK}</a> :: -->
                        <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

with
                        <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{TOPN_TGT}">{TOPN_LNK}</a> ::
                        <a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a> ::
                        <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>


There also appears to be a blank line after the closing ?>.  Delete that line.
Title: Re: Removing links from the main menu
Post by: FatManc on January 31, 2005, 09:08:15 PM
Hi again

I did what you said and it all works fine now! I'm not sure why what you told me to do made it work but thanks very much for your help and perseverance!

Best wishes

John