codezwiz Second Rank Mod Issue

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   codezwiz Second Rank Mod Issue
CurtisH
CZ Active Member
 Codezwiz Site Donator
CurtisH has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Gender: Male
Status: Offline
Joined: Jun 14, 2004
0.01 posts per day
Posts: 112
Points: 5,900
AIM Address Yahoo Messenger  
Deleted by author




_________________
PHP-Nuke and ALL software and/or themes coded to be used with PHP-Nuke are GPL and are FREE to redistribute regardless of what an author may claim.
Back to top Reply with quote
#2   re: codezwiz Second Rank Mod Issue
Refiner
CZ Newbie
 Codezwiz Site Donator
Refiner has been a member for over 19 year's 19 Year Member
usa.gif washington.gif
Occupation: Student
Gender: Female
Website:
Status: Offline
Joined: Aug 31, 2005
0.00 posts per day
Posts: 18
Points: 2,372
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Guess they didn't have an answer here .... CurtisH

In case anyone else is interested, we have a solution [ Register or login to view links on this board.]



Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Hmmm i have just installed on a test site and it works perfectly. Did you make sure you made all the changes correctly?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: codezwiz Second Rank Mod Issue
Refiner
CZ Newbie
 Codezwiz Site Donator
Refiner has been a member for over 19 year's 19 Year Member
usa.gif washington.gif
Occupation: Student
Gender: Female
Website:
Status: Offline
Joined: Aug 31, 2005
0.00 posts per day
Posts: 18
Points: 2,372
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Telli, thanks for your reply....

The answer to your question is yes.

The problem encounted was that a few of us wanted to have the first rank be the one that increments with the posts (like mine here) and the second rank be a special rank, but when the 2nd rank was selected as a special rank the 1st rank disappeared.

Here is the code that resolved the problem

*
* [find]
*[color=#444444] [/color][color=darkred] [/color][color=red] [/color]

  //
   // Generate ranks, set them to empty string initially.
   //
   $poster_rank = '';
   $rank_image = '';
   if ( $postrow[$i]['user_id'] == ANONYMOUS )
   {
   }
   else if ( $postrow[$i]['user_rank'] )
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
         {
            $poster_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
         }
      }
   }
   //
   // Rank 2 Begin
   //
   $poster_rank2 = '';
   $rank2_image = '';
   if ( $postrow[$i]['user_id'] == ANONYMOUS )
   {
   }
   else if ( $postrow[$i]['user_rank2'] )
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_rank2'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
         {
            $poster_rank2 = $ranksrow[$j]['rank_title'];
            $rank2_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank2 . '" title="' . $poster_rank2 . '" border="0" /><br />' : '';
         }
      }
   }
   //
   // Rank 2 End
   //
   else
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
         {
            $poster_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
         }
      }
   }

*
* [replace with]
*

   //
   // Generate ranks, set them to empty string initially.
   //
   $poster_rank = '';
   $rank_image = '';
   if ( $postrow[$i]['user_id'] == ANONYMOUS )
   {
   }
   else if ( $postrow[$i]['user_rank'] )
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
         {
            $poster_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
         }
      }
   }
   else
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
         {
            $poster_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
         }
      }
   }
   //
   // Rank 2 Begin
   //
   $poster_rank2 = '';
   $rank2_image = '';
   if ( $postrow[$i]['user_id'] == ANONYMOUS )
   {
   }
   else if ( $postrow[$i]['user_rank2'] )
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $postrow[$i]['user_rank2'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
         {
            $poster_rank2 = $ranksrow[$j]['rank_title'];
            $rank2_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank2 . '" title="' . $poster_rank2 . '" border="0" /><br />' : '';
         }
      }
   }
   //
   // Rank 2 End
   //


I'm not sure, but the difficulties may have been version related or from conflicts with other installed MODs


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum