Rob Severijns Posted January 18, 2024 Report Share Posted January 18, 2024 My homepage (index.php) contains information about living people and therefor every sitevisitor is automaticly redirected to the loginpage (login.php) I made some changes to the loginpage in order to share some extra info for non-logged in visitors. Since the loginpage already contains a Login button on the page itself, I was wondering if there is a way to remove the login button on the navigationbar. I have two reasons for this: 1 - There is no need to have two login buttons on the same page 2 - The changes I made to the loginpage don't fit in the popup that shows when the Login button is clicked on the to navigation bar (See image) I'm using template 260 by GWT but is has the same top navigation bar as in template 19 & 21 The intention is that after a visitor is logged in, the Logout button on the top navigation bar is visible so visitors can actualy logout. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 18, 2024 Report Share Posted January 18, 2024 Rob, Could you post a snippet of where there are 2 login links on those templates? I looked at T19, but don't see what you are asking. You don't want the 'login' link in the top menu, but want the logout there when logged out, which is confusing to me. Ron Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted January 19, 2024 Author Report Share Posted January 19, 2024 Hi Ron, Thx for replying. If you go to my website The Severijns / Timmer Family you will notice you are automaticly redirected to the login.php. You will find a login button (Aanmelden) on the top navigation bar and a login button at the bottom of the page. Clicking the top login button opens a popup that doesn't fit the dimensions of the login page. That's basicly why I don't want to see the login button in the top navigation bar when a visitor isn't logged in. In such a case the visitor can only use the login button on the bottom of the page and no popup will appear. After login, the login button in the top navigation bar will turn into a logout button. This is normal behaviour and should be kept that way. So not logged in = No login button in top navigation bar and after login via the login button on the bottom of the page the logout button is visible in the top navigation bar. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted January 19, 2024 Author Report Share Posted January 19, 2024 Made a small change so now the login page opens in English Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted January 19, 2024 Report Share Posted January 19, 2024 Template 19 doesn't doesn't take visitors to the login screen, so no multiples in my testing. But you could try these changes in genlib.php: Find this line: roughly line 684 or so, depending on other mods installed touching genlib.php. $left_icons .= tng_smallIcon(array('label'=>$text['login'], 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');")); Change to: $nolog = ""; $left_icons .= tng_smallIcon(array('label'=>$nolog, 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');")); Which essentially removes the login label from the navigation menu. If one logs in, the logout should appear, but if you logout, the login disappears. Didn't do much testing, and as I said, I couldn't see the multiple logins. Ron Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted January 19, 2024 Author Report Share Posted January 19, 2024 Thx Ron, Will give it a try. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted January 19, 2024 Author Report Share Posted January 19, 2024 Unfortunatly I get an error 500 after applying your changes. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted January 19, 2024 Author Report Share Posted January 19, 2024 (edited) Found the solution based on your advice. I commented out the line: // $left_icons .= tng_smallIcon(array('label'=>$text['login'], 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');")); and now the login button is gone. Logout button appears after login Thx Ron Edited January 19, 2024 by Rob Severijns Thanking Ron Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.