Login box at the top

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
rapt0r2
Registered User
Posts: 16
Joined: Wed Nov 19, 2008 6:02 pm

Login box at the top

Post by rapt0r2 »

I wanted to to have login box at the overall_header like in iamge 1, but I cant get it to work properlly .. when I am logging in from my forums index every thing works great but when I am viewing a topic and want to login nothing happens.. :eh:
And how to hide the login box when on login page? (Image 2) :)
P.S.- I used Ctrl+U in Firefox to view a pages source code that has such a login box and tried to apply the changes to my forum... the changes I did look like this-

Code: Select all

					<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
					<ul class="linklist leftside">
						<form method="post" action="{S_LOGIN_ACTION}" style="float:left;width:90%;overflow:visible;">
							<fieldset class="quick-login" style="float:left;white-space:nowrap;">
								<label for="username">{L_USERNAME}:</label>&nbsp;<input tabindex="100" type="text" name="username" id="username" size="10" class="inputbox" style="min-width:100px" title="{L_USERNAME}" />  
								<label for="password">{L_PASSWORD}:</label>&nbsp;<input tabindex="101" type="password" name="password" id="password" size="10" class="inputbox" style="min-width:100px" title="{L_PASSWORD}" />
					<!-- IF S_AUTOLOGIN_ENABLED -->
						<label for="autologin">{L_LOG_ME_IN} <input tabindex="102" type="checkbox" name="autologin" id="autologin" /></label>
					<!-- ENDIF -->
								<input tabindex="104" type="submit" name="login" value="{L_LOGIN}" class="button2" />
							</fieldset>
						</form>
					</ul>
					<!-- ENDIF -->
Image 1
Image

Image 2
Image
Last edited by rapt0r2 on Thu Feb 26, 2009 2:42 pm, edited 1 time in total.
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean

Re: Login box at the top

Post by Erik Frèrejean »

phpBB only supports the login box on the index page. You can however get around this by moving one line of code to a different file.
Open: index.php; Find:

Code: Select all

'S_LOGIN_ACTION'            => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), 
Copy and remove this line, now:
Open: includes/functions.php; Find:

Code: Select all

'T_STYLESHEET_NAME'        => $user->theme['theme_name'], 
On the next line past the copied line.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
rapt0r2
Registered User
Posts: 16
Joined: Wed Nov 19, 2008 6:02 pm

Re: Login box at the top

Post by rapt0r2 »

Thanks a lot Erik Frèrejean ;) Works perfect.. :D
And so remains only one little problem.. how to hide the top login box when you are in the login page.. just like this forum has- http://rmcgirr83.org/ucp.php?mode=login :?: :roll:

Ok it turns out to be a problem after I did the changes- I cant login to the ACP (!!!) I get redirected to the forums index.. :shock:
User avatar
RMcGirr83
Former Team Member
Posts: 22054
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Login box at the top

Post by RMcGirr83 »

rapt0r2 wrote:how to hide the top login box when you are in the login page.. just like this forum has- http://rmcgirr83.org/ucp.php?mode=login :?: :roll:
As I stated in the topic that you posted on my forum, that is from this mod

http://www.phpbb.com/community/viewtopic.php?t=602909
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
rapt0r2
Registered User
Posts: 16
Joined: Wed Nov 19, 2008 6:02 pm

Re: Login box at the top

Post by rapt0r2 »

Thank you.. I think everything now works fine.. :D ..exept that the bouth logins are displayed like in the image 2 (in my first post)... :!: any clue? how did you RMcGirr83 get it to work?
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean

Re: Login box at the top

Post by Erik Frèrejean »

Well the easiest way probably would be, by enclosing the html for your "top" login box with:

Code: Select all

<!-- IF not S_LOGIN_ACTION -->
[Login box code here]
<!-- ENDIF -->
I haven't tested this, so I'm not sure whether this creates a conflict somewhere. I think however that it doesn't :).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
RMcGirr83
Former Team Member
Posts: 22054
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Login box at the top

Post by RMcGirr83 »

Erik Frèrejean wrote:Well the easiest way probably would be, by enclosing the html for your "top" login box with:

Code: Select all

<!-- IF not S_LOGIN_ACTION -->
[Login box code here]
<!-- ENDIF -->
I haven't tested this, so I'm not sure whether this creates a conflict somewhere. I think however that it doesn't :).
That reminds me...currently with that mod if clicking on a forum link from a notification in an email and not automatically logged in, you get both "login bodies". That is you will get the usual login box (that redirects upon successful login to the topic) as well as the login box at the top of the forum.

So could a, eg, <!-- IF not S_LOGIN_ACTION and not S_REDIRECT -->, I know that's not correct btw I did say "eg", be used? Otherwise, you get two login boxes. Yes?

BTW, I know questions concerning a mod belong in the mods topic...more of a discussion purpose. ;)
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
rapt0r2
Registered User
Posts: 16
Joined: Wed Nov 19, 2008 6:02 pm

Re: Login box at the top

Post by rapt0r2 »

Erik Frèrejean wrote:Well the easiest way probably would be, by enclosing the html for your "top" login box with:

Code: Select all

<!-- IF not S_LOGIN_ACTION -->
[Login box code here]
<!-- ENDIF -->
I haven't tested this, so I'm not sure whether this creates a conflict somewhere. I think however that it doesn't :).
With this the login box is displayed everywhere you need it exept in the index page.. :cry: and I have already removed the login box at the bottom of the page in index_body.. :)
rapt0r2
Registered User
Posts: 16
Joined: Wed Nov 19, 2008 6:02 pm

Re: Login box at the top

Post by rapt0r2 »

anyone? :|

Return to “[3.0.x] Support Forum”