[3.0.7] Extra Ranks Mod 1.1.0

Viewtopic, viewforum, posting related hacks and MODs.
Viewing topics, forums, or posting add-ons.

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 13 Mar 2010, 00:15

LOL! :lol: Sorry abt that noob code weelie... HAhahaha!

But how come when this code is there, viewtopic has 2 set of extra ranks showing? :scratch:
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male


Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby Sniper_E » 13 Mar 2010, 00:35

You must be using that Echo Style. :lol:
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6986
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby ..::Frans::.. » 13 Mar 2010, 02:53

thanks ed, that was my coffee that came out........ :lol:
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby ..::Frans::.. » 13 Mar 2010, 02:54

CityState wrote:LOL! :lol: Sorry abt that noob code weelie... HAhahaha!

But how come when this code is there, viewtopic has 2 set of extra ranks showing? :scratch:



Send me the viewtopic_body.html please...
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 13 Mar 2010, 02:59

Pm sent... Thanks Frans!
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 13 Mar 2010, 23:13

Thanks Frans for your help. :yahoo:

After testing how the extra ranks work with the group ranks, below are my observations:
- group ranks will automatically show a rank image under your original rank if you set it in ACP
- extra ranks can be placed anywhere you like in the profile area
- make sure your extra ranks are not used in any of the previous rank tables: original ranks and group ranks
* If you use the same rank image with an extra rank and a group rank, they will show twice if you set them both on
- group ranks will stack below the other as your group affiliations increase

Hope this helps. :)
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 15 Mar 2010, 13:24

I'm doing this on subsilver2 3.0.7 pl1 memberslist.php and i get this error when I replace the original code with the one in the text file mod instructions.

error:
Code: Select all
[phpBB Debug] PHP Notice: in file /memberlist.php on line 483: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4323: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3514)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4325: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3514)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4326: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3514)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4327: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3514)


This is what my original code says:
Spoiler:
Code: Select all
// Do the SQL thang
      $sql = 'SELECT g.group_id, g.group_name, g.group_type, ug.user_id
         FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
         WHERE ' . $db->sql_in_set('ug.user_id', $sql_uid_ary) . '
            AND g.group_id = ug.group_id
            AND ug.user_pending = 0';
      $result = $db->sql_query($sql);

      // Divide data into profile data and current user data
      $profile_groups = $user_groups = array();
      while ($row = $db->sql_fetchrow($result))
      {
         $row['user_id'] = (int) $row['user_id'];
         $row['group_id'] = (int) $row['group_id'];

         if ($row['user_id'] == $user_id)
         {
            $profile_groups[] = $row;
         }
         else
         {
            $user_groups[$row['group_id']] = $row['group_id'];
         }
      }
      $db->sql_freeresult($result);



I'm being asked to find this code, which is not similar to the code above:
Code: Select all
// Do the SQL thang
      $sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_rank, g.group_legend
         FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
         WHERE ug.user_id = $user_id
            AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
            AND ug.user_pending = 0
         ORDER BY g.group_type, g.group_name';
      $result = $db->sql_query($sql);

        $group_ranks = '';

      while ($row = $db->sql_fetchrow($result))
      {
                //The next option has 3 settings:
                // 1: Show only rank images
                // 2: Show only TEXT titles
                // 3: Show both
                $group_rank_switch = 3;
                if($row['group_legend'] == 1)
                {
                    $group_url = append_sid($phpbb_root_path.'memberlist.'.$phpEx.'?mode=group&amp;g='.$row['group_id']);
                    if($group_rank_switch <> 1)
                    {
                        $group_ranks .= (isset($ranks['special'][$row['group_rank']]['rank_title'])) ? '<a href="'.$group_url.'">'.$ranks['special'][$row['group_rank']]['rank_title'].'</a><br />' : '<br />';
                    }
                    if($group_rank_switch <> 2)
                    {
                        $group_ranks .= (!empty($ranks['special'][$row['group_rank']]['rank_image'])) ? '<a href="'.$group_url.'"><img src="' . $config['ranks_path'] . '/' . $ranks['special'][$row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$row['group_rank']]['rank_title'] . '" /></a><br />' : '<br />';
                    }
                }
      }
      $db->sql_freeresult($result);


This is what is being asked to replace the original code:
Code: Select all
// Do the SQL thang
      $sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_rank, g.group_legend
         FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
         WHERE ug.user_id = $user_id
            AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
            AND ug.user_pending = 0
         ORDER BY g.group_type, g.group_name';
      $result = $db->sql_query($sql);

        $group_ranks = '';

      while ($row = $db->sql_fetchrow($result))
      {
                //The next option has 3 settings:
                // 1: Show only rank images
                // 2: Show only TEXT titles
                // 3: Show both
                $group_rank_switch = 3;
                if($row['group_legend'] == 1)
                {
                    $group_url = append_sid($phpbb_root_path.'memberlist.'.$phpEx.'?mode=group&amp;g='.$row['group_id']);
                    if($group_rank_switch <> 1)
                    {
                        $group_ranks .= (isset($ranks['special'][$row['group_rank']]['rank_title'])) ? '<a href="'.$group_url.'">'.$ranks['special'][$row['group_rank']]['rank_title'].'</a><br />' : '<br />';
                    }
                    if($group_rank_switch <> 2)
                    {
                        $group_ranks .= (!empty($ranks['special'][$row['group_rank']]['rank_image'])) ? '<a href="'.$group_url.'"><img src="' . $config['ranks_path'] . '/' . $ranks['special'][$row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$row['group_rank']]['rank_title'] . '" /></a><br />' : '<br />';
                    }
                }
      }
      $db->sql_freeresult($result);


How can I have my personal profile show my group ranks (in memberslist.php as above and in memberslist_body.html? :)

Thanks much!
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 18 Mar 2010, 14:56

Guys, if you have an updated memberslist mod to show the group ranks for a 3.0.7 forum, please do post it here. The memberslist mod included the Extra Ranks Mod 105 file is no longer applicable to the latest prosilver / subsilver styles.

Thanks much!
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby Sir Glen » 25 Mar 2010, 22:48

I installed this mod, and there is a big error, but I can't figure out what it is. Basically now when I got to the ACP and click on the "Users and Groups" tab I get a blank white page. Literally blank. No errors or anything.
Sir Glen
Supporter
Supporter
 
Posts: 235
Joined: 21 Jun 2008, 20:19
Gender: Male
phpBB Knowledge: 2

Re: [3.0.7] Extra Ranks Mod 1.1.0

Postby CityState » 26 Mar 2010, 09:16

Did you do all of the coding manually? It's better than way to back track easier. What versoin of phpbb are you using and can you still upload your old files (ones that you had before editing)?

Then redo the mod. You get a white page if you have errors and your "show errors" config is off.
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

PreviousNext

Return to Topic, Forum, Posting MOD Downloads

Who is online

Users browsing this forum: No registered users and 4 guests