[外掛]Gender 性別 (Update 1.2.8)

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
頭像
shihchieh
竹貓忠實會員
竹貓忠實會員
文章: 509
註冊時間: 2002-10-07 13:02

[外掛]Gender 性別 (Update 1.2.8)

文章 shihchieh »

圖檔可自行製作或原出處下載!!
原出處:http://mods.db9.dk/viewtopic.php?t=7

part I

代碼: 選擇全部

############################################### 
## Mod Title:   Gender part 1 
## Mod Version: 1.2.3
## Author:       Niels Chr, Denmark < ncr@db9.dk > (Niels Chr. R鷣) http://mods.db9.dk
## Description:  This mod will add a Gender field into your users' profile. 
##
## This mod is for phpBB2 ver 2.0.4
## 
## 
## Installation Level:  Moderate
## Installation Time:   15-25 Minutes 
## Files To Edit:    8
##   language/lang_english/lang_main.php 
##   includes/usercp_register.php 
##   includes/usercp_viewprofile.php 
##   includes/usercp_avatar.php 
##   admin/admin_users.php
##   templates/SubSliver/profile_view_body.tpl 
##   templates/SubSliver/profile_add_body.tpl 
##   templates/subsilver/admin/user_edit_body.tpl
##
##  Included Files: n/a
##
## History:
##	0.9.0 - Initial release phpBB2 RC-1
##	1.1.4 - Last release for phpBB2 ver 2.0.0
##	1.2.0. - fist release for phpBB2 ver 2.0.1.
##	1.2.0. - confirmed for phpBB2 ver 2.0.2 - no changes needed
##	1.2.1. - correct a type in the how-to
##	1.2.2. - changed a [FIND] tag
##	1.2.3. - changed for ver 2.0.4
##
############################################################## 
## 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/ 
##
################################################################# 
## 
## Installation Notes: 
## 
## if you are using a prefix to you DB tabels then you have to add this to 
## the SQL commands, e.g. "phpbb_users" instead of just "users" - ONLY 
## in the initial SQL commands, not in the php code ! 
## 
## The most important thing to keep in mind is, take your time, make 
## sure you are finding the correct lines to modify, then take care to paste the new code. 
## Please also keep in mind, if you are using more than one language file or theme at your 
## site, you will need to edit the corrosponding files for each occurrence.  Good Luck! 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
## and the Database
################################################################# 

# 
#-----[ ADD SQL ]------------------------------------------ 
# 
# or run the included db_update.php file as admin
#
ALTER TABLE phpbb_users ADD user_gender TINYINT not null DEFAULT "0"

# 
#-----[ OPEN ]------------------------------------------ 
# 
#  (make sure to edit this file for every language your board uses). 
language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 
//
// That's all Folks!
// -------------------------------------------------

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//Add on for Gender Mod 
$lang['Gender'] = 'Gender';//used in users profile to display witch gender he/she is 
$lang['Male'] = 'Male'; 
$lang['Female']='Female'; 
$lang['No_gender_specify'] = 'None Specified'; 

or

//Add on for Gender Mod 
$lang['Gender'] = '性別';//used in users profile to display witch gender he/she is 
$lang['Male'] = '男'; 
$lang['Female']='女'; 
$lang['No_gender_specify'] = '性別不詳'; 

