Here is the mod, can someone help me add it to album_showpage.php?
Code: [Hide]
- ## EasyMod 0.0.7 compliant
- ##############################################################
- ## MOD Title: Groups on Viewtopic
- ## MOD Author: onyxraven < onyxraven@eqii.com > (Justin Hart) http://www.eqii.com
- ## MOD Description: This mod (based on the usergroups in profile mod) shows the non-hidden groups a user is a member of with each post
- ## MOD Version: 1.0.0
- ##
- ## Installation Level: Easy
- ## Installation Time: 3 minutes.
- ## Files To Edit: language/lang_english/lang_main.php
- ## viewtopic.php
- ## templates/subSilver/viewtopic_body.tpl
- ## Included Files:
- ##############################################################
- ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
- ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
- ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
- ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
- ##############################################################
- ## Author Notes: I use this mod to allow status for donators and other leaders throughout the boards.
- ##############################################################
- ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
- ##############################################################
- #
- #-----[ OPEN ]------------------------------------------
- #
- language/lang_english/lang_main.php
- #
- #-----[ FIND ]------------------------------------------
- #
- $lang['Posts'] = 'Posts';
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
- $lang['GroupMemberOf'] = 'Member of';
- #
- #-----[ OPEN ]------------------------------------------
- #
- viewtopic.php
- #
- #-----[ FIND ]------------------------------------------
- #
- $poster_posts = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : '';
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
- //Get the groups user is a member of, non hidden
- $poster_groups ='';
- $group_sql = "SELECT g.group_name, g.group_id FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
- WHERE ug.user_id = '" . $poster_id . "'
- AND g.group_id = ug.group_id
- AND g.group_single_user <> " . TRUE . "
- AND ug.user_pending <> ".TRUE . " AND g.group_type <> '".GROUP_HIDDEN."'
- ORDER BY g.group_name";
- if(!$group_result = $db->sql_query($group_sql))
- message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $group_sql);
- if($group_list = $db->sql_fetchrowset($group_result))
- {
- $poster_groups .= $lang['GroupMemberOf'] . ":<br />";
- for($j = 0; $j < count($group_list); $j++)
- $poster_groups .= ' && <a href="' . append_sid("groupcp.$phpEx?g=".$group_list[$j]['group_id']).'"><span class="postdetails">'.$group_list[$j]['group_name'].'</span></a><br />';
- }
- #
- #-----[ FIND ]------------------------------------------
- #
- 'POSTER_POSTS' => $poster_posts,
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
- 'POSTER_GROUPS' => $poster_groups,
- #
- #-----[ OPEN ]------------------------------------------
- #
- templates/subSilver/viewtopic_body.tpl
- #
- #-----[ FIND ]------------------------------------------
- #
- <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span>
- #
- #-----[ IN-LINE FIND ]------------------------------------------
- #
- {postrow.POSTER_AVATAR}<br />
- #
- #-----[ IN-LINE AFTER, ADD ]------------------------------------------
- #
- {postrow.POSTER_GROUPS}
- #
- #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
- #
- # EoM