Previous Thread
Next Thread
Print Thread
Rate Thread
#203447 07/17/2005 6:47 PM
Joined: Mar 2001
Posts: 7,394
LK
Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Modification Name: Faster Login

Author(s): LK

Description: It shows the login form inside every page, when you click on "Login" instead of on a different page.

It's on a really early stage: no Wordlets, only supports sites with registration enabled, not the best eye candy...

Open ultimatebb.cgi.
Find:
Code
	my $clean_non = quotemeta($ULTIMATEBB); # Accelerator
Add below:
Code
	$in{refer} = $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} !~ m/login/;
Open public_common.pl.
Find:
Code
	$show_logout = qq~
<script language="Javascript" type="text/javascript">
<!--
Add below:
Code
var show = 0;
var fff;
function showlogin() {
if (show == 0) { fff = ''; show = 1; } else { fff = 'none'; show = 0; }
if (document.getElementById && document.getElementById('login') != null)
node = document.getElementById('login').style.display=fff;
else if (document.layers && document.layers['login'] != null)
document.layers['login'].display = fff;
else if (document.all)
document.all['login'].style.display = fff;
}
Find:
Code
	// User is not logged in
document.writeln('$vars_wordlets{not_logged_in}' , ' <a href="$ULTIMATEBB{"ubb=login"}">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$ULTIMATEBB{"ubb=agree"}">$vars_wordlets{register_link}</a>')
Replace with:
Code
	// User is not logged in
document.writeln('$vars_wordlets{not_logged_in}' , ' <a href="javascript:showlogin();">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$ULTIMATEBB{"ubb=agree"}">$vars_wordlets{register_link}</a>')
Find:
Code
&#187; $show_logout
</b>~;
Replace with:
Code
&#187; $show_logout
</b><div id="login" name="login" style="display: none">
<form action="$ULTIMATEBB{FORM}" method="post">
<table><tr><td align="left" valign="middle">
<input type="hidden" name="ubb" value="do_login" />
Username:</td><td align="left" valign="middle"><input type="text" name="username" value="" style="background-color: transparent; margins: 0px; font-family: Verdana, Helvetica, sans-serif; font-size: 10px;" /></td></tr>
<tr><td align="left" valign="middle">Password:</td><td align="left" valign="middle"><input type="password" name="password" value="" style="background-color: transparent; margins: 0px; font-family: Verdana, Helvetica, sans-serif; font-size: 10px;" /></td></tr>
<tr><td align="left" valign="middle">Remember me:</td><td align="left" valign="middle"><input type="checkbox" name="remember_me" value="1" checked="checked" style="background-color: transparent; margins: 0px; font-family: Verdana, Helvetica, sans-serif; font-size: 10px;" /></td></tr>
<tr><td align="center" colspan="2" valign="middle"><input type="submit" name="submit" value="Login" style="background-color: transparent; margins: 0px; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;" /></td></tr></table>
</form>
</div>~;

Sponsored Links
Joined: Mar 2004
Posts: 58
Member
Member
Offline
Joined: Mar 2004
Posts: 58
Kewl laugh

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
yes, appears so. I'll try it on my personal site smile


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)