[BETA] Logged In control on acp [1.0.0]

Neue Projekte (requests) und Beta Mods

Moderator: Supporter

[BETA] Logged In control on acp [1.0.0]

Beitragvon yakusha » 12. Jun 2006 13:46

Code: Alles auswählen
####################################################################
## MOD Title            : Logged In control on acp
## MOD Author           : yakusha < yakusha@tnn.net > (sabri ünal) < http://www.canver.net >
## MOD Version          : Beta 1.0.0
## MOD Description      : Yazar notlarına bakınız.
####################################################################################
## Installation Level   : easy
## Installation Time    : 5 minutes
## Files To Edit        : (6)
## - profile.php
## - memberlist.php
## - viewonline.php
## - templates/subSilver/admin/board_config_body.tpl
## - admin/admin_board.php
## - language/lang_turkish/lang_admin.php
## Included Files       : n/a
####################################################################################
##
## Destek ve Yardım : http://www.canver.net
## Telif Hakkı      : Copyleft © - canver|net, canver|soft - www.canversoft.com
## Lisans           : GNU Public License v2 http://opensource.org/licenses/gpl-license.php
##
######################################################################################
## Güvenlik Uyarısı:
##
##   Modun son sürümü için lütfen http://www.canver.net adresini kontrol ediniz.
##   Modun stabil sürümü için lütfen http://www.phpbb.com adresini kontrol ediniz.
##   Modu başka siteden indirdiyseniz, içinde art niyetli kod olmadığını garanti edemeyiz.
##   Modu eklemeden önce, güvenlik kopyası amacıyla lütfen dosyalarınızın yedeğini alınız.
##
#####################################################################################
## Author Notes:
## This will add a checkbox option to the ACP allowing you to require users
## to log in before this pages.
## this pages : profil görüntüleme, üye listesi, kimler online
## Yazar Notları:
##
## İlgili sayfaları misafirlerin görüp göremeyeceğini yönetim paneli ayarlarıyla kontrol etmeye yarar.
## İlgili sayfalar : profil görüntüleme, üye listesi, kimler online
#####################################################################################
## Faydalanılan modlar:
## MOD Title: Profile Only For Logged In
## MOD Author: ymDevelopment < development@youngmommies.com > (Paul) http://www.youngmommies.com/ymboards
## MOD Version: 1.0.3
#####################################################################################
## Mod Geçmişi:
##
##   12-06-2006 - Version Beta 1.0.0
##      - çalışır ilk sürüm
##
####################################################################################
#
#-----[ SQL ]------------------------------------------
#

INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_profile',1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_memberlist',1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_whoisonline',1);


#
#-----[ OPEN ]------------------------------------------
#

profile.php

#
#-----[ FIND ]------------------------------------------
#

      include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
      exit;
   }

#
#-----[ BEFORE, ADD ]------------------------------------------
#

      //---[+]--- Logged In control on acp --------
      if ( !$userdata['session_logged_in'] && $board_config['allow_login_for_profile'])
      {
         redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&" . POST_USERS_URL . '=' . $HTTP_GET_VARS[POST_USERS_URL], true));
      }
      //---[-]--- Logged In control on acp --------

#
#-----[ OPEN ]------------------------------------------
#

memberlist.php

#
#-----[ FIND ]------------------------------------------
#

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#

//---[+]--- Logged In control on acp --------
if ( !$userdata['session_logged_in'] && $board_config['allow_login_for_memberlist'])
{
   redirect(append_sid("login.$phpEx?redirect=memberlist.$phpEx", true));
}
//---[-]--- Logged In control on acp --------

#
#-----[ OPEN ]------------------------------------------
#

viewonline.php

#
#-----[ FIND ]------------------------------------------
#

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWONLINE);
init_userprefs($userdata);
//
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#

//---[+]--- Logged In control on acp --------
if ( !$userdata['session_logged_in'] && $board_config['allow_login_for_whoisonline'])
{
   redirect(append_sid("login.$phpEx?redirect=viewonline.$phpEx", true));
}
//---[-]--- Logged In control on acp --------

