also ich hab letzte woche nur einen hack installiert (davor gings noch) und das war der "who viewed my profile hack".
Code: Alles auswählen
##############################################################
## MOD Title: Who Viewed My Profile
## MOD Author: OXPUS < webmaster@oxpus.de > (Karsten Ude) http://www.oxpus.de
## MOD Description: This Mod saves the users which viewed another user-profile.
## In the viewed profile-header is installed an "eye"-button on the right side.
## side to display this list. The viewing of the own profile will not be catched.
## MOD Version: 1.4.0
##
## Installation Level: Intermediate
## Installation Time: 10-15 Minutes
## Files To Edit: 13
## admin/admin_users.php
## includes/constants.php
## includes/page_header.php
## includes/usercp_avatar.php
## includes/usercp_register.php
## includes/usercp_viewprofile.php
## language/lang_english/main.php
## language/lang_german/main.php
## templates/subSilver/overall_header.tpl
## templates/subSilver/profile_add_body.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/subSilver.cfg
## templates/subSilver/admin/user_edit_body.tpl
##
## Included Files: 5
## profile_view_user.php
## profile_view_popup.php
## templates/subSilver/profile_view_user_body.tpl
## templates/subSilver/profile_view_popup_boby.tpl
## templates/subSilver/images/icon_view.gif
##############################################################
## 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:
##
## Instead entering the given SQL-Statement, you can upload the file db_update.php
## to your phpbb root directory and run this with your browser.
## This file will do all nessassary changes in the database for you.
## After using this file, please delete it to avoid errors.
##
##############################################################
## MOD History:
##
## 2004-04-17 - Version 1.4.0
## - Make mod compatible to phpBB plus 1.3 and PCP 2.x
## For installing on a PCP look into the folder extras
##
## 2004-02-08 - Version 1.3.5
## - Fix a typo in the HowTo
##
## 2004-01-25 - Version 1.3.4
## - Passed through phpBB.com Mod Validator
##
## 2003-12-31 - Version 1.3.3
## - Rewritten the HowTo
##
## 2003-11-08 - Version 1.3.2
## - Insert new switch in userprofile to enable/disable popup
##
## 2003-??-?? - Version 1.3.1
## - Fix some SQL-Code and describe images within subSilver.cfg
##
## 2003-??-?? - Version 1.3.0
## - Add Popup for showing a profile view
##
## 2003-??-?? - Version 1.2.0
## - Insert pagenumbers
##
## 2003-??-?? - Version 1.1.2
## - Display the username for which data will displayed
##
## 2003-??-?? - Version 1.1.1
## - Fix DB-query and session-management in profile_view_user.php (THX @Acid)
##
## 2003-??-?? - Version 1.1.0
## - Rewritten data saving to reduce the tablesize
##
## 2003-??-?? - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_profile_view(
user_id mediumint( 8 ) NOT NULL ,
viewername varchar( 25 ) NOT NULL ,
viewer_id mediumint( 8 ) NOT NULL ,
view_stamp int( 11 ) NOT NULL,
counter mediumint( 8 ) NOT NULL
) TYPE = MYISAM
ALTER TABLE phpbb_users ADD `user_profile_view` SMALLINT( 5 ) DEFAULT '0' NOT NULL ;
ALTER TABLE phpbb_users ADD `user_last_profile_view` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE phpbb_users ADD user_profile_view_popup TINYINT(1) default '1' AFTER user_viewemail;
#
#-----[ COPY ]------------------------------------------
#
copy profile_view_user.php to profile_view_user.php
copy profile_view_popup.php to profile_view_popup.php
copy templates/subSilver/profile_view_user_body.tpl to templates/subSilver/profile_view_user_body.tpl
copy templates/subSilver/profile_view_popup_body.tpl to templates/subSilver/profile_view_popup_body.tpl
copy templates/subSilver/images/icon_view.gif to templates/subSilver/images/icon_view.gif
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$viewemail = ( isset( $HTTP_POST_VARS['viewemail']) ) ? ( ( $HTTP_POST_VARS['viewemail'] ) ? TRUE : 0 ) : 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$profile_view_popup = ( isset( $HTTP_POST_VARS['profile_view_popup']) ) ? ( ( $HTTP_POST_VARS['profile_view_popup'] ) ? TRUE : 0 ) : 0;
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_profile_view_popup = $profile_view_popup
#
#-----[ FIND ]------------------------------------------
#
$viewemail = $this_userdata['user_viewemail'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$profile_view_popup = $this_userdata['user_profile_view_popup'];
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="profile_view_popup" value="' . $profile_view_popup . '" />';
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'PROFILE_VIEW_POPUP_YES' => ($profile_view_popup) ? 'checked="checked"' : '',
'PROFILE_VIEW_POPUP_NO' => (!$profile_view_popup) ? 'checked="checked"' : '',
'L_PROFILE_VIEW_POPUP' => $lang['Profile_view_option'],
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('PROFILE_VIEW_TABLE', $table_prefix.'profile_view');
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
if ( $userdata['user_new_privmsg'] )
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if ( $userdata['user_profile_view'] && $userdata['user_profile_view_popup'] )
{
$template->assign_var("PROFILE_VIEW",
"<script language=\"Javascript\" type=\"text/javascript\"><!--
window.open('".append_sid('profile_view_popup.'.$phpEx)."', '_phpbbprivmsg', 'HEIGHT=250,resizable=yes,WIDTH=800');
//-->
</script>");
}
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_avatar.php
#
#-----[ FIND ]------------------------------------------
#
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$dateformat
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$profile_view_popup
#
#-----[ FIND ]------------------------------------------
#
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'dateformat'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, 'profile_view_popup'
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$viewemail = ( isset($HTTP_POST_VARS['viewemail']) ) ? ( ($HTTP_POST_VARS['viewemail']) ? TRUE : 0 ) : 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$profile_view_popup = ( isset($HTTP_POST_VARS['profile_view_popup']) ) ? ( ($HTTP_POST_VARS['profile_view_popup']) ? TRUE : 0 ) : 0;
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_profile_view_popup = $profile_view_popup
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_interests
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_profile_view_popup
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $profile_view_popup
#
#-----[ FIND ]------------------------------------------
#
$viewemail = $userdata['user_viewemail'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$profile_view_popup = $userdata['user_profile_view_popup'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$user_dateformat
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $profile_view_popup
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'PROFILE_VIEW_POPUP_YES' => ( $profile_view_popup ) ? 'checked="checked"' : '',
'PROFILE_VIEW_POPUP_NO' => ( !$profile_view_popup ) ? 'checked="checked"' : '',
'L_PROFILE_VIEW_POPUP' => $lang['Profile_view_option'],
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Update the profile view list
//
$user = $profiledata['user_id'];
$viewer = $userdata['username'];
$viewer_id = $userdata['user_id'];
$current_time = time();
if ($user <> $viewer_id)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_profile_view = '1'
WHERE user_id = " . $user. "";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update user data.", '', __LINE__, __FILE__, $sql);
}
$sql = "SELECT * FROM " . PROFILE_VIEW_TABLE . "
WHERE user_id = " . $user . "
AND viewer_id = " . $viewer_id;
if ( $result = $db->sql_query($sql) )
{
if ( !$row = $db->sql_fetchrow($result) )
$sql = "INSERT INTO " . PROFILE_VIEW_TABLE . "
(user_id, viewername, viewer_id, view_stamp, counter)
VALUES ('$user', '$viewer', '$viewer_id', '$current_time', '1')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not insert profile views.", '', __LINE__, __FILE__, $sql);
}
else
{
$count = $row['counter'] + 1;
$sql = "UPDATE " . PROFILE_VIEW_TABLE . "
SET view_stamp = '$current_time', counter = '$count'
WHERE user_id = " . $user. "
AND viewer_id = " . $viewer_id;
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update profile views.", '', __LINE__, __FILE__, $sql);
}
}
}
}
#
#-----[ FIND ]------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_VISITS' => '<a href="' . append_sid("profile_view_user.$phpEx?".POST_USERS_URL."=" . $profiledata['user_id'] . "&".POST_POST_URL."=0").'"><img src="' . $images['icon_view'] . '" border="0" alt="'.$lang['Views'].'"></a>',
#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Interests'] = 'Interessen';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Profile_view_option'] = 'PopUp-Fenster bei Profilaufruf';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Interests'] = 'Interests';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Profile_view_option'] = 'Pop up window on Profile View';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END switch_enable_pm_popup -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
{PROFILE_VIEW}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_PROFILE_VIEW_POPUP}:</span></td>
<td class="row2">
<input type="radio" name="profile_view_popup" value="1" {PROFILE_VIEW_POPUP_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="profile_view_popup" value="0" {PROFILE_VIEW_POPUP_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th class="thHead" colspan="2" height="25" nowrap="nowrap">{L_VIEWING_PROFILE}</th>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<th class="thHead" colspan="2" height="25" nowrap="nowrap">
<table width="100%"><tr><td align="center" class="cattitle">{L_VIEWING_PROFILE}</td>
<td align="right">{U_VISITS}</td></tr></table></th>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}</span></td>
<td class="row2">
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_PROFILE_VIEW_POPUP}</span></td>
<td class="row2">
<input type="radio" name="profile_view_popup" value="1" {PROFILE_VIEW_POPUP_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="profile_view_popup" value="0" {PROFILE_VIEW_POPUP_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$images['icon_view'] = "$current_template_images/icon_view.gif";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM