How to remove the register/login links? Please Help How to remove the register/login links? Please Help
 

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

How to remove the register/login links? Please Help

Started by Chesterchick, December 08, 2004, 01:49:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chesterchick

Hi all

I am desperately trying to find out how to remove the register and login links from coppermine. I will be using it inside a members area and subscribers will feel put off or misled if they have to register (or see the login/register) when they have already paid to enter my coppermine powered member's area.

Any help would be most appreciated.

Thanks in advance

Natalie

Hein Traag

I assume you only want the buttons to "dissapear".

Open your theme.php and find these blocks
<!-- BEGIN register -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END register -->
<!-- BEGIN login -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{LOGIN_TGT}">{LOGIN_LNK}</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END login -->
<!-- BEGIN logout -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END logout -->


Either remove them or use a lot of <!-- line -->  ;D

Chesterchick

Hi, thanks for that. At first it came up with an error. I then went to delete only the code inside each label. eg. I left the words 'begin register' and 'end register' but deleted the code in between. What I now have is:

<!-- BEGIN register -->
                       
<!-- END register -->
<!-- BEGIN login -->
                       
<!-- END login -->
<!-- BEGIN logout -->
                       
<!-- END logout -->


It works like this but there is a gap where the buttons were. But I think it will be fine.

Thanks again

Natalie

Casper

Yes, as you've discovered, the comments must be left in place for the theming to work.
You should be able to remove the gaps.
Post a screenshot of your menu as it is now, and all the code from the menus in your theme.php.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Hein Traag

Ah yes right. Gives an error indeed. Tried it at home and when you remove two more blocks of code it should dissapear.

Search for this
if (USER_ID) {
        template_extract_block($template_main_menu, 'login');
    } else {
        template_extract_block($template_main_menu, 'logout');


And this
if (USER_ID || !$CONFIG['allow_user_registration']) {
        template_extract_block($template_main_menu, 'register');
    }


Removing those and the blocks for the menu should solve it.

Casper

@ hein,

we always recommend commenting out, rather than deleting, as this makes re-instating much easier when things go wrong, and allows you to easily see what you have done.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Hein Traag

I admit the method is somewhat rough ;)

It's why i keep a backup of all original files. Commenting out is indeed a better option in this case. I merely posted my own method.

Anyway, both work  ;D CC can choose which one she wants to use.