# 
#-----[ OPEN ]------------------------------------------ 
#  
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$signature = str_replace('<br />', "
", $signature);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? intval ($HTTP_POST_VARS['gender']) : 0;

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = "UPDATE " . USERS_TABLE . "
SET "
WHERE user_id = $user_id";
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
$avatar_sql . "

# 
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------ 
# 
, user_gender=$gender

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = "INSERT INTO " . USERS_TABLE . "
VALUES (

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
, user_style

# 
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------ 
# 
, user_gender

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
, $user_style
# 
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------ 
# 
, '$gender'

# 
#-----[ FIND ]------------------------------------------ 
# 
$interests = $userdata['user_interests'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$gender=$userdata['user_gender']; 

# 
#-----[ FIND ]------------------------------------------ 
# 
display_avatar_gallery(

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
);

# 
#-----[ IN-LINE, BEFORE, ADD ]------------------------------------------ 
# 
, $gender

# 
#-----[ FIND ]------------------------------------------ 
# 
$smilies_status = ( $userdata['user_allowsmile'] && $board_config['allow_smilies']  ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
switch ($gender) 
{ 
   case 1: $gender_male_checked="checked=\"checked\"";break; 
   case 2: $gender_female_checked="checked=\"checked\"";break; 
   default:$gender_no_specify_checked="checked=\"checked\""; 
} 

# 
#-----[ FIND ]------------------------------------------ 
# 
'INTERESTS' => $interests, 
'LOCATION' => $location, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'LOCK_GENDER' =>($mode!='register') ? 'DISABLED':'', 
'GENDER' => $gender, 
'GENDER_NO_SPECIFY_CHECKED' => $gender_no_specify_checked, 
'GENDER_MALE_CHECKED' => $gender_male_checked, 
'GENDER_FEMALE_CHECKED' => $gender_female_checked, 

# 
#-----[ FIND ]------------------------------------------ 
# 
'L_INTERESTS' => $lang['Interests'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'L_GENDER' =>$lang['Gender'], 
'L_GENDER_MALE' =>$lang['Male'], 
'L_GENDER_FEMALE' =>$lang['Female'], 
'L_GENDER_NOT_SPECIFY' =>$lang['No_gender_specify'], 

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// Generate page 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
if ( !empty($profiledata['user_gender'])) 
{ 
           switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender=$lang['Male'];break; 
                      case 2: $gender=$lang['Female'];break; 
                      default:$gender=$lang['No_gender_specify']; 
           } 
} else $gender=$lang['No_gender_specify']; 

# 
#-----[ FIND ]------------------------------------------ 
# 
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&', 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'GENDER' => $gender, 

# 
#-----[ FIND ]------------------------------------------ 
# 
'L_INTERESTS' => $lang['Interests'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'L_GENDER' => $lang['Gender'], 

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------ 
# 
function display_avatar_gallery(

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
)

# 
#-----[ IN-LINE, BEFORE, ADD ]------------------------------------------ 
# 
, &$gender

# 
#-----[ FIND ]------------------------------------------ 
# 
$params = array(

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
);

# 
#-----[ IN-LINE, BEFORE, ADD ]------------------------------------------ 
# 
, 'gender'

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_users.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$gender = ( isset($HTTP_POST_VARS['gender']) ) ? $HTTP_POST_VARS['gender'] : 0;

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = "UPDATE " . USERS_TABLE . "
WHERE user_id = $user_id";

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
, user_rank = $user_rank

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 
, user_gender = '$gender'

# 
#-----[ FIND ]------------------------------------------ 
\n# 
$interests = htmlspecialchars($this_userdata['user_interests']);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$gender = $this_userdata['user_gender'];

# 
#-----[ FIND ]------------------------------------------ 
# 
$s_hidden_fields .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$s_hidden_fields .= '<input type="hidden" name="gender" value="' . $gender . '" />';

# 
#-----[ FIND ]------------------------------------------ 
# 
//
// Let's do an overall check for settings/versions which would prevent

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
switch ($gender) 
{ 
   case 1: $gender_male_checked="checked=\\"checked\"";break; 
   case 2: $gender_female_checked="checked=\"checked\"";break; 
   default:$gender_no_specify_checked="checked=\"checked\""; 
} 

# 
#-----[ FIND ]------------------------------------------ 
# 
'INTERESTS' => $interests,

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'GENDER' => $gender, 
'GENDER_NO_SPECIFY_CHECKED' => $gender_no_specify_checked, 
'GENDER_MALE_CHECKED' => $gender_male_checked, 
'GENDER_FEMALE_CHECKED' => $gender_female_checked,

# 
#-----[ FIND ]------------------------------------------ 
# 
'L_INTERESTS' => $lang['Interests'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'L_GENDER' =>$lang['Gender'], 
'L_GENDER_MALE' =>$lang['Male'], 
'L_GENDER_FEMALE' =>$lang['Female'], 
'L_GENDER_NOT_SPECIFY' =>$lang['No_gender_specify'],


# 
#-----[ OPEN ]------------------------------------------ 
# 
#  (make sure to edit this file for every theme you use). 
templates/subsilver/admin/user_edit_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
<input class="post" type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
	  </td>
	</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<tr> 
      <td class="row1"><span class="gen">{L_GENDER}:</span></td> 
      <td class="row2"> 
      <input type="radio" name="gender" value="0" {GENDER_NO_SPECIFY_CHECKED}/> 
      <span class="gen">{L_GENDER_NOT_SPECIFY}</span>&& 
      <input type="radio" name="gender" value="1" {GENDER_MALE_CHECKED}/> 
      <span class="gen">{L_GENDER_MALE}</span>&& 
      <input type="radio" name="gender" value="2" {GENDER_FEMALE_CHECKED}/> 
      <span class="gen">{L_GENDER_FEMALE}</span></td> 
</tr>


# 
#-----[ OPEN ]------------------------------------------ 
# 
# (make sure to edit this file for every theme you use). 
templates/subsilver/profile_view_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
  <td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<tr> 
	<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_GENDER}:</span></td>
	<td> <b><span class="gen">{GENDER}</span></b></td>
</tr>

# 
#-----[ OPEN ]------------------------------------------ 
# 
# (make sure to edit this file for every theme you use). 
templates/subsilver/profile_add_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
<input type="text" class="post"style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<tr> 
      <td class="row1"><span class="gen">{L_GENDER}:</span></td> 
      <td class="row2"> 
      <input type="radio" {LOCK_GENDER} name="gender" value="0" {GENDER_NO_SPECIFY_CHECKED}/> 
      <span class="gen">{L_GENDER_NOT_SPECIFY}</span>&& 
      <input type="radio" name="gender" value="1" {GENDER_MALE_CHECKED}/> 
      <span class="gen">{L_GENDER_MALE}</span>&& 
      <input type="radio" name="gender" value="2" {GENDER_FEMALE_CHECKED}/> 
      <span class="gen">{L_GENDER_FEMALE}</span></td> 
</tr> 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
part II

代碼: 選擇全部

############################################### 
## Mod Title:   Gender part 2 
## Mod Version: 1.2.1 
## Author:       Niels Chr R鷣. Denmark < ncr@db9.dk > 
## Description:  This mod will add display "Gender: <image>" in each of their posts. 
## This mod is for phpBB2 ver 2.0.4 
## 
## 
## Installation Level:  Easy 
## Installation Time:   5-10 Minutes 
## Files To Edit: 
##	   viewtopic.php  
##       templates/subSliver/subsilver.cfg 
##       templates/subSliver/viewtopic_body.tpl 
## Included Files: 
##       templates/subSliver/icon_minigender_male.gif 
##       templates/subSliver/icon_minigender_female.gif 
##
## History:
##	0.9.0 - Initial release phpBB2 RC-1
##	1.1.1 - Last release for phpBB2 ver 2.0.0
##	1.2.0. - fist release for phpBB2 ver 2.0.1.
##	1.2.0. - confirmed for phpBB2 ver 2.0.2. no changes needed
##	1.2.1. - corrected for ver 2.0.4
##
############################################################## 
## 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/ 
############################################################## 
## Authors Notes: 
## 
## Asumes that PART 1 of gender mod is done
##
## The most important thing to keep in mind is, take your time, make 
## sure you are finding the correct lines to modify, then take care to paste the new code. 
## Please also keep in mind, if you are using more than one language file or theme at your 
## site, you will need to edit the corrosponding files for each occurrence.  Good Luck! 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
viewtopic.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = "SELECT u.username

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
, p.*

# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# 
, u.user_gender

# 
#-----[ FIND ]------------------------------------------ 
# 
$rank_image = ''; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$gender_image = ''; 

# 
#-----[ FIND ]------------------------------------------ 
# 
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
    
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      switch ($postrow[$i]['user_gender']) 
      { 
         case 1 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender'].  ":".$lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />"; break; 
         case 2 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break; 
         default : $gender_image=""; 
      } 
    
# 
#-----[ FIND ]------------------------------------------ 
# 
'POSTER_RANK' => $poster_rank, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'POSTER_GENDER' => $gender_image, 

# 
#-----[ FIND ]------------------------------------------ 
# 
'DELETE' => $delpost, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
'L_GENDER' => $lang['Gender'], 

# 
#-----[ OPEN ]------------------------------------------ 
# 
# (remember to do this change to all installed templates on your board)
templates/subsilver/subsilver.cfg

# 
#-----[ FIND ]------------------------------------------ 
# 
?>

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
$images['icon_minigender_male'] = "$current_template_images/icon_minigender_male.gif"; 
$images['icon_minigender_female'] = "$current_template_images/icon_minigender_female.gif"; 

# 
#-----[ COPY ]------------------------------------------ 
# 
copy *.gif to templates/subsilver/images/*.gif

# 
#-----[ OPEN ]------------------------------------------ 
# 
#   (make sure you edit each occurrence of this file for all your themes). 
templates/subsilver/viewtopic_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br /> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
{postrow.POSTER_GENDER}<br /> 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
---
Do you fear death ?
頭像
shihchieh
竹貓忠實會員
竹貓忠實會員
文章: 509
註冊時間: 2002-10-07 13:02

文章 shihchieh »

如果個人資料內的性別文字也要改用圖示的話~

代碼: 選擇全部

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php 

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

switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender=$lang['Male'];break; 
                      case 2: $gender=$lang['Female'];break; 
                      default:$gender=$lang['No_gender_specify']; 
           }

# 
#-----[ REPLACE ]------------------------------------------ 
# 

switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender="<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender'].  ":".$lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />";break; 
                      case 2: $gender="<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break; 
                      default:$gender=$lang['No_gender_specify']; 
           }

# 
#-----[ SAVE & CLOSE ]------------------------------------------ 
#EOM 
---
Do you fear death ?
頭像
shihchieh
竹貓忠實會員
竹貓忠實會員
文章: 509
註冊時間: 2002-10-07 13:02

文章 shihchieh »

如果要限制除了系統管理者與會員本身以外的會員不能觀看的話\r

代碼: 選擇全部

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

lang_main.php

#
#-----------[ anywhere ]------------------------------------------------------
#

$lang['Secret'] = '祕密';

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

viewtopic.php



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


switch ($postrow[$i]['user_gender']) 
      { 
         case 1 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender']. ":".
$lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />"; break; 
         case 2 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".
$lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break; 
         default : $gender_image=""; 
      } 



#
#-----------[ REPLACE ]------------------------------------------------------
#

if ($userdata['user_level'] == ADMIN || $userdata['user_id'] == $postrow[$i]['user_id'] ) 
{ 
	switch ($postrow[$i]['user_gender']) 
	{ 
	case 1 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender']. 
":".$lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />"; break; 
	case 2 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. 
":".$lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break; 
	default : $gender_image=""; 
	}
} 
else
{
	switch ($postrow[$i]['user_gender']) 
	{ 
	case 1 : $gender_image = $lang['Gender'].":".$lang['Secret']; break; 
	case 2 : $gender_image = $lang['Gender'].":".$lang['Secret']; break; \r
	default : $gender_image=""; 
	} 
}

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

includes/usercp_viewprofile.php 

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

switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender="<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender'].  ":".$lang['Male']."\" 
title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />";break; 
                      case 2: $gender="<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Female']. "\" 
title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />";break; 
                      default:$gender=$lang['No_gender_specify']; 
           } 

#
#-----------[ REPLACE ]------------------------------------------------------
#
if ($userdata['user_level'] == ADMIN || $userdata['user_id'] == $postrow[$i]['user_id'] ) 
{ 
switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender="<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender'].  ":".$lang['Male']."\" 
title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />";break; 
                      case 2: $gender="<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Female']. "\" 
title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />";break; 
                      default:$gender=$lang['No_gender_specify']; 
           }
} 
else
{
switch ($profiledata['user_gender']) 
           { 
                      case 1: $gender=$lang['Secret'];break; 
                      case 2: $gender=$lang['Secret'];break; 
                      default:$gender=$lang['No_gender_specify']; 
           }	
}

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
---
Do you fear death ?
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

文章 動機不明 »

## MOD History:
##
## 2003-12-12 - Version 1.2.6
## - phpBB template & EasyMOD compliance enhancement
## - Arabic, Dutch, Estonian, French, German, Hungarian,
## Icelandic, Italian, Japanese, Korean, Lithuanian,
## Polish, Portuguese Brazil, Russian, Spanish & Turkish
## translations now provide with the MOD
##
## 2003-08-05 - Version 1.2.5
## - Part 1 & part 2 merge in a single how-to
## - Add French translation
## - How-to rewrite to be EasyMOD compatible
##
## ????-??-?? - Version 1.2.4
## - admin/admin_users.php added range check
##
## ????-??-?? - Version 1.2.3
## - confirmed for phpBB2 ver 2.0.5 by "kooky", no change needed
## - changed for ver 2.0.4
另一個下載點:
http://www.phpbbhacks.com/download/182


動機註:此外掛非常容易出錯,安裝前請先備份原始檔喔!
頭像
shihchieh
竹貓忠實會員
竹貓忠實會員
文章: 509
註冊時間: 2002-10-07 13:02

文章 shihchieh »

心靈捕手 寫:因為更新 LAST VISIT 外掛,
順道也發現了此一外掛已經更新.
以下是檔頭說明部份擷取:
code]
##############################################################
## MOD Title: Gender
## MOD Author: Niels < ncr@db9.dk > (Niels Chr. R鷣) http://mods.db9.dk
## MOD Description: This mod will add a Gender field into
## users' profile, and display "Gender: |image|"
## in posts too.
## MOD Version: 1.2.7
##
## Installation Level: Intermediate
## Installation Time: 20 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:
## viewtopic.php
## admin/admin_users.php
## includes/usercp_avatar.php
## includes/usercp_register.php
## includes/usercp_viewprofile.php
## language/lang_english/lang_main.php
## templates/SubSilver/profile_add_body.tpl
## templates/SubSilver/profile_view_body.tpl
## templates/subSliver/subSilver.cfg
## templates/subSliver/viewtopic_body.tpl
## templates/subSilver/admin/user_edit_body.tpl
## Included Files:
## root/templates/subSliver/images/icon_minigender_male.gif
## root/templates/subSliver/images/icon_minigender_female.gif
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## 1. EasyMOD
## -----------
## This MOD is compatible with EasyMOD and can be installed
## by it but is not yet certified EMC (EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## Warning 1! At the minimum, you need EasyMOD beta 1 (0.2.1a) or
## more recent to install this MOD by EM!
##
## Warning 2! At the present time, EM is not able to install
## automatically other languages than English.
## This gap will be solved in future releases but in the meantime,
## if you need to install any other language than English provides
## with this MOD, please proceed manually (cf. comments in
## the DIY action).
##
## 2. Compatibility
## -----------
## This MOD is phpBB 2.0.5->2.0.19 compliant (prior release not tested)
##
## 3. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.db9.dk/viewtopic.php?t=7
##
##############################################################
## MOD History:
##
## 2006-01-12 - Version 1.2.7
## - phpBB template & EasyMOD compliance enhancement
## - Include the sql queries in the MOD and remove the
## gender_db_update.php file
## - Add DIY instructions to install other languages than English
[/code]

目前在原作者網站( 需註冊) 已經是 1.2.7 版
http://mods.db9.dk/viewtopic.php?t=7

另一個下載點, 目前仍是 1.2.6 版
http://www.phpbbhacks.com/download/182
請感謝 心靈捕手 提供
---
Do you fear death ?
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8451
註冊時間: 2004-04-30 01:54
來自: Taiwan

[建議] 安裝最新版 1.2.8

文章 心靈捕手 »

檔頭擷取:

代碼: 選擇全部

############################################################## 
## MOD History: 
##
##   2006-04-16 - Version 1.2.8
##      - Modify a FIND to be phpBB 2.0.20 compliant
補充說明:
此外掛升級只是位相容於 phpBB 2.0.20
已經安裝 1.2.6 或 1.2.7 者, 不必升級

下載位址:
http://www.phpbbhacks.com/download/182

中文化參考:

代碼: 選擇全部

# 
#-----[ OPEN ]------------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_main.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
?>

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

// Start add - Gender MOD
$lang['Gender'] = '性別';//在檢視個人資料頁面, 顯示會員的性別
$lang['Male'] = '男'; 
$lang['Female']='女'; 
$lang['No_gender_specify'] = '性別不詳';// 您可以自行更改, 例如: '不公開'
// End add - Gender MOD
ps.
本討論串第一篇文章裡頭, 已有中文化.
http://phpbb-tw.net/phpbb/viewtopic.php?p=84977#84977
施比受有福,歡迎來信賜教,謝謝 & 再見!
祝福您 好運 ^_^
歡迎加入★★心靈捕手★★ :: 討論區!!
http://wang5555.hopto.org/phpBB3/
p.s. 奉老婆之命:在晚上十一點前,得關機睡覺!!!
主題已鎖定

回到「非官方認證外掛」