Author: Skywalker » Sun Apr 23, 2006 3:51 pm
could someone port this to integramod?
- Code: Select all
################################################################ Hack Title]http://www.lyrical-warriors.com#[/url]# Description: Allows members to give other people links that will give them credits## for getting them to register.## Compatibility: 2.0.11#### Installation Level: Moderate## Installation Time: 20 Minutes#### Files To Edit: 9## profile.php## viewtopic.php## admin/admin_users.php## includes/usercp_register.php## includes/constants.php## includes/usercp_viewprofile.php## templates/subSilver/subSilver.cfg## templates/subSilver/profile_view_body.tpl## templates/subSilver/viewtopic_body.tpl#### Included Files:## bp_view.php## admin/admin_bp_log.php## admin/admin_bp_settings.php## language/lang_english/lang_bp.php## templates/subSilver/bp_view_body.tpl## templates/subSilver/admin/bp_log_body.tpl## templates/subSilver/admin/bp_settings_body.tpl## templates/subSilver/images/lang_english/icon_bring.gif#### History:## 0.0.1: Initial Release## 0.0.2: Re-coded two files, so that the date is inserted and shown properly now## 0.0.3: Added postcount in the admin bp log next to the new users name## 0.0.4: The new users profile link now shows two diferrent colors depending ## on their posts on your forum. Red for Under the set amount and green## for above the set amount.#### Author Notes:## None#### Support: [url=http://www.phpbbhacks.com/forums#]http://www.phpbbhacks.com/forums#[/url]# Copyright: Copyright ÂÂÂ © 2005 Bring People 1.0.4 - William Shand## Copyright ÂÂÂ © John B. Abela, </a> $profile, ##-----[ AFTER, ADD ]------------------------------------------# 'BRING_IMG' => $bring_img, ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#admin/admin_users.php ##-----[ FIND ]------------------------------------------# $sql = "SELECT privmsgs_id ##-----[ BEFORE, ADD ]------------------------------------------# // // Bring People... // $sql = "DELETE FROM " . BRING_PEOPLE_TABLE . " WHERE nuid = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Sorry, but the data could not be deleted', '', __LINE__, __FILE__, $sql); } // // Bring People... // ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#includes/usercp_register.php ##-----[ FIND ]------------------------------------------#$unhtml_specialchars_replace = array('>', '<41> append_sid("profile.$phpEx?mode=register&agreed=true"), "U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true")) ##-----[ REPLACE WITH ]------------------------------------------# // // Bring People... // "U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&agreed=true&ruid=$ruid"), "U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&agreed=true&coppa=true&ruid=$ruid")) // // Bring People... // ##-----[ FIND ]------------------------------------------#$sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator) ##-----[ BEFORE, ADD ]------------------------------------------# // // Bring People // if ($board_config['bp_enable']) { if ($ruid != '') { $ruid = intval($ruid); $sql = "INSERT INTO " . BRING_PEOPLE_TABLE . " (bp_id, ruid, nuid, bp_time) VALUES ('', '" . $ruid . "', '" . intval($user_id) . "', '" . time() . "')"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Sorry, but the data could not be entered', '', __LINE__, __FILE__, $sql); } } } // // Bring People // ##-----[ FIND ]------------------------------------------# $s_hidden_fields = '<input><input><input>'; ##-----[ REPLACE WITH ]------------------------------------------# // // Bring People // $s_hidden_fields = '<input><input><input><input>'; // // Bring People // ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#includes/constants.php ##-----[ FIND ]------------------------------------------#?> ##-----[ BEFORE, ADD ]------------------------------------------#//// Bring People//define('BRING_PEOPLE_TABLE', $table_prefix.'bring_people');//// Bring People// ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#includes/usercp_viewprofile.php ##-----[ FIND ]------------------------------------------#$search = '<a>' . $lang['Search_user_posts'] . '</a>'; ##-----[ AFTER, ADD ]------------------------------------------#//// Bring People//if ($board_config['bp_enable'] && $profiledata['user_posts'] > $board_config['bp_posts_allowed']){ $ruid = $profiledata['user_id']; $sql = "SELECT COUNT(bp_id) AS bp_total FROM " . BRING_PEOPLE_TABLE . " WHERE ruid = $ruid"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Sorry, but the required information could not be obtained', '', __LINE__, __FILE__, $sql); } $bring_people_total = $db->sql_fetchrow($result); $bring_people_total = $bring_people_total['bp_total']; $temp_url = append_sid("bp_view.$phpEx?ruid=" . urlencode($profiledata['user_id'])); $temp_url = "(<a>" . $bring_people_total . "</a>)</b>"; $bring_people = $temp_url . ' <span>' . $lang['bp_intro'] . ' </span><a><i>' . $server_url . '?mode=register&ruid=' . $profiledata['user_id'] . '</i></a>';}else{ $bring_people = $lang['bp_posts_sorry'];}//// Bring People// ##-----[ FIND ]------------------------------------------# 'YIM' => $yim, ##-----[ AFTER, ADD ]------------------------------------------# 'BRING_PEOPLE' => $bring_people, ##-----[ FIND ]------------------------------------------# 'L_INTERESTS' => $lang['Interests'], ##-----[ AFTER, ADD ]------------------------------------------# 'L_BP_TOTAL' => $lang['bp_total'], ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#templates/subSilver/subSilver.cfg ##-----[ FIND ]------------------------------------------#$images['icon_quote'] = "$current_template_images/{LANG}/icon_quote.gif"; ##-----[ BEFORE, ADD ]------------------------------------------#$images['icon_bring'] = "$current_template_images/{LANG}/icon_bring.gif"; ##-----[ SAVE & CLOSE FILE ]------------------------------------------# #-----[ OPEN ]------------------------------------------#templates/subSilver/profile_view_body.tpl ##-----[ FIND ]------------------------------------------# <td> <b><span>{INTERESTS}</span></b></td> </tr> ##-----[ AFTER, ADD ]------------------------------------------# <tr> <td><span>{L_BP_TOTAL}</span></td> <td><b><span>{BRING_PEOPLE}</span></b></td> </tr> ##-----[ SAVE & CLOSE FILE ]------------------------------------------# ##-----[ OPEN ]------------------------------------------#templates/subSilver/viewtopic_body.tpl ##-----[ FIND ]------------------------------------------# <td> ##-----[ IN-LINE FIND ]------------------------------------------#{postrow.PROFILE_IMG} ##-----[ IN-LINE AFTER, ADD ]------------------------------------------# {postrow.BRING_IMG} ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.