############################################################## ## MOD Title: ROSTER integration ## MOD Author: p00ks < p00ks@straydreamers.com > ## MOD Description: Integrating WowRoster with phpBB ## MOD Version: 0.1.0 ## ## Installation Level: (Easy) ## Installation Time: 15 Minutes ## Files To Edit: viewtopic.php, ## memberlist.php, ## includes/usercp_viewprofile.php, ## templates/*/viewtopic_body.tpl, ## templates/*/view_profile_body.tpl, ## templates/*/memberlist.tpl ## ## Included Files: N/A ############################################################## ## Author Notes: I wanted to display information from the ROSTER on my ## phpBB forum. Requires one common sql for both ROSTER and ## phpBB and that users register with their character's name. ## WoW Roster: http://www.wowroster.net/ ## ############################################################## ## MOD History: ## ## 2006-04-20 - Version 0.1.0 ## - Initial version ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD!! ## I am not an expert at this, so be careful what you do!! ############################################################## # #-----[ OPEN viewtopic.php ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # // // Again this will be handled by the templating // code at some point // # #-----[ BEFORE, ADD ]------------------------------------------ # // // Get Roster Data. // $char_name = ''; $char_rank = ''; $char_lvl = ''; $char_class = ''; $char_sql = "SELECT `name`, `guild_title`, `class`, `level` FROM roster_members WHERE `name` = '$poster'"; if( !($char_result = $db->sql_query($char_sql)) ) message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql); $char_row = $db->sql_fetchrow($char_result); $db->sql_freeresult($char_result); $char_name = $char_row['name']; $char_rank = $char_row['guild_title']; $char_lvl = $char_row['level']; $char_class= $char_row['class']; # #-----[ FIND ]------------------------------------------ # 'EDITED_MESSAGE' => $l_edited_by, # #-----[ AFTER, ADD ]------------------------------------------ # //WoW roster MOD: 'CHAR_NAME' => $char_name, 'CHAR_RANK' => $char_rank, 'CHAR_LVL' => $char_lvl, 'CHAR_CLASS'=> $char_class, //------------------ # #-----[ OPEN memberlist.php ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # 'L_PM' => $lang['Private_Message'], # #-----[ AFTER, ADD ]------------------------------------------ # // WOW MOD 'L_LVL' => $lang['Level'], 'L_CLASS' => $lang['Class'], 'L_RANK' => $lang['Guild Rank'], // WOW MOD # #-----[ FIND ]------------------------------------------ # $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; # #-----[ AFTER, ADD ]------------------------------------------ # // // Get Roster Data. // $char_name = ''; $char_rank = ''; $char_lvl = ''; $char_class = ''; $char_race = ''; $char_sql = "SELECT `name`, `class`, `guild_title`, `level` FROM roster_members WHERE `name` = '$username'"; if( !($char_result = $db->sql_query($char_sql)) ) message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql); $char_row = $db->sql_fetchrow($char_result); $db->sql_freeresult($char_result); $char_name = $char_row['name']; $char_rank = $char_row['guild_title']; $char_lvl = $char_row['level']; $char_class= $char_row['class']; // // Get image from your Roster folder. // Change path if your roster is not in ../roster/ // $class_img = ( $char_row['class'] ) ? '' . $char_class . '' : ''; # #-----[ FIND ]------------------------------------------ # 'YIM' => $yim, # #-----[ AFTER, ADD ]------------------------------------------ # //WoW characters MOD: 'CHAR_NAME' => $char_name, 'CHAR_RANK' => $char_rank, 'CHAR_LVL' => $char_lvl, 'CHAR_CLASS'=> $char_class, 'CLASS_IMG' => $class_img, //------------------ # #-----[ OPEN includes/usercp_viewprofile.php ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # // // Generate page // # #-----[ BEFORE, ADD ]------------------------------------------ # // // Get this person's main WoW character information, and display it underneath their user info. // $postername = $profiledata['username']; $char_name = ''; $char_rank = ''; $char_lvl = ''; $char_class = ''; $char_race = ''; $char_sql = "SELECT `name`, `class`, `guild_title`, `level` FROM roster_members WHERE `name` = '$postername'"; if( !($char_result = $db->sql_query($char_sql)) ) message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql); $char_row = $db->sql_fetchrow($char_result); $db->sql_freeresult($char_result); $char_name = $char_row['name']; $char_rank = $char_row['guild_title']; $char_lvl = $char_row['level']; $char_class= $char_row['class']; # #-----[ FIND ]------------------------------------------ # 'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage), # #-----[ AFTER, ADD ]------------------------------------------ # //WoW characters MOD: 'CHAR_NAME' => $char_name, 'CHAR_RANK' => $char_rank, 'CHAR_LVL' => $char_lvl, 'CHAR_CLASS'=> $char_class, //------------------ # #-----[ OPEN language/lang_engl/lang_main.php ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # // // That's all, Folks! // ------------------------------------------------- # #-----[ BEFORE, ADD ]------------------------------------------ # // WOW MOD $lang['Level'] = 'Level'; $lang['Class'] = 'Class'; $lang['Rank'] = 'Rank'; # #-----[ OPEN templates/SubSilver/view_profile_body.tpl ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # {L_INTERESTS}: {INTERESTS} # #-----[ AFTER, ADD ]------------------------------------------ # # Change the &server=xxxxxx to your server name. In my case, for cenarion circle its: &server=Cenarion%20Circle #     Guild Rank: {CHAR_RANK} {USERNAME} Character Information: Class: {CHAR_CLASS} Level: {CHAR_LVL}   View More Information
(requires Character Profiler upload) # #-----[ 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}

# #-----[ FIND ]------------------------------------------ # # Tags are: {postrow.CHAR_CLASS}, {postrow.CHAR_LVL} and {postrow.CHAR_RANK} # {postrow.POSTER_NAME}
{postrow.CHAR_RANK}

{postrow.POSTER_RANK}
{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}

Level {postrow.CHAR_LVL} {postrow.CHAR_CLASS}
{postrow.POSTER_JOINED}
{postrow.POSTER_POSTS}
{postrow.POSTER_FROM}

# #-----[ OPEN templates/SubSilver/memberlist.tpl ]------------------------------------------ # # #-----[ FIND ]------------------------------------------ # {L_EMAIL} # #-----[ AFTER, ADD ]------------------------------------------ # {L_RANK} {L_LVL} {L_CLASS} # #-----[ FIND ]------------------------------------------ #  {memberrow.EMAIL_IMG}  # #-----[ AFTER, ADD ]------------------------------------------ # {memberrow.CHAR_RANK} {memberrow.CHAR_LVL} {memberrow.CLASS_IMG} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM