Как сделать страницу авторизации(входа) в DLE
Сделать страницу авторизации в DataLife Engine очень быстро, смотрите сами. Страница авторизации (входа) будет доступна по адресу "сайт. рф/index. php? do=login".
В файле "engine/engine. php" найти:
switch ( $do ) <
Вставить ниже:
case 'login':
$tpl->load_template( 'login_page. tpl' );
$tpl->set( '', $PHP_SELF. "?do=register" );
$tpl->set( '', $PHP_SELF. "?do=lostpassword" );
$tpl->set( '', $PHP_SELF. "?action=logout" );
$tpl->set( '', $config['http_home_url']. $config['admin_path']. "?mod=main" );
$tpl->set( '', $member_id['name'] );
$tpl->set( '', $PHP_SELF. "?do=pm" );
$tpl->set( '', $member_id['pm_unread'] );
$tpl->set( '', $member_id['pm_all'] );
if ($member_id['favorites']) <
$tpl->set( '', count(explode("," ,$member_id['favorites'])) );
else $tpl->set( '', '0' );
if( $member_id['foto'] ) $tpl->set( '', $config['http_home_url']. "uploads/fotos/". $member_id['foto'] );
else $tpl->set( '', "{THEME>/images/noavatar. png" );
if ( $user_group[$member_id['user_group']]['allow_admin'] ) <
$tpl->set( '[admin-link]', "" );
$tpl->set( '[/admin-link]', "" );
> else <
$tpl->set_block( "'\\[admin-link\\](.*?)\\[/admin-link\\]'si", "" );
if ($config['allow_alt_url'] == "yes") <
$tpl->set( '', $config['http_home_url']. "user/". urlencode ( $member_id['name'] ). "/" );
$tpl->set( '', $config['http_home_url']. "statistics. html" );
$tpl->set( '', $config['http_home_url']. "addnews. html" );
$tpl->set( '', $config['http_home_url']. "favorites/" );
$tpl->set( '', $config['http_home_url']. "newposts/" );
> else <
$tpl->set( '', $PHP_SELF. "?subaction=userinfo&user=". urlencode ( $member_id['name'] ) );
$tpl->set( '', $PHP_SELF. "?do=stats" );
$tpl->set( '', $PHP_SELF. "?do=addnews" );
$tpl->set( '', $PHP_SELF. "?do=favorites" );