I've looked everywhere for this option to remove it. I don't like this feature and would like to remove it. I want my users to be log in and remain logged in until they choose to log out. I don't want them to have to specify a time to stay logged in. There's got to be an option I've overlooked to make this log in field disappear! Will someone please help me? I've gone cross-eyed trying to figure it out.
Sincerely,
jdev
You can do a simple code edit to remove the input option and set the session length to Forever. IIRC, it's in Register.template.php - would have to look for it. Which version are you running?
I'm running 1.1.14, I believe. Whichever one is available from GoDaddy. Sorry just now seeing your reply, I forgot to hit "notify". What you said in your response was Greek to me. I know nothing of php, code, nothing.
Attach your Register.template.php.
Thank you so much for your help, but I don't even know what that is or where to find it. I was just hoping there was a check box somewhere I could check to make that go away. I don't want to go to any trouble (or you to any trouble) doing this. I really and truly appreciate your offer to help! :)
AFAIK, you can't remove the option without doing a code edit in Register.template.php. You can go to Admin -> Server Settings -> Feature Configuration and set Default login cookies length (in minutes) to a high number, which will keep your users logged in, but won't eliminate the option.
Okay, Krash, I found the template. What do I change?? This blind squirrel just found his nut! LOL
Speaking of blind squirrels (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Frolleyes.gif&hash=ca10c185942636e0afc5cc09d07dded9f2b57aed), the correct file is Login.template.php.
Find this:
// Now just get the basic information - username, password, etc.
echo '
</tr><tr class="windowbg">
<td width="50%" align="right"><b>', $txt[35], ':</b></td>
<td><input type="text" name="user" size="20" value="', $context['default_username'], '" /></td>
</tr><tr class="windowbg">
<td align="right"><b>', $txt[36], ':</b></td>
<td><input type="password" name="passwrd" value="', $context['default_password'], '" size="20" /></td>
</tr><tr class="windowbg">
<td align="right"><b>', $txt[497], ':</b></td>
<td><input type="text" name="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '"', $context['never_expire'] ? ' disabled="disabled"' : '', ' /></td>
</tr><tr class="windowbg">
<td align="right"><b>', $txt[508], ':</b></td>
<td><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked="checked"' : '', ' class="check" onclick="this.form.cookielength.disabled = this.checked;" /></td>
</tr><tr class="windowbg">';
// If they have deleted their account, give them a chance to change their mind.
if (isset($context['login_show_undelete']))
echo '
<td align="right"><b style="color: red;">', $txt['undelete_account'], ':</b></td>
<td><input type="checkbox" name="undelete" class="check" /></td>
</tr><tr class="windowbg">';
echo '
<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;" /></td>
</tr><tr class="windowbg">
<td align="center" colspan="2" class="smalltext"><a href="', $scripturl, '?action=reminder">', $txt[315], '</a><br /><br /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
Change to this:
// Now just get the basic information - username, password, etc.
/// Remove session length options - set 'cookielength' to '-1' in hidden input to login Forever
echo '
</tr><tr class="windowbg">
<td style="padding-top:20px;" width="40%" align="right"><b>', $txt[35], ':</b></td>
<td style="padding-top:20px;"><input type="text" name="user" size="20" value="', $context['default_username'], '" /></td>
</tr><tr class="windowbg">
<td align="right"><b>', $txt[36], ':</b></td>
<td><input type="password" name="passwrd" value="', $context['default_password'], '" size="20" /></td>
</tr>
<tr class="windowbg">';
// If they have deleted their account, give them a chance to change their mind.
if (isset($context['login_show_undelete']))
echo '
<td align="right"><b style="color: red;">', $txt['undelete_account'], ':</b></td>
<td><input type="checkbox" name="undelete" class="check" /></td>
</tr><tr class="windowbg">';
echo '
<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;" /></td>
</tr><tr class="windowbg">
<td align="center" colspan="2" class="smalltext"><a href="', $scripturl, '?action=reminder">', $txt[315], '</a><br /><br /></td>
</tr>
</table>
<input type="hidden" name="cookielength" value="-1" />
<input type="hidden" name="hash_passwrd" value="" />
</form>';
This is from 1.1.13, but should be the same in .14. It eliminates both session length prompts, sets the session length to forever, and reformats the login window.
Make a backup before you change it.
Thanks so much. It shouldn't interfere with my captcha or logic tests should it?
No, it has no effect on anything but the login session length.
Okay, dang, I'm in godaddy in the files and can't find the page you said to find. So much for my nut.
Best I can find is LogInOut.php in the Sources folder.
Login.template.php is in /Themes/default/, same directory where you found Register.template.php.
I actually didn't find it, I was just being hopeful.
"Those who live in hope, die in despair."
Your quote is poppycock. Poppycock, I say.
Krash, I've looked in all my files at godaddy. Also in all the files in the actual admin section of the forum. I can't find it.
LogInOut.php is indeed in the Sources folder, so go up a folder, find Themes and then default. Do you see a Login.template.php file?
All I see is LoginOut.php in godaddy. In my forum there is nothing like that.
Can you define the interface of godaddy? The file you are referencing is in the Sources folder of SMF. If you went up one level (which would be the root of wherever you have SMF installed), you should see a Themes folders and in there a default folder where the Login.template.php file should be. Could you possibly provide a screen shot of what you're looking at?
Do you have an FTP client? GoDaddy's website is a nightmare, but you can access your account directly via FTP.
Found it. Had no idea I needed to go that deeply. :)
Implemented Krash's change, tested, and it works. Thanks to both of you!
That's great :) Marking this solved then.