Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Mike_B - kesäkuu 28, 2006, 09:44:37 AP

Otsikko: How to Hide "Length of Session" Box?
Kirjoitti: Mike_B - kesäkuu 28, 2006, 09:44:37 AP
Hi

Is there a simple way to do the above on the default theme?

What I want to do is have every user login forever (which is what they did in my old forum which I have ported from phpBB to SMF (and SMF is much better  ;) )).

So visually they would just have a name and password box (and no session length which would return automatically the forever value).

I did find an old post on this where someone raised the question and was told off for wanting to do it lol... Well each to his own I guess but I ain't trying to commit murder here lol just a minor mod  :P

cheers

Mike
Otsikko: Re: How to Hide "Length of Session" Box?
Kirjoitti: bloc - kesäkuu 28, 2006, 12:24:20 IP
If you look at the html code you'll see that on index.template a <select> is used for the sessionlength. If you rather replace that with a hidden form tag with the value you want, it should work. Like:
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>

to:


<input name="cookielength" value="-1" type="hidden">


Otsikko: Re: How to Hide "Length of Session" Box?
Kirjoitti: Mike_B - kesäkuu 28, 2006, 05:02:35 IP
Hey thanks dude - thats a real neat and simple change - works like a treat  :)

One less piece of clutter on the screen  8)