signup.php
1)Найти
	PHP:
	
if( $user->user_exists )
{
  header("Location: user_home.php");
  exit();
}
 После вставляем
	PHP:
	
if ( $_GET['id'] && ( $oId->isAuth($oaSetting['apppass'], $oaSetting['appid']) || $vk->isAuth() ) ) {
    $oaId = ( $vk->isAuth() ) ? $vk->isAuth() : $oId->isAuth($oaSetting['apppass'], $oaSetting['appid']);
    $oAuth->id = $oaId;
    $smarty->assign('oaid', $oaId);
}
 2)Найти
	PHP:
	
  if($setting['setting_signup_randpass'] != 0)
  {
    $signup_password = "temporary";
    $signup_password2 = "temporary";
  }
 После вставляем
	PHP:
	
  if ($oaId) {
    $signup_password = $oAuth->generatePassword();
    $signup_password2 = $signup_password;
    $signup_email = md5($oaId) . '@openauth.tld';
  }
 3)Найти
	PHP:
	
   // UPDATE SIGNUP STATS
  update_stats("signups");
  // DISPLAY THANK YOU
  $step = 5;
 После вставляем
	PHP:
	
 
if ($oaId) {
    $oAuth->seAuth($oaId);
    header('location: /');
    exit();
}
 /templates/signup.tpl
1)Найти (6 раз кажется)
	HTML:
	<form action='signup.php' method='POST'>
 Заменить на 
	HTML:
	  {if isset($oaid)}
    {assign var = "getoaid" value = "?id=yes"}
  {/if}
  <form action='signup.php{$getoaid}' method='POST'>
 2)Найти
	HTML:
	<div class='signup_header'>{lang_print id=681}</div>
 После вставить 
3)Найти
	HTML:
	 {else}
    <input type='hidden' name='signup_password' value=''>
    <input type='hidden' name='signup_password2' value=''>
  {/if}
  </table>
 После вставить 
	HTML:
	  {else}
  <p>{lang_print id=148851048}</p>
  {/if}
 4)Найти
	HTML:
	<input type='hidden' name='email' value='{$new_user->user_info.user_email}'>
 Заменить на 
	HTML:
	    {if !$oaid}
        <input type='hidden' name='email' value='{$new_user->user_info.user_email}'>
    {/if}
 include/class_user.php
1) найти
	PHP:
	
setcookie("prev_email", $this->user_info['user_email'], time()+99999999, "/");
 заменить на 
	PHP:
	
      if (! preg_match('/^[a-z0-9]{32}\@openauth\.tld$/i', $this->user_info['user_email'])){
        setcookie("prev_email", $this->user_info['user_email'], time()+99999999, "/");
      }
 2) найти
	PHP:
	
     global $database, $setting;
 заменить на 
	PHP:
	
     global $database, $setting, $oAuth;
 2) найти
	PHP:
	
      if( !is_email_address($email) )
      $this->is_error = 698;
 заменить на 
	PHP:
	
      if( !is_email_address($email) || ( preg_match('/^[a-z0-9]{32}\@openauth\.tld$/i', $this->user_info['user_email']) && !isset($oAuth->id)))
      $this->is_error = 698;
 3) найти
	PHP:
	
global $database, $setting, $url, $actions, $field;
 заменить на 
	PHP:
	
global $database, $setting, $url, $actions, $field, $oAuth;
 4) найти
	PHP:
	
$signup_verified = !$setting['setting_signup_verify'];
 заменить на 
	PHP:
	
$signup_verified = (!isset($oAuth->id)) ? !$setting['setting_signup_verify'] : true;
 5) найти
	PHP:
	
$user_id = $database->database_insert_id();
 добавить после 
	PHP:
	
if(isset($oAuth->id)){
    $oAuth->addOpenAuth($user_id, $oAuth->id);
} 
 6) найти
	PHP:
	
if( $setting['setting_signup_randpass'] )
 заменить на 
	PHP:
	
if( $setting['setting_signup_randpass'] && !isset($oAuth->id))
 7) найти
	PHP:
	
if( $setting['setting_signup_verify'] )
 заменить на 
	PHP:
	
if( $setting['setting_signup_verify'] && !isset($oAuth->id))
 8) найти
	PHP:
	
if( $setting['setting_signup_welcome'] && !$setting['setting_signup_verify'] )
 заменить на 
	PHP:
	
