I created an EM Friendly version of the MOD script. You can save this in a txt file and upload it to the MOD root. It should be the same version as what you downloaded...
Code: Select all
##############################################################
## MOD Title: Activity Mod Plus
## MOD Author: aUsTiN < [email protected] > (N/A) N/A
## MOD Author: Napoleon < N/A > (N/A) N/A
## MOD Description: A Very Much Needed Upgrade. Many More Extras & Options.
## MOD Version: 1.1.0
## MOD Help: http://phpbb-amod.com/ & http://phpbb.com/phpBB/viewtopic.php?t=203074
##
## Installation Level: Easy with EasyMod
## Installation Time: 15 +/- Minutes (1 minute using EM)
##
## Files To Edit (14):
## index.php
## viewonline.php
## viewtopic.php
## admin/index.php
## includes/constants.php
## includes/functions.php
## includes/page_header.php
## includes/usercp_viewprofile.php
## language/lang_english/lang_main.php
## templates/subSilver/index_body.tpl
## templates/subSilver/overall_header.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/simple_header.tpl
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: 188 (73 Files, 11 index.html's, 104 Images)
##
##############################################################
##
## Author Notes:
##
## Copyright © aUsTiN-Inc, 2003/5
##
## If you add anything or want anything added, please
## Go To http://phpbb.com/phpBB/viewtopic.php?t=203074
## OR
## http://phpbb-amod.com/
##
## ALL FILES WERE DOWNLOADED DIRECTLY FROM MY SITE TO BUILD THIS INSTALL.
##
## Feel free to see it in action at http://phpbb-amod.com/activity.php
##
##############################################################
##
## MOD History:
##
## Jun 15th 2004 - Version 1.0.0
## - Beta Released
##
## Jun ???? 2004 - Version 1.0.1
## - Bug Fixes
## - New Features
##
## Jun 25th 2004 - Version 1.0.2
## - Bug Fixs
## - New Features
##
## Jul 09th 2004 - Version 1.0.3
## - Bug Fixes
## - New Features
##
## Jul 28th 2004 - Version 1.0.4
## - Bug Fixes
## - New Features
##
## Aug 06th 2004 - Version 1.0.5
## - Bug Fixes
## - New Features
##
## Aug 24th 2004 - Version 1.0.6
## - Bug Fixes
## - New Features
##
## Sep 01st 2004 - Version 1.0.7
## - Bug Fixes
## - New Features
##
## Sep 27th 2004 - Version 1.0.8
## - Bug Fixes
## - New Features
##
## Jan 18th 2005 - Version 1.0.9
## - Bug Fixes
## - New Features
##
## Apr 27th 2005 - Version 1.1.0
## - Bug Fixes
## - New Features
##
##############################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##
##############################################################
##
## Definitions:
##
## Root: Folder your config.php is located
## templates/subSilver/: Your template folder (All template folders are suggested)
## lang_*/: Your current language folder (All lang folders are suggested)
##
##############################################################
#
#----[ DIY INSTRUCTIONS ]---------------
#
Look at the bottom of your site, click Goto Administration Page
In the ACP (Admin Control Panel) find on the left, Amod+ Admin
under that you will see a list of links:
.:Configuration:.
Add Game
Bulk Add Games
Category
Char Settings
DB Adjustments
Edit Games
Hide/Show Games
Mass Change
Scores Editor
User Ban
Xtras
Click on DB Adjustments, on this page click on Install Activity Mod Plus.
#
#-----------------------[ COPY ]-------------------------
#
copy root/*.php to *.php
copy root/admin/*.php to admin/*.php
copy root/Amod/*.* to Amod/*.*
copy root/amod_files/*.* to amod_files/*.*
copy root/amod_files/activity_game_ratings/*.* to amod_files/activity_game_ratings/*.*
copy root/amod_files/amp_characters/*.* to amod_files/amp_characters/*.*
copy root/amod_files/amp_characters/female/*.* to amod_files/amp_characters/female/*.*
copy root/amod_files/amp_characters/images/*.* to amod_files/amp_characters/images/*.*
copy root/amod_files/amp_characters/male/*.* to amod_files/amp_characters/male/*.*
copy root/amod_files/images/*.* to amod_files/images/*.*
copy root/game_root/*.* to game_root/*.*
copy root/includes/*.php to includes/*.php
copy root/language/*.php to language/lang_english/*.php
copy root/templates/subSilver/amod_files/*.* to templates/subSilver/amod_files/*.*
copy root/templates/subSilver/admin/*.tpl to templates/subSilver/admin/*.tpl
copy root/templates/subSilver/images/*.gif to templates/subSilver/images/*.gif
#
#----[ OPEN ]-----------------------
#
index.php
#
#----[ FIND ]-----------------------
#
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
$ipb_check = (isset($HTTP_GET_VARS['act'])) ? 'Arcade' : '';
$ipb_score = (isset($HTTP_GET_VARS['do'])) ? 'newscore' : '';
if ( ($ipb_check) && ($ipb_score) )
{
$game = trim(addslashes(stripslashes($HTTP_POST_VARS['gname'])));
$score = intval($HTTP_POST_VARS['gscore']);
$q = "SELECT game_type
FROM ". iNA_GAMES ."
WHERE game_name = '". $game ."'";
$r = $db->sql_query($q);
$row = $db->sql_fetchrow($r);
//==== Only IPB Games Can Use This Format!
if ($row['game_type'] == 3)
{
echo '<form method="post" name="ipb" action="newscore.php">';
echo '<input type="hidden" name="score" value="'. $score .'">';
echo '<input type="hidden" name="game_name" value="'. $game .'">';
echo '</form>';
echo '<script type="text/javascript">';
echo 'window.onload = function(){document.ipb.submit()}';
echo '</script>';
exit();
}
else
{
redirect(append_sid('activity.'. $phpEx), TRUE);
}
}
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
viewonline.php
#
#----[ FIND ]-----------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;
#
#-----[ AFTER, ADD ]------------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
case PAGE_ACTIVITY:
$location = $lang['Activity'];
$location_url = "activity.$phpEx";
break;
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
includes/functions.php
#
#----[ FIND ]-----------------------
#
?>
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
function UpdateTrophyStats()
{
global $db, $table_prefix;
$q = "UPDATE ". USERS_TABLE ."
SET user_trophies = '0'
WHERE user_trophies <> '0'";
$r = $db -> sql_query($q);
$q = "SELECT player
FROM ". $table_prefix ."ina_top_scores
GROUP BY player";
$r = $db -> sql_query($q);
while($row = $db -> sql_fetchrow($r))
{
$who = $row['player'];
$q1 = "SELECT COUNT(*) AS trophies
FROM ". $table_prefix ."ina_top_scores
WHERE player = '$who'
GROUP BY player";
$r1 = $db -> sql_query($q1);
$row = $db -> sql_fetchrow($r1);
$total_trophies = $row['trophies'];
$q2 = "UPDATE ". USERS_TABLE ."
SET user_trophies = '$total_trophies'
WHERE user_id = '$who'";
$r2 = $db -> sql_query($q2);
}
return;
}
function CheckGamesDeletion()
{
global $db, $table_prefix, $board_config;
$q = "SELECT config_value
FROM ". CONFIG_TABLE ."
WHERE config_name = 'current_ina_date'";
$r = $db -> sql_query($q);
$row = $db -> sql_fetchrow($r);
$next_deletion = $row['config_value'];
$explode_it = explode("-", $next_deletion);
$d_month = $explode_it[1];
$t_date = date("Y-m-d");
$x_date = explode("-", $t_date);
$c_month = $x_date[1];
if($d_month == $c_month){
}
else
{
if($board_config['ina_delete'] == "1")
{
$q = "TRUNCATE ". iNA_SCORES ."";
$r = $db -> sql_query($q);
$q = "TRUNCATE ". $table_prefix ."ina_trophy_comments";
$r = $db -> sql_query($q);
$q = "UPDATE ". CONFIG_TABLE ."
SET config_value = '$t_date'
WHERE config_name = 'current_ina_date'";
$r = $db -> sql_query($q);
}
}
return;
}
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
viewtopic.php
#
#----[ FIND ]-----------------------
#
//
// Start initial var setup
//
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
include_once($phpbb_root_path .'includes/functions_amod_plus.'. $phpEx);
$q = "SELECT *
FROM ". INA_HOF ."";
$r = $db->sql_query($q);
$hof_data = $db->sql_fetchrowset($r);
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ FIND ]-----------------------
#
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT
#
#----[ IN-LINE FIND ]---------
#
$sql = "SELECT
#
#----[ IN-LINE AFTER, ADD ]---------
#
u.user_trophies, u.ina_char_name,
#
#----[ FIND ]-----------------------
# NOTE, IF YOU HAVE PCP INSTALLED, YOU WONT HAVE THIS LINE, JUST MAKE SURE & ADD THE BELOW TO THE
# POSTROW SECTION.
#
'POSTER_AVATAR' => $poster_avatar,
#
#------[ AFTER, ADD ]------------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
'POSTER_TROPHY' => Amod_Build_Topics($hof_data, $postrow[$i]['user_id'], $postrow[$i]['user_trophies'], $postrow[$i]['username'], $postrow[$i]['ina_char_name']),
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
includes/usercp_viewprofile.php
#
#----[ FIND ]-----------------------
#
//
// Generate page
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
include_once($phpbb_root_path .'includes/functions_amod_plus.'. $phpEx);
unset($trophy_count, $trophy_holder, $trophy);
if ( ($board_config['ina_show_view_profile']) && ($profiledata['user_trophies'] > '0') && ($profiledata['user_id'] != ANONYMOUS) )
{
$template->assign_block_vars('trophy', array(
'PROFILE_TROPHY' => "<a href=\"javascript:Trophy_Popup('". $phpbb_root_path ."activity_trophy_popup.$phpEx?user=". $profiledata['user_id'] ."&sid=". $userdata['session_id'] ."','New_Window','400','380','yes')\" onclick=\"blur()\">". $lang['Trohpy'] ."</a>: ". $profiledata['user_trophies'],
'TROPHY_TITLE' => $lang['Trohpy'])
);
}
$template->assign_vars(array(
'PROFILE_TIME' => DisplayPlayingTime(2, $profiledata['ina_time_playing']),
'PROFILE_TITLE' => $lang['profile_game_time'])
);
if ( ($board_config['ina_char_show_viewprofile']) && ($profiledata['ina_char_name']) && ($profile_data['user_id'] != ANONYMOUS) )
{
include_once($phpbb_root_path .'includes/bbcode.'. $phpEx);
$template->assign_block_vars('profile_char', array(
'CHAR_PROFILE' => AMP_Profile_Char($profiledata['user_id'], ''))
);
}
$poster_rank .= Amod_Trophy_King_Image($profiledata['user_id']);
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
includes/constants.php
#
#----[ FIND ]-----------------------
#
define('PAGE_GROUPCP', -11);
#
#-----[ AFTER, ADD ]------------------
#
# Increment this if you already have these numbers
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
define('PAGE_ACTIVITY', -12);
define('PAGE_PLAYING_GAMES', -13);
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ FIND ]-----------------------
#
?>
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
define('iNA', $table_prefix.'ina_data');
define('iNA_GAMES', $table_prefix.'ina_games');
define('iNA_SCORES', $table_prefix.'ina_scores');
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
includes/page_header.php
#
#----[ FIND ]-----------------------
#
if ( $row['user_allow_viewonline'] )
{
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
if ($row['user_session_page'] == PAGE_ACTIVITY || $row['user_session_page'] == PAGE_PLAYING_GAMES)
{
$row['username'] = '<b>'. $row['username'] .'</b>';
$style_color = 'style="color:#'. str_replace('#', '', $board_config['ina_online_list_color']) .'"';
}
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ FIND ]-----------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
'L_WHOSONLINE_GAMES' => '<a href="'. append_sid('activity.'. $phpEx) .'"><font color="#'. str_replace('#', '', $board_config['ina_online_list_color']) .'">'. $board_config['ina_online_list_text'] .'</font></a>',
'U_ACTIVITY' => append_sid('activity.'.$phpEx),
'L_ACTIVITY' => $lang['Activity'],
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
admin/index.php
#
#----[ FIND ]-----------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD ]------------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
case PAGE_ACTIVITY:
$location = $lang['Activity'];
$location_url = "activity.$phpEx";
break;
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
language/lang_english/lang_main.php
#
#----[ FIND ]-----------------------
#
?>
#
#----[ BEFORE, ADD ]----------------
#
//======================================================================= |
//==== Start: == Activity Mod Plus ====================================== |
//==== v1.1.0 =========================================================== |
//====
$lang['Activity'] = 'Games';
$lang['Trohpy'] = 'Game Trophies';
//====
//==== Author: aUsTiN [[email protected]] [http://phpbb-amod.com] === |
//==== End: ==== Activity Mod Plus ====================================== |
//======================================================================= |
#
#----[ OPEN ]-----------------------
#
templates/subSilver/index_body.tpl
#
#----[ FIND ]-----------------------
#
[ {L_WHOSONLINE_MOD} ]
#
#----[ IN-LINE FIND ]-----------------------
#
[ {L_WHOSONLINE_MOD} ]
#
#-----[ IN-LINE AFTER, ADD ]-----------------
#
[ {L_WHOSONLINE_GAMES} ]
#
#----[ OPEN ]-----------------------
#
templates/subSilver/overall_header.tpl
#
#----[ FIND ]-----------------------
#
</head>
#
#----[ BEFORE, ADD ]----------------
#
<SCRIPT LANGUAGE="Javascript">
var win = null;
function Gk_PopTart(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
win = window.open(mypage,myname,settings);
}
</SCRIPT>
<SCRIPT LANGUAGE="Javascript">
var win = null;
function Trophy_Popup(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
win = window.open(mypage,myname,settings);
}
</SCRIPT>
#
#----[ FIND ]-------------
#
L_LOGIN_LOGOUT}
</tr>
#
#-----[ AFTER, ADD ]------------------
#
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">
<a href="{U_ACTIVITY}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_activity.gif" width="12" height="13" border="0" alt="{L_ACTIVITY}" hspace="3" />{L_ACTIVITY}</a> </span>
</td>
</tr>
#
#----[ OPEN ]-----------------------
#
templates/subSilver/viewtopic_body.tpl
#
#----[ FIND ]-----------------------
# IF YOU USE PcP CHANGE THIS TO {postrow.AUTHOR_PANEL}
{postrow.POSTER_POSTS}
#
#----[ IN-LINE FIND ]-----------------------
# IF YOU USE PcP CHANGE THIS TO {postrow.AUTHOR_PANEL}
{postrow.POSTER_POSTS}
#
#------[ IN-LINE AFTER, ADD ]------------------
#
{postrow.POSTER_TROPHY}
#
#----[ OPEN ]-----------------------
#
templates/subSilver/profile_view_body.tpl
#
#----[ FIND ]-----------------------
#
{INTERESTS}
</tr>
#
#------[ AFTER, ADD ]------------------
#
<!-- BEGIN trophy -->
<tr>
<td align="right" nowrap="nowrap" class="explaintitle"><span class="gen">{trophy.TROPHY_TITLE}:</span></td>
<td><span class="gen">{trophy.PROFILE_TROPHY}</span></td>
</tr>
<!-- END trophy -->
<tr>
<td align="right" nowrap="nowrap" class="explaintitle"><span class="gen">{PROFILE_TITLE}</span></td>
<td><span class="gen">{PROFILE_TIME}</span></td>
</tr>
#
#----[ FIND ]-----------------------
#
<table
<tr>
{JUMPBOX}
#
#----[ BEFORE, ADD ]----------------
#
<!-- Start Activity Mod Plus -->
<!-- BEGIN profile_char -->
{profile_char.CHAR_PROFILE}
<!-- END profile_char -->
<!-- End Activity Mod Plus -->
#
#----[ OPEN ]-----------------------
#
templates/subSilver/simple_header.tpl
#
#----[ FIND ]-----------------------
#
</head>
#
#----[ BEFORE, ADD ]----------------
#
<SCRIPT LANGUAGE="Javascript">
var win = null;
function Gk_PopTart(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
win = window.open(mypage,myname,settings);
}
</SCRIPT>
<SCRIPT LANGUAGE="Javascript">
var win = null;
function Trophy_Popup(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
win = window.open(mypage,myname,settings);
}
</SCRIPT>
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------
#
# EoM