Advanced search  

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]

Pages: [1]   Go Down

Author Topic: How to remove the register/login links? Please Help  (Read 3610 times)

0 Members and 1 Guest are viewing this topic.

Chesterchick

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
How to remove the register/login links? Please Help
« on: December 08, 2004, 01:49:38 pm »

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
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: How to remove the register/login links? Please Help
« Reply #1 on: December 08, 2004, 01:58:18 pm »

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

Open your theme.php and find these blocks
Code: [Select]
<!-- 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
Logged

Chesterchick

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: How to remove the register/login links? Please Help
« Reply #2 on: December 08, 2004, 03:02:31 pm »

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:

Code: [Select]
<!-- 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: How to remove the register/login links? Please Help
« Reply #3 on: December 08, 2004, 03:12:15 pm »

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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: How to remove the register/login links? Please Help
« Reply #4 on: December 09, 2004, 10:11:45 am »

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
Code: [Select]
if (USER_ID) {
        template_extract_block($template_main_menu, 'login');
    } else {
        template_extract_block($template_main_menu, 'logout');

And this
Code: [Select]
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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: How to remove the register/login links? Please Help
« Reply #5 on: December 09, 2004, 12:30:19 pm »

@ 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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: How to remove the register/login links? Please Help
« Reply #6 on: December 09, 2004, 01:02:18 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 19 queries.