Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Custom Login Page
Trasion
Join Date: Sep 2009
Posts: 178

New York
by Trasion Trasion is offline 06 Sep 2009
Rating: (1 vote - 4.00 average)

I personally hate seeing that ugly login box at the top of the screen in the navbar template. I came up with this quick and easy fix, have a separate page for it.

If you'd like a custom login page, and simply have to link to it in your navbar, then follow the quick steps below.

Step 1) Create a new .php file called clogin.php (it must be named this, do not change the name), and upload it to your forum root directory.

Step 2) Put the below code in your new clogin.php file:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 3) Open up all styles you're using (one at a time) in the administration control panel, and create a new template called "clogin" (without the quotation marks) - once again, it must be named this, do not change the name.

Step 4) Insert the following code into your "clogin" (without the quotation marks):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will make it so that if any registered member tries to access this page, it will redirect them to your forum index, and if they're a guest, they get to see the login script, and can login.

You must change all of the "SITENAME" text in your new template to your actual site name.

Please post here if you need assistance, please.

Credits to Gary King! (http://www.vbulletin.org/forum/showthread.php?t=62164)
Views: 23718
Reply With Quote
Comments
  #2  
Old 07 Oct 2009, 18:58
inder123 inder123 is offline
 
Join Date: Jan 2008
installed but not works
Reply With Quote
  #3  
Old 07 Oct 2009, 21:25
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Real name: Chris
It works but Trasion left out a step. I think what his intent was to add a Login link to the navbar linked to your page: yoursite.com/forums/clogin.php

Nice work Trasion!

--------------- Added 07 Oct 2009 at 21:37 ---------------

It looks like this works when added to the navbar:

$template_hook[navbar_buttons_right]
<td class="vbmenu_control">
<a href="clogin.php?">Log In</a></td>

--------------- Added 07 Oct 2009 at 22:01 ---------------

Then you need to delete the old login form from the navbar template.

Last edited by Front Range 4x4; 07 Oct 2009 at 22:01. Reason: Auto-Merged DoublePost
Reply With Quote
  #4  
Old 10 Oct 2009, 13:41
Trasion's Avatar
Trasion Trasion is offline
 
Join Date: Sep 2009
Real name: Mike
Yes, you must add that too. Sorry.

After you go to that page, it should work!
Reply With Quote
  #5  
Old 12 Oct 2009, 02:18
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Real name: Chris
It should and it does. After testing I have added it to my board. This allows for a larger site logo without pushing things around for users with small screens.
Attached Images
File Type: jpg screenshot_01.jpg (37.4 KB, 456 views)
Reply With Quote
  #6  
Old 18 Oct 2009, 13:43
James Birkett James Birkett is offline
 
Join Date: Jun 2009
You might want to add a condition to remove the Log In button if the user is logged in and replace it with Log Out.
Reply With Quote
  #7  
Old 18 Oct 2009, 16:30
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Real name: Chris
Meh. My users know which one to click.
Reply With Quote
  #8  
Old 18 Oct 2009, 18:39
Trasion's Avatar
Trasion Trasion is offline
 
Join Date: Sep 2009
Real name: Mike

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #9  
Old 05 Nov 2009, 17:31
dacho's Avatar
dacho dacho is offline
 
Join Date: Dec 2004
Real name: David
I do that
but if i want to stay in the some page "clogin.php" without to go after login (or if I'm conected) to index.php
just a pape for login and say HELLO
Reply With Quote
  #10  
Old 11 Nov 2009, 18:38
abstroose abstroose is offline
 
Join Date: Nov 2008
Thanks a lot! I've spent an hour hunting for a mod so I can put a login link on my blog, but this works perfectly.
Reply With Quote
  #11  
Old 13 May 2010, 14:21
KaneR KaneR is offline
 
Join Date: Apr 2010
Will this work with VB4?
Reply With Quote
  #12  
Old 30 May 2010, 11:29
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Real name: Corey
Really nice article dude lol. I modified it to fix my needs Also working on a vB4 one, don't mind if i post it?
Reply With Quote
  #13  
Old 20 Apr 2011, 16:46
joybonham joybonham is offline
 
Join Date: Apr 2011
This code does not work in release 4. The fetch_template functions no longer work. They must be replaced with object model. See this article for details.

http://www.vbulletin.org/forum/showthread.php?t=228078

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('clogin') . '");');
Reply With Quote
  #14  
Old 19 Jun 2012, 13:32
6impy 6impy is offline
 
Join Date: Nov 2001
I believe this just broke with the recent security update.

I'm trying to figure out why right now.
Reply With Quote
  #15  
Old 25 Jan 2013, 13:09
ShiNicHi23 ShiNicHi23 is offline
 
Join Date: Jan 2013
is there any guide to custom login page in vbulletin 4?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:55.

Layout Options | Width: Wide Color: