[外掛]限制觀看會員列表和群組頁<加強版>

phpBB 大部分皆是由竹貓星球提供資料!
頭像
懸壺子
系統管理員
系統管理員
主題中的帖子: 1
文章: 33370
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

[外掛]限制觀看會員列表和群組頁<加強版>

未閱讀文章 懸壺子 »

[外掛]限制觀看會員列表和群組頁<加強版>
原作:ckm
http://phpbb-tw.net/phpbb/viewtopic.php?t=10823

代碼: 選擇全部

############################################################## 
## MOD Title: Restrict Memberlist / Usergroup Pages 
## MOD Author: Flipper <Flipper@pogoworld.co.uk> http://php.pogoworld.co.uk 
## MOD Description: Allows only registered users view Memberlist and/or Usergroups pages. 
## MOD Version: 1.0.0 
## 
## Installation Level: Easy 
## Installation Time: 2 Minutes 
## Files To Edit: memberlist.php, groupcp.php 
## Included Files: n/a 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ 
############################################################## 
## Author Notes: If a user is not logged in and they wish to view the memberlist and/or Usergroup pages they will simply be redirected to the login page. If log in is successful, they will be redirected back to Memberlist and/or Usergroup pages. Instructions are given on how to apply this mod to both Memberlist and Usergroups, however you can install it to just the Memberlist or Grouplist page if you wish. 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ OPEN ]------------------------------------------ 
# 

memberlist.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
  
// 
// End session management 
// 

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

// Begin 'Restrict Memberlist/Grouplist' MOD 
if ( !$userdata['session_logged_in'] ) 
   { 
      $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; 
      header($header_location . append_sid("login.$phpEx?redirect=memberlist.php", true)); 
      exit; 
   } 
// End 'Restrict Memberlist/Grouplist' MOD 

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

groupcp.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
  
// 
// End session management 
// 

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

// Begin 'Restrict Memberlist/Grouplist' MOD 
if ( !$userdata['session_logged_in'] ) 
   { 
      $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; 
      header($header_location . append_sid("login.$phpEx?redirect=groupcp.php", true)); 
      exit; 
   } 
// End 'Restrict Memberlist/Grouplist' MOD 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
圖檔
版面鎖定 主題已鎖定

回到「phpBB2」