Can I Hide the Login in Gallery?

tombob
tombob's picture

Joined: 2005-02-02
Posts: 25
Posted: Mon, 2005-02-07 17:00

Hi, I've entered "login" in the search and read a few posts regarding login but the more I read the more I wonder if these people are actually trying to do what I want to do... which is basically:

Hide the [login] from the gallery-1.4.4-pl4 interface and have it on a seperate page that only I as webnovice can access. I don't want users to have any admin access and it will be confusing for them to see it.

Can anyone please give me the appropriate code and where to put it etc ? (if that's what needs to be done?)

Thanks in advance (I hope...) :lol:

 
ChantelleJoy

Joined: 2005-02-06
Posts: 5
Posted: Mon, 2005-02-07 17:55

Yes this is possible!

For the main gallery page you will need to edit albums.php and remove:

Quote:
} else {
if (!$GALLERY_EMBEDDED_INSIDE) {
$adminCommands .= popup_link("[" . _("login") . "]", "login.php", false, true, 500, 500, 'admin');

if (!strcmp($gallery->app->selfReg, 'yes')) {
$adminCommands .= ' ';
$adminCommands .= popup_link('[' . _("register") . ']', 'register.php', false, true, 500, 500, 'admin');
}
}

to log into your gallery just go to www.yourwebsite.com/gallery/login.php and log in (once you press enter, your password will disspear, but nothing else will happen, don't worry, you ARE logged in!) then go back to your gallery page. All your admin controls including [logout] should be there, but they'll only appear when you're logged in.

Unfortnatly, I've customised my journal so much that I can't tell if this will then carry over to each page, or cause any errors on other pages.

Hope this helps.

 
tombob
tombob's picture

Joined: 2005-02-02
Posts: 25
Posted: Tue, 2005-02-08 08:52

ChantelleJoy,

Thanks for taking the time to let me know about this. I just tried it out. I deleted the script exactly as you have it above and saved.

Unfortunately when I went to access my gallery page (not the login.php) I get the following error message: Parse error: parse error, unexpected '<' in /home/....(my deletion for privacy).../public_html/gallery-1.4.4-pl4/gallery/albums.php on line 210 ...and no gallery!

You didn't get this when you deleted the above script in albums.php?

Can anyone out there assist with this please?

Best Wishes 8)

 
tombob
tombob's picture

Joined: 2005-02-02
Posts: 25
Posted: Wed, 2005-02-09 10:54

Okay ChantelleJoy (& anyone else interested in this),

I've managed to resolve this properly according to the following:

In albums.php: delete only the "[" "login" "]" from the above Quote.

Leave everything else exactly as it is (including " " as shown here). This will take the login off the main gallery page. If you want to take the login off subsidiary Album pages do the same thing in view_album.php

It's that simple! (I suggest you locate the login in a text editor using 'find' first so you know where to look in the files and also make a copy of the original files before you edit so you can get them back if something is done wrong)

Regarding the admin login after this has been removed follow what ChantellJoy says above...it works fine.

8)

 
vvans
vvans's picture

Joined: 2008-09-10
Posts: 1
Posted: Tue, 2008-09-30 14:36

Hi,

Can anyone instruct me on how to get rid of the word "Login" on all the gallery pages, yet keep all the admin features when a user logs in to the specific login url? I have searched high and low and when I find sometime (like above) it's 3 years old and the files aren't even named the same. The latest thing I tried was the multiroot plugin (module) and that doesn't work either. There must be something I am missing. PLEASE, I would like to know how to do this!!

V

as above, so below

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2008-10-23 18:33

VVans: It seems you are using G2. The hints here are for G1.

Jens
--
Gallery Developer