|
Page 1 of 2
|
Inactive User
|
 [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Ok! There's a million of these things and most if not all have to be rewritten depending on where it's put and in what template set.
This is just one variation that needs some testing and feedback, and is currently only for the /default .
This is not the actual finished MOD because the .js really belongs in the header above the </head> wrapper. You can move it there if you wish, but it makes no difference at this stage and only removes a .css "Warning" in FF.
Anyone is welcome to try it at various locations in various themes, and modify the markup to suit each theme as they see fit etc.
But! PLEASE do post your variations in this thread, and eventually we can cover all styles in one place.
The javascript and <!-- Quick Login Mod * --> are clearly defined in the script below, if you are going to experiment, don't forget to move both of them.
Open: breadcrumbs_main.tpl
Replace all script with the code below.
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
}
return true;
}
</script>
{IMG_TBL}<div class="forumline nav-div">
<p class="nav-header">
<a href="{U_PORTAL}">{L_HOME}</a>{BREADCRUMBS_ADDRESS}
</p>
<div class="nav-links">
<div class="nav-links-left">
<!-- Quick Login Mod START -->
<div id="quicklogin" style="display:none; position:absolute; top:20px; border: 1px solid #0000FF; background-color: #f1f1f1;">
<!-- IF S_LOGGED_IN -->
<!-- ELSE -->
<form method="post" action="{S_LOGIN_ACTION}">
<table style="width:100%; height:28px;" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="forum-buttons" align="center" valign="middle"><span class="gensmall"> <strong>{L_LOGIN_LOGOUT}:</strong> </span><span class="gensmall"><strong>{L_USERNAME}:</strong>
<input class="post" type="text" name="username" size="10" /><br /> <strong>{L_PASSWORD}: </strong>
<input class="post" type="password" name="password" size="10" maxlength="32" /> {L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
<input type="submit" class="mainoption" name="login" value=" {L_LOGIN} " />
<br />
<a href="profile.php?mode=sendpassword">{L_SEND_PASSWORD}</a>
</span>
</td>
</tr>
</table>
</form>
<!-- ENDIF -->
</div>
<!-- IF S_LOGGED_IN -->
<!-- ELSE -->
<input type="text" name="none" style="cursor: pointer; text-align: center;" class="gensmall" onclick="return toggleMe('quicklogin')" value="Quick Login" />
<!-- ENDIF -->
<!-- Quick Login Mod END -->
<!-- IF S_BREADCRUMBS_LINKS_LEFT -->{BREADCRUMBS_LINKS_LEFT}<br /><!-- ENDIF -->{CURRENT_TIME}</div>
<!-- IF S_LOGGED_IN --><a href="{FULL_SITE_PATH}{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a> | <!-- ENDIF --><a href="{U_RECENT}" class="gensmall">{L_RECENT}</a> | <a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
<!-- IF S_BREADCRUMBS_LINKS_RIGHT --><br />{BREADCRUMBS_LINKS_RIGHT}<!-- ENDIF -->
</div>
</div>{IMG_TBR}
A pic with a couple of examples of what this MOD does.
And if someone says "I don't like it there" - I'm gonna' kill em! - Because trying to find a "home" for it without adding more clutter, ain't all that easy. And the whole thing disappears once you log in anyway.
Edited by Guest, Mon 17 Aug, 2009 04:58: Added Send Password |
#1 Sat 15 Aug, 2009 05:35 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
elpulgas 
Joined: June 2009
Posts: 106
Location:
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Nice Lopalong!
I was thinking of something similar for my site since the user block is too big.
I'll test it this days
Thank you.
____________ KnekZ
* html body {display:none;}
|
#2 Sat 15 Aug, 2009 13:28 |
|
Danielc 
Joined: August 2006
Posts: 248
Location:
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
elpulgas: It would be interesting if we replace the User Block with something like this yeah!!
|
#3 Sat 15 Aug, 2009 15:03 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Maybe we should try to convince MG to drop the login page, as phpBB is about the only forum software that I know of that uses a full page just to log in and have lost password requests etc.
@ Daniel - You just jumped in ahead of me when I was writing this; which is much of the same sort of thing.
|
#4 Sat 15 Aug, 2009 15:06 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Maybe we should try to convince MG to drop the login page, as phpBB is about the only forum software that I know of that uses a full page just to log in and have lost password requests etc.
I like the login page, and I prefer having a dedicated page instead of having unuseful markup on every page...
But I guess it's a personal taste.
A small note about your TOGGLE script... why you don't use default Icy Phoenix JavaScript for it?
There are several in ip_scripts.js you just need to choose one.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#5 Sat 15 Aug, 2009 21:29 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Hehehehe, what about a drop-down login page - Just kidding.
Re the .js - did think about it, may explore the option - but I have the nagging feeling that it may cause conflict with other internal functions using the same script.
Don't know - On the burner for something to look at.
|
#6 Sun 16 Aug, 2009 00:35 |
|
elpulgas 
Joined: June 2009
Posts: 106
Location:
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Well I was experimenting with it but then I thought it would be easier to use the same script used in the menu.
<div id="login_tab2">
The form here
</div>
<span class="logintablink" onclick="ShowHide('login_tab','login_tab2','login_tab');">
<a href="#" onclick="return false;" title="Login"><b>LogIn</b></a>
</span>
<div id="login_tab" class="js-sh-box">
<script type="text/javascript">
<!--
tmp = 'login_tab';
if(GetCookie(tmp) == '2')
{
ShowHide('login_tab', 'login_tab2', 'login_tab');
}
//-->
</script>
</div>
Here's what I did with it  :
But it still has a big issue. I don't know how to set it to be hidden by default
____________ KnekZ
* html body {display:none;}
|
#7 Sun 16 Aug, 2009 21:56 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
elpulgas wrote: [View Post] But it still has a big issue. I don't know how to set it to be hidden by default
Tricky! Isn't it?
For this one I have used some modified default Icy v1.2 script and opted to change the location:
Open: overall_header.tpl
Find:
<!-- INCLUDE overall_inc_body.tpl -->
Before Add:
<!-- IF S_LOGGED_IN -->
<!-- ELSE -->
<tr>
<th style="cursor:pointer;" align="left" onclick="ShowHide('qlogin2_links2');">
<img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="Quick Login" title="Quick Login" />
<a href="javascript:void(0);" title="Quick Login" style="vertical-align:top;text-decoration:none;"><b>Quick Login</b></a>
</th>
</tr>
<tr>
<td class="row5">
<div id="qlogin2_links2" style="display:none;position:relative;padding-top:0px;padding-bottom:0px;">
<table class="forumline-no2" width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td>
<form method="post" action="{S_LOGIN_ACTION}">
<table style="width:100%; height:28px;" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="forum-buttons" align="center" valign="middle"><span class="gensmall"> <strong> Quick {L_LOGIN_LOGOUT}:</strong> </span><span class="gensmall"><strong>{L_USERNAME}: </strong>
<input class="post" type="text" name="username" size="10" /> <strong>{L_PASSWORD}: </strong>
<input class="post" type="password" name="password" size="10" maxlength="32" /> {L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
<input type="submit" class="mainoption" name="login" value=" {L_LOGIN} " />
<br />
<a href="profile.php?mode=sendpassword">{L_SEND_PASSWORD}</a>
</span>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
<!-- ENDIF -->
Some Screen Shots.
Edited by Guest, Mon 17 Aug, 2009 01:32: Stripped out a couple of non-functional vars Edited by Guest, Mon 17 Aug, 2009 04:53: Added Send Password |
#8 Mon 17 Aug, 2009 00:27 |
|
elpulgas 
Joined: June 2009
Posts: 106
Location:
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Very tricky indeed. I still haven't managed to do it. Here's the full code I made based on yours:
<!-- IF S_LOGGED_IN -->
<div class="notabmargin"></div>
<!-- ELSE -->
<div class="logintab"><div class="login-bg-left"><div class="login-bg">
<div id="login_tab2" style="display:hidden;">
<form method="post" action="{S_LOGIN_ACTION}">
<div align="center" class="logintabtext">
{AVATAR_IMG}
<span class="gensmall">
<input type="hidden" name="redirect" value="{U_PORTAL}" />
{L_USERNAME}:
<input class="post" type="text" name="username" size="15" />
{L_PASSWORD}:
<input class="post" type="password" name="password" size="15" />
<!-- BEGIN switch_allow_autologin -->
<input class="text" type="checkbox" name="autologin" /><span class="gensmall"> {L_REMEMBER_ME}</span>
<!-- END switch_allow_autologin -->
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /><br />
<a href="{U_SEND_PASSWORD}">{L_SEND_PASSWORD}</a>
</span>
</div>
</form>
</div>
<span class="logintablink" onClick="ShowHide('login_tab2');">
<a href="#" onClick="return false;" title="Login">
<img src="{IMG_NAV_MENU_GROUP}" alt="LogIn" title="LogIn" style="vertical-align: top;" />
<b>LogIn</b></a>
</span>
</div></div></div>
<!-- ENDIF -->
The result is the same as with th eprevious code. And even worse, the reset password link doesn't work for unknown reasons.
____________ KnekZ
* html body {display:none;}
|
#9 Mon 17 Aug, 2009 03:22 |
|
gearhead 
Joined: May 2007
Posts: 274
Location:  U.S.A.
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
That's very cool....I'm hesitating from adding mods to the basic IP coding because during an upgrade, I always forget to keep those modded pages.....I'm keeping mine pretty much stock, but very cool idea, that was used in a few styles in the past.....
Nice work.
|
#10 Mon 17 Aug, 2009 04:12 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Change this:
<a href="{U_SEND_PASSWORD}">{L_SEND_PASSWORD}</a>
To This:
<a href="profile.php?mode=sendpassword">{L_SEND_PASSWORD}</a>
It looks pretty useful, so I'll add it to the other two scripts also.
|
#11 Mon 17 Aug, 2009 04:42 |
|
elpulgas 
Joined: June 2009
Posts: 106
Location:
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Change this:
<a href="{U_SEND_PASSWORD}">{L_SEND_PASSWORD}</a>
To This:
<a href="profile.php?mode=sendpassword">{L_SEND_PASSWORD}</a>
It looks pretty useful, so I'll add it to the other two scripts also. 
Well that's the simplest solution but don't you have any idea why it's not working?
____________ KnekZ
* html body {display:none;}
|
#12 Mon 17 Aug, 2009 05:10 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Quote: Well that's the simplest solution but don't you have any idea why it's not working?
I know why the other one didn't work. Not all VARS are global, and without editing or creating a new .php and .tpl file to <!-- INCLUDE the .tpl file in the location that one wants it, then one is better off patching it. It's easier, doesn't require core code changes and it usually works.
|
#13 Mon 17 Aug, 2009 05:16 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Lopa is right about Global Vars.
If you need that you can declare it in your style CFG file.
About keeping the menu open or close depends on where you put the code that checks cookie content.
For example in nav_quick_links.tpl:
<div id="main_links2" class="nav-menu">
...
</div>
<div id="main_links" class="js-sh-box">
<script type="text/javascript">
<!--
tmp = 'main_links';
if(GetCookie(tmp) == '2')
{
ShowHide('main_links', 'main_links2', 'main_links');
}
//-->
</script>
</div>
Make sure that code is after the content block...
<div id="main_links2" class="nav-menu">
...
</div>
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#14 Wed 19 Aug, 2009 11:33 |
|
Inactive User
|
 Re: [Beta IPv1.3.0.*] Quick Login Box (Drop-Down Style)
Mighty Gorgon wrote: [View Post] About keeping the menu open or close depends on where you put the code that checks cookie content.
I deliberately removed the cookie code because if one clicks the Quick Login, then refreshing the page keeps the Quick Login template / .js in view, rather than remove it.
Bit hard to explain, but I know what you mean. Or one of us does anyway!
|
#15 Wed 19 Aug, 2009 12:35 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|