mod işlevi: üye profiline üye imzasını ekler, bunu sayfanın en altına ve sayfa yapısını bozmayacak şekilde yapar...
demo: http://deimonhigh.com/forums/profile.ph ... rofile&u=2
resim:
- Kod: Tümünü seç
##############################################################
## MOD Title: Signature in Profile (Bottom version)
## MOD Author: Dicky < dicky@askmaggymae.com > (Richard Foote) http://dicky.askmaggymae.com
## MOD Description: Adds the member's signature to their view profile page, at the bottom.
## MOD Version: 0.0.3
##
## Installation Level: easy
## Installation Time: 3 Minutes
## Files To Edit: (2)
## includes/usercp_viewprofile.php
## templates/subSilver/profile_view_body.tpl
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
## 08 January 2006 - Version 0.0.3
## - Fixed unnecessary switch
## 07 January 2006 - Version 0.0.2
## - Added switch by Kiwietje
## 05 January 2006 - Version 0.0.1
## - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
#
#-----[ AFTER, ADD ]------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------
#
$user_sig = '';
if ( $profiledata['user_attachsig'] && $board_config['allow_sig'] )
{
$user_sig = $profiledata['user_sig'];
$user_sig_bbcode_uid = $profiledata['user_sig_bbcode_uid'];
if ( $user_sig != '' )
{
$template -> assign_block_vars('switch_signature', array());
if ( !$board_config['allow_html'] || !$userdata['user_allowhtml'])
{
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig);
}
if ( $user_sig_bbcode_uid != '' )
{
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
}
$user_sig = make_clickable($user_sig);
if ( $userdata['allow_smilies'] )
{
$user_sig = smilies_pass($user_sig);
}
if (count($orig_word))
{
$user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
}
$user_sig = str_replace("\n", "\n<br />\n", $user_sig);
}
}
#
#-----[ FIND ]------------------------------------------
#
'AVATAR_IMG' => $avatar_img,
#
#-----[ AFTER, ADD ]------------------------------------
#
'USER_SIG' => $user_sig,
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------
#
'L_SIGNATURE' => $lang['Signature'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_ICQ_NUMBER}:</span></td>
<td class="row1"><script language="JavaScript" type="text/javascript"><!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {ICQ_IMG}');
else
document.write('<table cellspacing="0" cellpadding="0" border="0"><tr><td nowrap="nowrap"><div style="position:relative;height:18px"><div style="position:absolute">{ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{ICQ_STATUS_IMG}</div></div></td></tr></table>');
//--></script><noscript>{ICQ_IMG}</noscript></td>
</tr>
</table>
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
<!-- BEGIN switch_signature -->
<tr>
<td class="catLeft" align="center" height="28" colspan="2"><b><span class="gen">{L_SIGNATURE}</span></b></td>
</tr>
<tr>
<td class="row1" colspan="2"><span class="postbody">{USER_SIG}</span></td>
</tr>
<!-- END switch_signature -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM