SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: ccbtimewiz on October 01, 2008, 11:50:09 AM

Title: User Info Block
Post by: ccbtimewiz on October 01, 2008, 11:50:09 AM
Currently the User Info Block logs in with a 60 minute expiration limit. Options to select session length (in inclusion with login forever) should be there.
Title: Re: User Info Block
Post by: H on October 01, 2008, 01:34:54 PM
Are we talking about the block that gives name, avatar, posts etc?

If so aren't these pulled (and perhaps cached by SMF) anyway so separate caching is unnecessary?
Title: Re: User Info Block
Post by: ccbtimewiz on October 01, 2008, 03:34:14 PM
Yes indeed. I just posted this in the bug reports so I can remember to fix it myself and to reduce any questions about it. :)
Title: Re: User Info Block
Post by: Nathaniel on October 01, 2008, 10:38:04 PM
Hmm, go for it. Its a template issue so you customizers can fix it. :P
Title: Re: User Info Block
Post by: [SiNaN] on November 10, 2008, 07:31:54 AM
It also needs username and password fields id attribute changed.
Title: Re: User Info Block
Post by: ccbtimewiz on November 10, 2008, 10:51:48 AM
Yeah I was going to mention that as well.

When browsing the site on IE6, whenever you "home in" on the login field, the browser takes you down to the login at the bottom (because the id is the same).

I'll post up the revisions of the block in a bit. :)
Title: Re: User Info Block
Post by: ccbtimewiz on November 10, 2008, 02:45:46 PM
Simple Portal Classic 2.0.5

Open SPortal1-1

Find:
Code: [Select]
echo '<div align="center">';

if ($context['user']['is_guest'])
echo '<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td align="right"><label for="user">', $txt[35], ':</label>&nbsp;</td>
<td><input type="text" id="user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" /></td>
</tr><tr>
<td align="right"><label for="passwrd">', $txt[36], ':</label>&nbsp;</td>
<td><input type="password" name="passwrd" id="passwrd" size="9" /></td>
</tr><tr>
<td><input type="hidden" name="cookielength" value="-1" /></td>
<td><input type="submit" value="', $txt[34], '" /></td>
</tr>
</table>
</form>', $txt['welcome_guest'];

Replace with:

Code: [Select]
echo '<div align="center">';

if ($context['user']['is_guest'])
echo '<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td align="right"><label for="user">', $txt[35], ':</label>&nbsp;</td>
<td><input type="text" id="sp_user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" /></td>
</tr><tr>
<td align="right">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
</tr><tr>
<td><input type="hidden" name="hash_passwrd" value="" /></td>
<td><input type="submit" value="', $txt[34], '" /></td>
</tr>
</table>
</form>', $txt['welcome_guest'];
Title: Re: User Info Block
Post by: Manu on November 10, 2008, 03:57:20 PM
Wouldn't it look in this way a bit better. I have insert the code to our portal.

Code: [Select]
echo '<div align="center">';

if ($context['user']['is_guest'])
echo '<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
<tr>
<td align="right"><label for="user">', $txt[35], ':</label>&nbsp;</td>
<td><input type="text" id="user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" /></td>
</tr><tr>
<td align="right"><label for="passwrd">', $txt[36], ':</label>&nbsp;</td>
<td><input type="password" name="passwrd" id="passwrd" size="9" /></td>
</tr><tr>
<td>&nbsp;</td>
<td><select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select></td>
</tr><tr>
<td>&nbsp;</td>
<td><input type="submit" value="', $txt[34], '" /></td>
</tr>
</table>
</form>', $txt['welcome_guest'];

Only a suggestion of me.  :nervous-happy:
Title: Re: User Info Block
Post by: [SiNaN] on November 22, 2008, 07:19:43 AM
Fixed.
SimplePortal 2.3.8 © 2008-2024, SimplePortal