在會員檢視表中可以顯示個人簽名

phpBB 大部分皆是由竹貓星球提供資料!
頭像
yehrussell
忍辱、精進、靜慮、般若波羅密
忍辱、精進、靜慮、般若波羅密
主題中的帖子: 1
文章: 1135
註冊時間: 2006-01-20 , 10:19
個人狀態: 非常忙碌中!
性別: 公仔

在會員檢視表中可以顯示個人簽名

未閱讀文章 yehrussell »

在會員檢視表中可以顯示個人簽名

http://phpbb-tw.net/phpbb/viewtopic.php?t=20373

原MOD下載的檔案,會產生一個usercp_viewprofile.php檔案,然後要你覆蓋檔案,可是以往安裝的MOD不就掛了。
我找出變更的地方,重新整理安裝說明,就不用覆蓋原檔案了,請依照下列簡單步驟就能安裝好。

代碼: 選擇全部

## EasyMod 0.0.7 compliant 
############################################################## 
## MOD Title: View Profile Sig 
## MOD Author: netclectic < adrian@netclectic.com > (Adrian Cockbutn) http://www.netclectic.com 
## MOD Description: Adds the user's signature to their view profile page. 
## MOD Version: 1.1.0 
## 
## Installation Level: easy 
## Installation Time: 3 Minutes 
## Files To Edit: (1) profile_view_body.tpl 
## Included Files: (1) usercp_viewprofile.php, 
############################################################## 
## 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: EasyMod compliant 
## 
############################################################## 
## MOD History: 
## 
##     1.1.0 :   Updated for 2.0.4 and fixed a problem with formatting of the signature. 
##     1.0.0 :   First release. 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
## Upload the included file to the includes folder 
## 
## Modify the template file as described below 
## 
## Adapted by ChatServ - http://www.nukeresources.com 
############################################################## 

# 
#-----[ 打開 ]------------------------------------------ 
# 

includes/usercp_viewprofile.php 

# 
#-----[ 尋找 ]------------------------------------------ 
# 

// 
// Generate page 

# 
#-----[ 前面加入 ]------------------------------------------ 
# 

// 
// View Profile Sig 
// 
$user_sig = ''; 
if ( $profiledata['user_attachsig'] && $board_config['allow_sig'] ) 
{ 
    include($phpbb_root_path . 'includes/bbcode.'.$phpEx); 
    $user_sig = $profiledata['user_sig']; 
    $user_sig_bbcode_uid = $profiledata['user_sig_bbcode_uid']; 
        if ( $user_sig != '' ) 
    { 
        if ( !$board_config['allow_html'] && $profiledata['user_allowhtml'] ) 
               { 
                       $user_sig = preg_replace('#(<)([/]?.*?)(>)#is', "<2>", $user_sig); 
               } 
            if ( $board_config['allow_bbcode'] && $user_sig_bbcode_uid != '' ) 
                   { 
                           $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/:[0-9a-z:]+]/si', ']', $user_sig); 
                   } 
                   $user_sig = make_clickable($user_sig); 

        if (!$userdata['user_allowswearywords']) 
        { 
            $orig_word = array(); 
            $replacement_word = array(); 
            obtain_word_list($orig_word, $replacement_word); 
            $user_sig = preg_replace($orig_word, $replacement_word, $user_sig); 
        } 
        if ( $profiledata['user_allowsmile'] ) 
        { 
            $user_sig = smilies_pass($user_sig); 
        } 
        $user_sig = str_replace(" 
", " 
<br /> 
", $user_sig); 
    } 
    $template->assign_block_vars('switch_user_sig_block', array()); 
} 

# 
#-----[ 尋找]------------------------------------------ 
# 

   'AVATAR_IMG' => $avatar_img, 

# 
#-----[ 後面加入 ]------------------------------------------ 
# 

        'L_SIGNATURE' => $lang['Signature'], 
        'USER_SIG' => $user_sig, 

# 
#-----[ 打開 ]------------------------------------------ 
# 
templates/風格夾/profile_view_body.tpl 

# 
#-----[ 尋找 ]------------------------------------------ 
# 
      <tr> 
        <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td> 
        <td> <b><span class="gen">{INTERESTS}</span></b></td> 
      </tr> 

# 
#-----[ 後面加入 ]------------------------------------ 
# 
        <!-- BEGIN switch_user_sig_block --> 
      <tr> 
        <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_SIGNATURE}: </span></td> 
        <td> <b><span class="postbody">{USER_SIG}</span></b></td> 
      </tr> 
        <!-- END switch_user_sig_block --> 

# 
#-----[ 完成 ]-------------------------- 
# 






注意:如果是NUKE+BB使用者請把
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
改成
include("includes/bbcode.php");
版面鎖定 主題已鎖定

回到「phpBB2」