Code: Selecteer alles
##############################################################
## Hack Title: LANmaniac Xfire IM Integration Edited Version 1.1
## Hack Author: Superaktieboy < superaktieboy@hotmail.com.com > http://www.dhost.info/phpbbfreakz/
##
## Hack Description: This hack will fully integrate Xfire into your forums by creating a
## new button. This button will replace the standard Yahoo IM button
## making this hack link to any users Xfire profile. It adds a new Xfire
## IM Button.
##
## Hack Version: 1.1
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 6
## includes/usercp_viewprofile.php
## language/lang_english/lang_main.php
## groupcp.php
## memberlist.php
## privmsg.php
## viewtopic.php
##
## Included Files: 1
## templates/subSilver/images/icon_yim.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this hack. Downloading this hack from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for hack's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This hack is original made by Colonel (kfc) Sanders and is edited by Superaktieboy
##
## This hack will replace the Yahoo IM button with a new Xfire IM button on every section of
## your forums. On mouse click, the Xfire button will launch a new window in which your Xfire
## profile will be displayed.
##
## This hack won't replace any more the Yahoo IM button, but it adds a new Xfire IM Button
##
## Rather than turning this hack into a 45min MOD, we will be replacing the least used IM client
## that PHPBB supports with Xfire.
##
## If you do not yet have Xfire, download the free client here.
## (http://www.xfire.com)
##
##
## Demo the LANmaniac Xfire IM Integration hack live at the LANmaniac Forums.
## (http://www.lanmaniac.com/forums)
##
##############################################################
## Hack History:
##
## 2005-04-07 - Version 1.1
## - Second release
## - Now it won't replace the Yahoo IM button
##
## 2005-04-07 - Version 1.0
## - First release
##
##############################################################
## Before Adding This hack To Your Forum, You Should Back Up All Files Related To This hack
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy templates/subSilver/images/lang_english/icon_xfire.gif to templates/subSilver/images/lang_english/icon_xfire.gif
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
#
#-----[ INLINE FIND ]------------------------------------
#
, u.user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------
#
, u.user_xfire
#
#-----[ FIND ]------------------------------------
#
$yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = ( $postrow[$i]['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank"><img src="' . $images['icon_xfire'] . '" alt="' . $lang['xfire'] . '" title="' . $lang['xfire'] . '" border="0" /></a>' : '';
$xfire = ( $postrow[$i]['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank">' . $lang['xfire'] . '</a>' : '';
#
#-----[ FIND ]------------------------------------
#
$yim_img = '';
$yim = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = '';
$xfire = '';
#
#-----[ FIND ]------------------------------------
#
'YIM_IMG' => $yim_img,
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire,
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_sig_bbcode_uid, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u, " . USERS_TABLE . " u2
#
#-----[ INLINE FIND ]------------------------------------
#
, u.user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------
#
, u.user_xfire
#
#-----[ FIND ]------------------------------------
#
$yim_img = ( $privmsg['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $privmsg['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $privmsg['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $privmsg['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = ( $privmsg['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank"><img src="' . $images['icon_xfire'] . '" alt="' . $lang['xfire'] . '" title="' . $lang['xfire'] . '" border="0" /></a>' : '';
$xfire = ( $privmsg['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank">' . $lang['xfire'] . '</a>' : '';
#
#-----[ FIND ]------------------------------------
#
'YIM_IMG' => $yim_img,
'YIM' => $yim)
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire)
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------
#
'L_YIM' => $lang['YIM'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_XFIRE' => $lang['xfire'],
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
#
#-----[ INLINE FIND ]------------------------------------
#
, user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------
#
, user_xfire
#
#-----[ FIND ]------------------------------------
#
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = ( $row['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank"><img src="' . $images['icon_xfire'] . '" alt="' . $lang['xfire'] . '" title="' . $lang['xfire'] . '" border="0" /></a>' : '';
$xfire = ( $row['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '" target="_blank">' . $lang['xfire'] . '</a>' : '';
#
#-----[ FIND ]------------------------------------
#
'YIM_IMG' => $yim_img,
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire,
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------
#
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
#
#-----[ INLINE FIND ]------------------------------------------
#
, &$yim_img, &$yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, &$xfire_img, &$xfire
#
#-----[ FIND ]------------------------------------
#
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = ( $row['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '"><img src="' . $images['icon_xfire'] . '" alt="' . $lang['xfire'] . '" title="' . $lang['xfire'] . '" border="0" /></a>' : '';
$xfire = ( $row['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $postrow[$i]['user_xfire'] . '">' . $lang['xfire'] . '</a>' : '';
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm
FROM " . USERS_TABLE . "
WHERE user_id = " . $group_info['group_moderator'];
#
#-----[ INLINE FIND ]------------------------------------------
#
, user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, user_xfire
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
#
#-----[ INLINE FIND ]------------------------------------------
#
, user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, user_xfire
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm
FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
WHERE ug.group_id = $group_id
#
#-----[ INLINE FIND ]------------------------------------------
#
, user_yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, user_xfire
#
#-----[ FIND ]------------------------------------
#
generate_user_info($group_moderator, $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
#
#-----[ INLINE FIND ]------------------------------------------
#
, $yim_img, $yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, $xfire_img, $xfire
#
#-----[ FIND ]------------------------------------
#
'L_YIM' => $lang['YIM'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_XFIRE' => $lang['XFIRE'],
#
#-----[ FIND ]------------------------------------
#
'MOD_YIM_IMG' => $yim_img,
'MOD_YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'MOD_XFIRE_IMG' => $yim_img,
'MOD_XFIRE' => $yim,
#
#-----[ FIND ]------------------------------------
#
generate_user_info($group_members[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
#
#-----[ INLINE FIND ]------------------------------------------
#
, $yim_img, $yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, $xfire_img, $xfire
#
#-----[ FIND ]------------------------------------
#
'YIM_IMG' => $yim_img,
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire,
#
#-----[ FIND ]------------------------------------
#
generate_user_info($modgroup_pending_list[$i], $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim);
#
#-----[ INLINE FIND ]------------------------------------------
#
, $yim_img, $yim
#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#
, $xfire_img, $xfire
#
#-----[ FIND ]------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire,
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------
#
$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$xfire_img = ( $profiledata['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $profiledata['user_xfire'] . '" target="_blank"><img src="' . $images['icon_xfire'] . '" alt="' . $lang['xfire'] . '" title="' . $lang['xfire'] . '" border="0" /></a>' : '';
$xfire = ( $profiledata['user_xfire'] ) ? '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' . $profiledata['user_xfire'] . '" target="_blank">' . $lang['xfire'] . '</a>' : '';
#
#-----[ FIND ]------------------------------------
#
'YIM_IMG' => $yim_img,
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'XFIRE_IMG' => $xfire_img,
'XFIRE' => $xfire,
#
#-----[ FIND ]------------------------------------
#
'L_YAHOO' => $lang['YIM'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_XFIRE' => $lang['xfire'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------
#
$lang['YIM'] = 'Yahoo Messenger';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['xfire'] = 'Xfire';
#
#-----[ OPEN ]------------------------------------------
#
subSilver.cfg
#
#-----[ FIND ]------------------------------------
#
$images['icon_yim'] = "$current_template_images/{LANG}/icon_yim.gif";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$images['icon_xfire'] = "$current_template_images/{LANG}/icon_xfire.gif";
#
#-----[ OPEN ]------------------------------------------
#
privmsgs_read_body.tpl
#
#-----[ FIND ]------------------------------------
#
<td valign="middle" nowrap="nowrap">{PROFILE_IMG} {PM_IMG} {EMAIL_IMG}
{WWW_IMG} {AIM_IMG} {YIM_IMG} {XFIRE_IMG} {MSN_IMG}</td><td> </td><td valign="top" nowrap="nowrap"><script language="JavaScript" type="text/javascript"><!--
#
#-----[ INLINE FIND ]------------------------------------
#
{YIM_IMG}
#
#-----[ INLINE AFTER, ADD ]------------------------------------
#
{XFIRE_IMG}
#
#-----[ OPEN ]------------------------------------------
#
viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------
#
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
#
#-----[ INLINE FIND ]------------------------------------
#
{postrow.YIM_IMG}
#
#-----[ INLINE AFTER, ADD ]------------------------------------
#
{postrow.XFIRE_IMG}
#
#-----[ OPEN ]------------------------------------------
#
profile_view_body.tpl
#
#-----[ FIND ]------------------------------------
#
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_YAHOO}:</span></td>
<td class="row1" valign="middle"><span class="gen">{YIM_IMG}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_XFIRE}:</span></td>
<td class="row1" valign="middle"><span class="gen">{XFIRE_IMG}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
profile_add_body.tpl
#
#-----[ FIND ]------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_YAHOO}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 150px" name="yim" size="20" maxlength="255" value="{YIM}" />
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_XFIRE}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 150px" name="Xfire" size="20" maxlength="255" value="{XFIRE}" />
</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#
#EoM