Removing links from the main menu Removing links from the main 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 links from the main menu

Started by FatManc, January 28, 2005, 11:49:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FatManc

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

Nibbler

Comment out the html links, making sure you leave the existing comments in place.

FatManc

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

kegobeer

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 -->
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FatManc

Same error, I'm afraid  :(

Any ideas?

Thanks

John

kegobeer

Did you remove the function theme_display_album_list_cat from your theme's theme.php file?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FatManc

Nope, it's there...

This isn't a show stopper but I would like it to work :-)

kegobeer

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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FatManc

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

kegobeer

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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FatManc

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