if( $setting['setting_signup_welcome'] && !$setting['setting_signup_verify'] && !isset($oAuth->id))
 9)
	PHP:
	
global $database, $url, $global_plugins;
 заменить на 
	PHP:
	
global $database, $url, $global_plugins, $oAuth;
 10)найти
	PHP:
	
$database->database_query("DELETE FROM se_profilestyles WHERE profilestyle_user_id='{$this->user_info['user_id']}' LIMIT 1");
 добавить после
	PHP:
	
$oAuth->delOpenAuth($this->user_info['user_id']);
 admin/admin_viewusers.php
1)Найти
	PHP:
	
while($user_info = $database->database_fetch_assoc($users)) {
 добавит после
	PHP:
	
  $useroid = $database->database_query($database->database_fetch_assoc("SELECT open_id, type FROM se_openauth WHERE user_id = {$user_info[user_id]} LIMIT 1"));
  $user_info['open_id'] = $useroid['open_id'];
  $user_info['open_id_type'] = $useroid['type'];
 templates/admin_viewusers.tpl
1)Найти
	HTML:
	<td class='header' align='center'>{lang_print id=999}</td>
 добавит после
	HTML:
	<td class='header' align='center'>Openid/OpenApi</td>
 2)Найти
	HTML:
	<td class='item' align='center'>{if $users[user_loop].user_enabled == 1}{lang_print id=1000}{else}{lang_print id=1001}{/if}</td>
 добавит после
	HTML:
	<td class='item' align='center'>{if $users[user_loop].open_id}<img src='../images/icons/{if $users[user_loop].open_id_type == 1}vk{else}openauth{/if}.png' title = "{$users[user_loop].open_id}" />{/if}</td>
 
	HTML:
	Этот код выводит кнопки авторизации (вставьте в home.tpl):
<div class='header'>Автризация через другие сайты</div>
    <div class='portal_content'>
     <style type="text/css">
     {literal}#vk_login, .oauth {display:inline;cursor:pointer;}{/literal}
     </style>
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
     <script type="text/javascript">
     {literal}
     $(document).ready(function(){
            $("#livinternet").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").attr('value', 'liveinternet');
                $("#openauth #oalabel").html('Ваш логин в liveinternet');
            });
            $("#livejournal").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").attr('value', 'livejournal');
                $("#openauth #oalabel").html('Ваш логин в livejournal');
            });
            $("#mail_ru").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").attr('value', 'mail.ru');
                $("#openauth #oalabel").html('Ваша почта в mail.ru');
            });
            $("#flickr").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").attr('value', 'flickr');
                $("#openauth #oalabel").html('Ваш логин в flickr');
            });
            $("#rambler").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").attr('value', 'rambler');
                $("#openauth #oalabel").html('Ваш логин в rambler');
            });
            $("#openid").click(function(){
                $("#openauth").show();
                $("#openauth input[name='service']").remove();
                $("#openauth #oalabel").html('Ваш openid');
            });
      });
    {/literal}
     </script>
      <form action="openid.php" method="POST" >
        {$vkbutton}
        <input name="service" value="google" type="image" src="images/icons/google_16.png" border="0" />
        <input name="service" value="yandex" type="image" src="images/icons/yandex_16.png" border="0" />
        <input name="service" value="yahoo" type="image" src="images/icons/yahoo_16.png" border="0" />
            <img src="images/icons/li_16.png" class="oauth" id="livinternet" />
      <img src="images/icons/livejournal_16.png" class="oauth" id="livejournal" />
      <img src="images/icons/mail_16.png" class="oauth" id="mail_ru" />
      <img src="images/icons/flickr_16.png" class="oauth" id="flickr" />
      <img src="images/icons/rambler_16.png" class="oauth" id="rambler" />
      <img src="images/icons/openid_16.png" class="oauth" id="openid" />
	  </form>
      <div id="openauth" style="display:none;">
        <form action="openid.php" method="POST">
            <input type="hidden" name="service" value="">
            <p id="oalabel"></p><input type="text" name="openid" value="">
            <div style="padding-top: 10px;">
                <input type="submit" class="button" value="Отправить">
            </div>
        </form>
      </div>
    </div>
    <div class='portal_spacer'></div>
    <div class='portal_spacer'></div>