#
#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#

   <tr>
     <th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
   </tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

   <tr>
      <td class="row1">{L_LOGIN_FOR_PROFILE}</td>
      <td class="row2"><input type="radio" name="allow_login_for_profile" value="1" {LOGIN_FOR_PROFILE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_login_for_profile" value="0" {LOGIN_FOR_PROFILE_NO} /> {L_NO}</td>
   </tr>
   <tr>
      <td class="row1">{L_LOGIN_FOR_MEMBERLIST}</td>
      <td class="row2"><input type="radio" name="allow_login_for_memberlist" value="1" {LOGIN_FOR_MEMBERLIST_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_login_for_memberlist" value="0" {LOGIN_FOR_MEMBERLIST_NO} /> {L_NO}</td>
   </tr>
   <tr>
      <td class="row1">{L_LOGIN_FOR_WHOISONLINE}</td>
      <td class="row2"><input type="radio" name="allow_login_for_whoisonline" value="1" {LOGIN_FOR_WHOISONLINE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_login_for_whoisonline" value="0" {LOGIN_FOR_WHOISONLINE_NO} /> {L_NO}</td>
   </tr>

#
#-----[ OPEN ]------------------------------------------
#

admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#

$namechange_yes = ( $new['allow_namechange'] ) ? "checked=\"checked\"" : "";
$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#

$login_for_profile_yes = ( $new['allow_login_for_profile'] ) ? "checked=\"checked\"" : "";
$login_for_profile_no = ( !$new['allow_login_for_profile'] ) ? "checked=\"checked\"" : "";
$login_for_memberlist_yes = ( $new['allow_login_for_memberlist'] ) ? "checked=\"checked\"" : "";
$login_for_memberlist_no = ( !$new['allow_login_for_memberlist'] ) ? "checked=\"checked\"" : "";
$login_for_whoisonline_yes = ( $new['allow_login_for_whoisonline'] ) ? "checked=\"checked\"" : "";
$login_for_whoisonline_no = ( !$new['allow_login_for_whoisonline'] ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#

   "L_MAX_SIG_LENGTH_EXPLAIN" => $lang['Max_sig_length_explain'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

   "L_LOGIN_FOR_PROFILE" => $lang['Login_for_profile'],
   "L_LOGIN_FOR_MEMBERLIST" => $lang['Login_for_memberlist'],
   "L_LOGIN_FOR_WHOISONLINE" => $lang['Login_for_whoisonline'],

#
#-----[ FIND ]------------------------------------------
#

   "NAMECHANGE_YES" => $namechange_yes,
   "NAMECHANGE_NO" => $namechange_no,

#
#-----[ AFTER, ADD ]------------------------------------------
#

   "LOGIN_FOR_PROFILE_YES" => $login_for_profile_yes,
   "LOGIN_FOR_PROFILE_NO" => $login_for_profile_no,
   "LOGIN_FOR_MEMBERLIST_YES" => $login_for_memberlist_yes,
   "LOGIN_FOR_MEMBERLIST_NO" => $login_for_memberlist_no,
   "LOGIN_FOR_WHOISONLINE_YES" => $login_for_whoisonline_yes,
   "LOGIN_FOR_WHOISONLINE_NO" => $login_for_whoisonline_no,

#
#-----[ OPEN ]------------------------------------------
#

language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
@@@ ingilizce
$lang['Login_for_profile']              = 'Require users to login to view profiles';
$lang['Login_for_memberlist']           = 'Require users to login to view memberlist';
$lang['Login_for_whoisonline']          = 'Require users to login to view online';

@@@ türçesi
$lang['Login_for_profile']              = 'Profil gönüntüleme sadece kayıtlı üyelere açık';
$lang['Login_for_memberlist']           = 'Ãœye listesi sadece kayıtlı üyelere açık';
$lang['Login_for_whoisonline']          = 'Kimler çevirimiçi sayfası sadece kayıtlı üyelere açık';


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Benutzeravatar
yakusha
 
Beiträge: 2
Registriert: 12. Jun 2006 13:42

Zurück zu New Projects



Wer ist online?

Mitglieder in diesem Forum: Magpie [Crawler] und 1 Gast

cron