Help with login on a custom style

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
hermitking79
Registered User
Posts: 14
Joined: Fri Jun 17, 2016 7:12 pm

Help with login on a custom style

Post by hermitking79 »

Hi , been working on a custom style for a gaming community forum but have become stuck and am in need of some help/guidance to progress more ,im ok with the html and css side of things and have learnt from trial and error some basics in terms of moving certain elements of the board via the template files and creating new templates to achieve different things on the style but am currently stumped on the next change i would like to implement to the style ,image below for reference in what i am trying to do ( search bar and forum icons are from paybas's wow style if they look familiar :lol: )

Image

so what i would like to do is move the quick login from the bottom and have it replace the the standard "register/login" at the top right ,image below for reference

Image

i have found the quick login code in the template files and can easily place it in the top bar and restyle it when i need to but where i become stuck is removing the current register and login in the quick links section of code that shows only when logged out, i could remove it as a whole and just leave the quick login code there but that leaves me without the profile name,avatar and dropdown for profile etc and the quick links dropdown that i would like to keep while logged in ,any help to achieve this effect would be greatly appreciated as i dont think i can progress any further without it :( , image below showing what i want to do with the quick login

Image

*using latest revision of phpbb btw
Image Gallery of my FRAGZONE Style progress (layout subject to change) , login and social links are photo shopped in for reference to how it will look when complete , at a guess style is around 55% complete currently taking in to account new custom forum icons and smileys etc to made in photoshop

https://postimg.cc/gallery/kqG8wS5
User avatar
DTMWC
Registered User
Posts: 370
Joined: Tue Jan 16, 2018 6:17 am

Re: Help with login on a custom style

Post by DTMWC »

Your style looks so nice and clean as it is that personally I would remove the quick login all together and use the Quick Login extension which makes the login box work as a pop up instead,

Back to what you wanted,

If you look in the code that you have moved to the top, you should see the following 2 things,


This one is the logout button in the drop down quick links menu, I think from what you've said you want to keep this.

Code: Select all

						<li>
							<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
								<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
							</a>
						</li>

A bit further down is this, which is the login / register button,

Code: Select all

	<!-- ELSE IF not S_IS_BOT -->
		<li class="rightside"  data-skip-responsive="true">
			<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
				<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
			</a>
		</li>
		<!-- IF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
			<li class="rightside" data-skip-responsive="true">
				<a href="{U_REGISTER}" role="menuitem">
					<i class="icon fa-pencil-square-o  fa-fw" aria-hidden="true"></i><span>{L_REGISTER}</span>
				</a>
			</li>
		<!-- ENDIF -->
		[c]<!-- EVENT navbar_header_logged_out_content -->[/c]
	<!-- ENDIF -->
Removing this section gets rid of the 2 buttons, however you may want to leave this <!-- EVENT navbar_header_logged_out_content --> event there, as at some point you may need it or may want to place the event somewhere else etc,
“What you’re seeing and what you’re reading is not what’s happening” Donald Trump
User avatar
Mannix_
Registered User
Posts: 871
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Help with login on a custom style

Post by Mannix_ »

You can wrap the login/logout link in an if statement so it will only work when logged in.

find

Code: Select all

		<li class="rightside"  data-skip-responsive="true">
			<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
				<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
			</a>
		</li>
change to

Code: Select all

		<!-- IF S_USER_LOGGED_IN -->
		<li class="rightside"  data-skip-responsive="true">
			<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
				<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
			</a>
		</li>
		<!-- ENDIF -->
My concern is with something else. If you put the quick login in the navabar how would it look on smaller mobile screens?
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.2.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
hermitking79
Registered User
Posts: 14
Joined: Fri Jun 17, 2016 7:12 pm

Re: Help with login on a custom style

Post by hermitking79 »

Thanks for the answers guys really appreciate the help :D i must have scrolled past that about 20 times before posting here and didn't see it once lol , @Dan tyvm will have a look at that extension also :) , @Mannix thanks for the tip :) , i will be totally changing the long layout of the quick login to match the login on my photoshop design which i feel will scale well for mobile screens and blend more with my forum style ,maybe i can post back or pm when i get the style completed with a link and get some opinions on the mobile layout for the login :D
Image Gallery of my FRAGZONE Style progress (layout subject to change) , login and social links are photo shopped in for reference to how it will look when complete , at a guess style is around 55% complete currently taking in to account new custom forum icons and smileys etc to made in photoshop

https://postimg.cc/gallery/kqG8wS5
User avatar
Mannix_
Registered User
Posts: 871
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt
Contact:

Re: Help with login on a custom style

Post by Mannix_ »

It would be cool to see the final product and take it for spin :D
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Need help with styling or want me to port a style to 3.2.x etc. contact me here or here.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
PlanetStyles.net
Former Team Member
Posts: 4623
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Help with login on a custom style

Post by PlanetStyles.net »

Nice work on that forumlist :)
🚀 Premium phpBB StylesPremium phpBB 3.3 StylesphpBB sidebar Extension
Previously known as Christian 2.0
User avatar
hermitking79
Registered User
Posts: 14
Joined: Fri Jun 17, 2016 7:12 pm

Re: Help with login on a custom style

Post by hermitking79 »

Mannix_ wrote:
Mon Sep 07, 2020 6:11 am
It would be cool to see the final product and take it for spin :D
Probably going to be a couple of weeks yet until i have a live demo online as i'm time limited to when i can work on it ,but you can check visual progress when i upload to my gallery which is linked in my sig :)
PlanetStyles.net wrote:
Mon Sep 07, 2020 9:31 pm
Nice work on that forumlist :)
thank you :D
Image Gallery of my FRAGZONE Style progress (layout subject to change) , login and social links are photo shopped in for reference to how it will look when complete , at a guess style is around 55% complete currently taking in to account new custom forum icons and smileys etc to made in photoshop

https://postimg.cc/gallery/kqG8wS5
Post Reply

Return to “[3.2.x] Styles Support & Discussion”