############################################################## ## MOD Title: Display Last Forum Posted In ## MOD Author: battye < N/A > (N/A) http://www.online-scrabble.com ## MOD Description: Displays the last forum a user posted in on their view profile page. ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## Installation Time: 3 Minutes ## Files To Edit: /includes/usercp_viewprofile.php, language/lang_english/lang_main.php, templates/subSilver/profile_view_body.tpl ## Included Files: (N/A) ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: Example http://forums.cricketmx.com/profile.php?mode=viewprofile&u=232 ############################################################## ## MOD History: ## ## 2007-07-18 - Version 1.0.0 ## - First version. ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # includes/usercp_viewprofile.php # #-----[ FIND ]------------------------------------------ # $search = '' . sprintf($lang['Search_user_posts'], $profiledata['username']) . ''; # #-----[ AFTER ADD ]------------------------------------------ # // Last forum posted in $lfp_sql = "SELECT forum_id, post_time, poster_id FROM " . POSTS_TABLE . " WHERE poster_id = " . $profiledata['user_id'] . " ORDER BY post_time DESC"; if(!($lfp_result = $db->sql_query($lfp_sql))) { message_die(GENERAL_ERROR, '', 'Could not obtain post data', __LINE__, __FILE__); } $lfp_row = $db->sql_fetchrow($lfp_result); $lfp_forum_id = intval($lfp_row['forum_id']); $lfp_forum_sql = "SELECT forum_name, forum_id FROM " . FORUMS_TABLE . " WHERE forum_id = " . $lfp_forum_id; if(!($lfp_forum_result = $db->sql_query($lfp_forum_sql))) { message_die(GENERAL_ERROR, '', 'Could not obtain forum data', __LINE__, __FILE__); } $lfp_forum_sql_row = $db->sql_fetchrow($lfp_forum_result); $lfp_forum_name = '' . $lfp_forum_sql_row['forum_name'] . ''; # #-----[ FIND ]------------------------------------------ # 'USERNAME' => $profiledata['username'], # #-----[ BEFORE ADD ]------------------------------------------ # // Last Forum Posted In 'LFP_FORUM' => $lfp_forum_name, 'L_LFP' => $lang['LFP_Last'], # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # // // That's all, Folks! // ------------------------------------------------- # #-----[ BEFORE ADD ]------------------------------------------ # $lang['LFP_Last'] = 'Last forum posted in'; # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]------------------------------------------ # {L_INTERESTS}: {INTERESTS} # #-----[ AFTER ADD ]------------------------------------------ # {L_LFP}: {LFP_FORUM} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM