Completed Modification: Hiding Menu Buttons Prior to Login Completed Modification: Hiding Menu Buttons Prior to Login
 

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

Completed Modification: Hiding Menu Buttons Prior to Login

Started by EME, July 24, 2013, 03:55:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EME

As mentioned in a previous post, we are using Coppermine as a family history archive.  We decided to make a private site by using the username and password feature.  This way random Internet voyeurs can't wander in and make comments about a letter my great grandmother wrote.

We also decided to hide all of the menu buttons prior to login.  It seemed confusing from a user interface standpoint to have (for instance) an Album List button showing when you couldn't use it on the login screen.

The job was carried out by tying the SYS_MENU and SUB_MENU tokens to the sessions table in MySQL.  Since your user_id = 0 on the table until you log in (at which point it changes to a number greater than 0) it makes for a good dependency.  We made a second version of the token array and enclosed that and the original in an IF...ELSE statement.  While I understand the reasons for putting updates like this in themes, this one was executed on the core (themes.inc.php).  If we change themes in the future we will want the same configuration and this will save work. 

I have attached the rewrtitten section of themes.inc.php as a PDF.  As far as I know this is a clean modification.  But I'd be interested in any comments from the Coppermine development team.


ΑndrĂ©

Thank you for your contribution. Alternatively the Final extract plugin should do the same.