Jump to content
TNG Community
Paul Barrett

Move Login & Profile Options on Top menu (Template 19)

Recommended Posts

Paul Barrett

The Logout and Profile options seem to interrupt the flow of the data related items.  Is there a way to move them please.  This is Template 19but I think the same may be true for other templates.

I looked through the mods but couldn't see anything relevant

 

Snag_1b7bde5f.png

Share this post


Link to post
Share on other sites
RickM

I have been thinking about this for some time, but have never got round to it.. I also don't use templates, however I will take a look at see what I can come up with..

This is a mockup of how the result could look..

Menu Change.jpg


Although I might like to swap the Logout and Edit Profile round as well.. This mockup does not take into account possible issues with hidden menu items, so is only conceptual..


If others have an idea how to achieve this, I would not mind creating the Mod to make the change.

Edited by RickM
Add a Mockup pic

Share this post


Link to post
Share on other sites
RickM

Going to be honest, I think this one is a bit over my programming abilities.. I can see what probably needs to change but do not know how to implement those changes.

Hopefully some one a hell of a lot smarter than me might take this up.. I would be happy to work with that person/persons testing etc..

Share this post


Link to post
Share on other sites
Philip Roy

I just had a quick play on my local install. As far as I can see, the file you need to adjust is the genlib.php file at the top level of the install.

So around line 598 you get...

if( empty($tngconfig['showlogin']) ) {
		if( $currentuser ) {
			if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" )
				$left_icons .= tng_smallIcon(array('url'=>getURL( "logout", 1 ) . "session=" . session_name(), 'label'=>$text['logout'] . $userparen, 'id'=>"log"));
		}
		else {
			if( !$cms['cloaklogin'] || $cms['cloaklogin'] == "both" ) {
				$login_url = getURL( "ajx_login", 1 );
				$left_icons .= tng_smallIcon(array('label'=>$text['login'], 'id'=>"log", 'onclick'=>"return openLogin('{$login_url}p=" . urlencode($cms['tngpath']) . "');"));
			}
		}
		$tngconfig['menucount']++;
	}
	$left_icons .= $profilelink;

And that needs to move down to be in the function tng_getRightIcons...and all references to left changed to right? It kinda worked with a quick play I had, but I'm sorry, I don't use that template and don't have time to get it working properly.

Maybe that might spur you on Rick?

Cheers, Phil

Share this post


Link to post
Share on other sites
RickM
3 minutes ago, Philip Roy said:

Maybe that might spur you on Rick?

Oh Geez, Thanks Phil..

I'll have a further fiddle and see what happens.. Might take some time yet.... <smile>

Share this post


Link to post
Share on other sites
Paul Barrett

New Zealand rocks!

Share this post


Link to post
Share on other sites
Philip Roy

It literally does...but we call that an earthquake 😉

Share this post


Link to post
Share on other sites
RickM
11 hours ago, Philip Roy said:

It literally does...but we call that an earthquake 😉

Thats 'Shake, Rattle & Roll' .... 🤣

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×