############################################################################### ## MOD Title: Add Spritmonitor.de Icon to Userprofile ## MOD Author: Spritmonitor < phpbb@spritmonitor.de > (Fisch und Fischl) http://www.spritmonitor.de ## MOD Description: Add the Field Vehicle-ID to your Userprofile. ## MOD Version: 0.1.3 ## ## Installation Level: Intermediate ## Installation Time: 30 Minutes ## Files To Edit: 11 ## language/lang_english/lang_main.php ## language/lang_german/lang_main.php ## includes/usercp_viewprofile.php ## includes/usercp_register.php ## includes/usercp_avatar.php ## admin/admin_users.php ## viewtopic.php ## templates/subSilver/viewtopic_body.tpl ## templates/subSilver/profile_add_body.tpl ## templates/subSilver/profile_view_body.tpl ## templates/subSilver/admin/user_edit_body.tpl ## Included Files: N/A ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################################### ## ## MOD History: ## ## 2005-10-07 - Version 0.1.0 ## - First Development Version ## 2005-10-08 - Version 0.1.1 ## - minor fixes (wrong lang variable name, code block in wrong section) ## 2005-10-15 - Version 0.1.2 ## - update to new urls ## 2005-11-05 - Version 0.1.3 ## - link to english detail page ## ############################################################################### ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################################### # #-----[ SQL ]------------------------------------------- # # You have to execute the following query via phpmyadmin (change prefix).. ALTER TABLE phpbb_users ADD user_spritmonid INT UNSIGNED DEFAULT 0 AFTER user_interests; # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['Interests'] = 'Interests'; # #-----[ AFTER, ADD ]------------------------------------------ # $lang['Spritmonid'] = 'Vehicle-ID from Spritmonitor.de (mileage calculator)'; $lang['Spritmonid_explain'] = 'You find the Vehicle-ID after login on Spritmonitor.de in the submenu "Mileage icon"'; $lang['Mileage'] = 'Mileage'; # #-----[ OPEN ]------------------------------------------ # language/lang_german/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['Interests'] = 'Interessen'; # #-----[ AFTER, ADD ]------------------------------------------ # $lang['Spritmonid'] = 'Fahrzeug-ID von Spritmonitor.de (Spritrechner)'; $lang['Spritmonid_explain'] = 'Nach dem Einloggen auf Spritmonitor.de ist die Fahrzeug-ID im Menü "Verbrauchsanzeige" zu finden'; $lang['Mileage'] = 'Verbrauch'; # #-----[ OPEN ]------------------------------------------ # includes/usercp_viewprofile.php # #-----[ FIND ]------------------------------------------ # $search = '' . sprintf($lang['Search_user_posts'], $profiledata['username']) . ''; # #-----[ AFTER, ADD ]------------------------------------------ # German: http://www.spritmonitor.de/de/detailansicht/ $spritmonimg = ( $profiledata['user_spritmonid'] ) ? '' : ''; # #-----[ FIND ]------------------------------------------ # 'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ', # #-----[ AFTER, ADD ]------------------------------------------ # 'SPRITMONID' => ( $profiledata['user_spritmonid'] ) ? $profiledata['user_spritmonid'] : ' ', 'SPRITMONIMG' => $spritmonimg, 'L_SPRITMONID' => $lang['Spritmonid'], 'L_MILEAGE' => $lang['Mileage'], # #-----[ OPEN ]------------------------------------------ # includes/usercp_register.php # #-----[ FIND ]--------------------------------------------------- # $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests'); # #-----[ IN-LINE FIND ]------------------------------------------ # 'interests' # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , 'spritmonid' => 'spritmonid' # #-----[ FIND ]------------------------------------------ # (2 times!!) $interests = stripslashes($interests); # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = stripslashes($spritmonid); # #-----[ FIND ]------------------------------------------ # $sql = "UPDATE " . USERS_TABLE . " # #-----[ IN-LINE FIND ]------------------------------------------ # $interests) . "' # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , user_spritmonid = '" . str_replace("\'", "''", $spritmonid) . "' # #-----[ FIND ]--------------------------------------------------- # $sql = "INSERT INTO " . USERS_TABLE . " # #-----[ IN-LINE FIND ]------------------------------------------ # user_interests # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , user_spritmonid # #-----[ FIND ]------------------------------------------ # VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_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, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, "; # #-----[ IN-LINE FIND ]------------------------------------------ # str_replace("\'", "''", $interests) . "' # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , '" . str_replace("\'", "''", $spritmonid) . "' # #-----[ FIND ]------------------------------------------ # $interests = $userdata['user_interests']; # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = $userdata['user_spritmonid']; # #-----[ FIND ]------------------------------------------ # display_avatar_gallery($mode, $avatar_category # #-----[ IN-LINE FIND ]------------------------------------------ # $interests # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , $spritmonid # #-----[ FIND ]------------------------------------------ # (2 times!!) 'INTERESTS' => $interests, # #-----[ AFTER, ADD ]------------------------------------------ # 'SPRITMONID' => ( $spritmonid ) ? $spritmonid : '', 'L_SPRITMONID' => $lang['Spritmonid'], 'L_SPRITMONID_EXPLAIN' => $lang['Spritmonid_explain'], # #-----[ FIND ]------------------------------------------ # validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature); # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = ( !ctype_digit($spritmonid) || ($spritmonid < 100000) ) ? 0 : $spritmonid; # #-----[ OPEN ]------------------------------------------ # includes/usercp_avatar.php # #-----[ FIND ]------------------------------------------ # function display_avatar_gallery($mode, &$category # #-----[ IN-LINE FIND ]------------------------------------------ # &$interests # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , &$spritmonid # #-----[ FIND ]------------------------------------------ # $params = array('coppa', 'user_id' # #-----[ IN-LINE FIND ]------------------------------------------ # 'dateformat' # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , 'spritmonid' # #-----[ OPEN ]------------------------------------------ # admin/admin_users.php # #-----[ FIND ]------------------------------------------ # $interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : ''; # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = ( !empty($HTTP_POST_VARS['spritmonid']) ) ? trim(strip_tags( $HTTP_POST_VARS['spritmonid'] ) ) : ''; # #-----[ FIND ]------------------------------------------ # (2 times!!) $interests = htmlspecialchars(stripslashes($interests)); # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = htmlspecialchars(stripslashes($spritmonid)); # #-----[ FIND ]------------------------------------------ # $sql = "UPDATE " . USERS_TABLE . " # #-----[ IN-LINE FIND ]------------------------------------------ # $interests) . "' # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , user_spritmonid = '" . str_replace("\'", "''", $spritmonid) . "' # #-----[ FIND ]------------------------------------------ # $interests = htmlspecialchars($this_userdata['user_interests']); # #-----[ AFTER, ADD ]------------------------------------------ # $spritmonid = htmlspecialchars($this_userdata['user_spritmonid']); # #-----[ FIND ]------------------------------------------ # $s_hidden_fields .= ''; # #-----[ AFTER, ADD ]------------------------------------------ # $s_hidden_fields .= ''; # #-----[ FIND ]------------------------------------------ # 'INTERESTS' => $interests, # #-----[ AFTER, ADD ]------------------------------------------ # 'SPRITMONID' => ( $spritmonid ) ? $spritmonid : '', 'L_SPRITMONID' => $lang['Spritmonid'], # #-----[ OPEN ]------------------------------------------ # viewtopic.php # #-----[ FIND ]------------------------------------------ # $poster_joined = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ''; # #-----[ AFTER, ADD ]------------------------------------------ # German: http://www.spritmonitor.de/de/detailansicht/ $poster_spritmonimg = ( $postrow[$i]['user_spritmonid'] ) ? '' : ''; # #-----[ FIND ]------------------------------------------ # 'POSTER_AVATAR' => $poster_avatar, # #-----[ AFTER, ADD ]------------------------------------------ # 'POSTER_SPRITMONIMG' => $poster_spritmonimg, # #-----[ 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 # #-----[ IN-LINE FIND ]------------------------------------------ # , u.user_from # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , u.user_spritmonid ############################################################################### # #-----[ OPEN ]------------------------------------------ # templates/subSilver/viewtopic_body.tpl # #-----[ FIND ]------------------------------------------ # {postrow.POSTER_NAME}
{postrow.POSTER_RANK}
{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}

{postrow.POSTER_JOINED}
{postrow.POSTER_POSTS}
{postrow.POSTER_FROM}

# #-----[ IN-LINE FIND ]------------------------------------------ #
{postrow.POSTER_FROM} # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ #
{postrow.POSTER_SPRITMONIMG} # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_add_body.tpl # #-----[ FIND ]------------------------------------------ # {L_INTERESTS}: # #-----[ AFTER, ADD ]------------------------------------------ # {L_SPRITMONID}:
{L_SPRITMONID_EXPLAIN} # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]------------------------------------------ # {L_INTERESTS}: {INTERESTS} # #-----[ AFTER, ADD ]------------------------------------------ # {L_MILEAGE}: {SPRITMONIMG} # #-----[ OPEN ]------------------------------------------ # templates/subSilver/admin/user_edit_body.tpl # #-----[ FIND ]------------------------------------------ # {L_INTERESTS} # #-----[ AFTER, ADD ]------------------------------------------ # {L_SPRITMONID} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM