Регистрируясь в uNet'e, приходится вводить очень много информации, много обязательных полей. Многим просто лень все это заполнять. В этом скрипте всего два обязательных поля — email и каптча.
Логин генерируется сам, если поле не заполнить, пароль, имя, фамилия… тоже. Если не указана дата рождения, выберется дата, указаная в скрипте. все это легко настраивается в скрипте.
Code
<span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> password: reg.Gen(10), </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //Если пасс не введен, генерируется </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> name: 'ucodesru' + reg.Gen(5), </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //Имя, если не введено (ucodesru + 5 случ. символов) </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> name_perm: 0, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //все могут видеть имя </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> surname: 'ucodesru' + reg.Gen(5), </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //Фамилия (ucodesru + 5 случ. символов) </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> surname_perm: 0, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //все могут видеть фамилию </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> nick: 'ucodesru' + reg.Gen(5), </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //ник, если не введен (ucodesru + 5 случ. символов) </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> by: '1980', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //год рожд., если не введен </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> bm: '9', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> // === месяц </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> bd: '13', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> // === день </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> birth_perm: 0, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //все видят дату рождения </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> gender: 1, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //мужик, если нет инфы о поле </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> location: '214020097', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //если нет инфы о месте проживания, живем в Киеве </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> photo: '', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //фото. нах надо, необязательно же </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> avatar: 'http://ucodes.ru/images/noava.png', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //наша аватарка </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> site: 'http://ucodes.ru/', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //дом. страница </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> terms: 1, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //подтверждаем условия </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> code: '', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> //тут будет каптча. дальше уже не трогаем </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> seckey: '', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> a: 51, </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> act: '', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> rnd: '', </span><span class="pun"><</span><span class="pln">BR</span><span class="tag">></span><span class="pln"> ssid: ''</span>
Также в скрипте предусмотрена проверка логина и email'a на не занятость и валидность! В правой верхней части окошка есть кнопка « + ». она открывает дополнительные поля. Пример скрипта тут.
Установка очень проста.
Это в css:
Code
<span class="com">/* === Регистрация unet (by ucodes.ru) === */</span><span class="pln"> </span><span class="pun"><</span><span class="pln">BR</span><span class="pun">></span><span class="pln"> </span><span class="pun">.</span><span class="pln">bf</span><span class="pun">{</span><span class="pln">text</span><span class="pun">-</span><span class="pln">align</span><span class="pun">:</span><span class="pln">left</span><span class="pun">;</span><span class="pln"> margin</span><span class="pun">-</span><span class="pln">bottom</span><span class="pun">:</span><span class="pln"> </span><span class="lit">1px</span><span class="pun">;</span><span class="pln"> margin</span><span class="pun">-</span><span class="pln">top</span><span class="pun">:</span><span class="pln"> </span><span class="lit">1px</span><span class="pun">;}</span><span class="pln"> </span><span class="pun"><</span><span class="pln">BR</span><span class="pun">></span><span class="pln"> </span><span class="pun">.</span><span class="pln">sf</span><span class="pun">{</span><span class="pln">clear</span><span class="pun">:</span><span class="pln">left</span><span class="pun">;</span><span class="kwd">float</span><span class="pun">:</span><span class="pln">left</span><span class="pun">;</span><span class="pln">width</span><span class="pun">:</span><span class="lit">105px</span><span class="pun">;}</span><span class="pln"> </span><span class="pun"><</span><span class="pln">BR</span><span class="pun">></span><span class="pln"> </span><span class="pun">.</span><span class="pln">bf input</span><span class="pun">[</span><span class="pln">type</span><span class="pun">=</span><span class="str">'text'</span><span class="pun">]</span><span class="pln"> </span><span class="pun">{</span><span class="pln">border</span><span class="pun">:</span><span class="pln"> </span><span class="lit">1px</span><span class="pln"> solid </span><span class="com">#b8b8b8; color: #696969; padding: 2px 4px; width: 155px;} <BR> .bf input[type='text']:focus {border: 1px solid #a6a6a6; color: #575757;} <BR> .bf input[type='button'] {padding: 2px 4px;} <BR> .bf img {display: none; border: none;} <BR> .xt-show{background-position:0 -240px;} <BR> .xt-show-over{background-position:-15px -240px;} <BR> .xt-hide{background-position:0 -255px;} <BR> .xt-hide-over{background-position:-15px -255px;} <BR> .rh {display: none;} <BR> #hideCont {display: none;} <BR> #capcode {width: 160px; height: 35px; text-align: center; color: grey; font-size: 14pt;} <BR> /* ======================================= */</span>
Вот это по месту:
Code
<span class="pun"><?</span><span class="pln">ifnot $USER_LOGGED_IN$</span><span class="pun">?></span><span class="tag"><script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"http://ucodes.ru/js/unetReg.js"</span><span class="tag">></script></span><span class="pln">
</span><span class="tag"><a</span><span class="pln"> </span><span class="atn">href</span><span class="pun">=</span><span class="atv">"javascript:reg.init();"</span><span class="tag">></span><span class="pln">Регистрация</span><span class="tag"></a></span><span class="pun"><?</span><span class="pln">endif</span><span class="pun">?></span>