[3.0.7] Extra Ranks Mod 1.1.0

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

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 01:22

Hi Frans! :)

Thanks for fixing up the mod guys.

I tried it and did everything on a 3.0.7 release. Only a white / blank page comes up (no error). Any ideas on the error?

Your thoughts please...
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male


Re: [FINAL] Extra Ranks Mod 1.0.5

Postby Fastboy42 » 04 Mar 2010, 01:31

Tried refreshing style, purging cache etc?
Fastboy42    
Cadet I
Cadet I
 
Posts: 13
Joined: 05 Dec 2009, 22:40
Gender: Male
phpBB Knowledge: 5

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 01:34

I can't get in the acp to refresh the style because as soon as I refresh the page on the domain it only shows a white blank page.

I have tried erasing the cache contents folder via ftp though (except for .htaccess and *.html file)... same results :(

PhpBB 3.0.7, Board3 portal, user feedback are loaded on the site by the way.
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby Fastboy42 » 04 Mar 2010, 01:41

Do you use automod by any chance? And did you make any backups before modding?
Fastboy42    
Cadet I
Cadet I
 
Posts: 13
Joined: 05 Dec 2009, 22:40
Gender: Male
phpBB Knowledge: 5

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 01:48

I did the mod manually. Yes, I have a backup so no worries. But having this mod on the site will be a main feature later on. :(
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby ..::Frans::.. » 04 Mar 2010, 01:53

@CityState: do you get an error if you remove the 2 comments from the debug and debugextra lines inside the config file ?
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: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 07:06

HI Frans! I decided to reload to the old good working forum (without the USER FEEDBACK MOD) and will start again. :)

I'm confident enough in your work to ask for code errors without doing it again, cleanslate. :) Haha!

Hope all is well Frans! I'll check in again later when I'm done remodding after dinner.

Just one question though... Do I need to do all three text file mods or just the "Extra Rank Mod 105"?


Ok updating as I go by the mod "Extra Ranks Mod 1.5"...

1.
My code in memberslist.php (original from forum version 3.0.7)
Code: Select all
$rank_title = $rank_img = '';
         get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);


The code being asked to FIND is not the same:
Code: Select all
$rank_title = $rank_img = '';
         get_user_rank($row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);


But I still add these below it:
Code: Select all
$rank2_title = $rank2_img = $rank2_img_src = '';
         $rank3_title = $rank3_img = $rank2_img_src = '';
            get_user_rank2($row['user_rank2'],  $rank2_title, $rank2_img, $rank2_img_src);
            get_user_rank3($row['user_rank3'], $rank3_title, $rank3_img, $rank3_img_src);



Being asked to FIND:
Code: Select all
$rank_title = $rank_img = $rank_img_src = '';
   get_user_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src);


But my original code is:
Code: Select all
$rank_title = $rank_img = $rank_img_src = '';
   get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);


I still add this code underneath:
Code: Select all
$rank2_title = $rank2_img = $rank2_img_src = '';
   $rank3_title = $rank3_img = $rank2_img_src = '';
    get_user_rank2($data['user_rank2'],  $rank2_title, $rank2_img, $rank2_img_src);
    get_user_rank3($data['user_rank3'], $rank3_title, $rank3_img, $rank3_img_src);


After upload, forum still OK. :)



2.
In memberslist_view.html

I'm asked to FIND:
Code: Select all
<!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
         <!-- IF RANK_IMG --><dt>{L_RANK}:</dt><dd>{RANK_IMG}</dd><!-- ENDIF -->


But my original code is:
Code: Select all
<!-- IF RANK_TITLE --><dt>{L_RANK}:</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
         <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->


I add these lines below the code anyways:
Code: Select all
<!-- IF RANK2_TITLE --><dt>{L_RANK}:</dt><dd>{RANK2_TITLE}</dd><!-- ENDIF -->
          <!-- IF RANK2_IMG --><dt>{L_RANK}:</dt><dd>{RANK2_IMG}</dd><!-- ENDIF -->
          <!-- IF RANK3_TITLE --><dt>{L_RANK}:</dt><dd>{RANK3_TITLE}</dd><!-- ENDIF -->
          <!-- IF RANK3_IMG --><dt>{L_RANK}:</dt><dd>{RANK3_IMG}</dd><!-- ENDIF -->


After upload, the forum is still OK. :)
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 10:25

OK... I was supposed to add this to my post above but I couldn't see the "edit" button anymore. :)

Doing the final mod regarding groups...


I was being asked to find this code:
Code: Select all
// Do the SQL thang
      $sql = 'SELECT g.group_id, g.group_name, g.group_type
         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_options = '';
      while ($row = $db->sql_fetchrow($result))
      {
         $group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $member['group_id']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
      }
      $db->sql_freeresult($result);



But my original code is:
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 replaced it with this anyway:
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);



I got these errors after uploading... (only in the member lookup page - the page that loads when you click a name)
[phpBB Debug] PHP Notice: in file /memberlist.php on line 479: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4296: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4298: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4299: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4300: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)



Any help from the gang would mostly be appreciated. :)


New inquiries:
1. Also, how do I get to "automatically" show the ranks in the viewtopic pages without having to manually activate the ranks via the user-rank page via acp? Is it possible to hae the rank show as soon as I add the member to a group that has the rank logo?
e.g. If member ADMIN is a member of a group named SOLO, with an image named SOLO, how do I get to have the image SOLO show automatically? So when ADMIN leaves the group, the group logo / rank is not shown.

2. Please pardon me for asking this... How do I get to choose if only the name, image, or both details of the rank is shown? :) Can't find it in ACP.

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

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby CityState » 04 Mar 2010, 13:37

Also, after using the forum for a while.... I noticed that the ranks shows twice in the post page, under the avatar.
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: [FINAL] Extra Ranks Mod 1.0.5

Postby ..::Frans::.. » 04 Mar 2010, 14:54

Now, i need some time to check this but some other projects are currently more urgent (and even over here every day has only 24 hrs)

I will try and have a look tomorrow morning if i can update the code to 3.0.7 and see what's going wrong but can''t promise that.....
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

PreviousNext

Return to Topic, Forum, Posting MOD Downloads

Who is online

Users browsing this forum: Ezooms Bot and 3 guests