vForums Support :: Programming & Coding :: Code Requests & Support :: [F] my mini profile mod help :) - View Topic (Page 1 of 2)
 |  |
| This topic was locked 3rd Apr 08 at 2:48am by Michael | dog199200 Guest | [F] my mini profile mod help :) (3rd Apr 08 at 2:07am UTC) | | Can someone please help me, out i am having problems getting my mini-profile mod to where if the stat aint there the table area doesn't show up.
| |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:08am UTC) | | You need to use the tags: {if:additional_info}{/if:additional_info}
Put the table tag in between those!
(just double check those though!!) | |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:14am UTC) | | ok taht was fix, but i have one more that i can see, when the person isn't in a member group there is a box under their rank, how can i fix that one? | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:17am UTC) | | Can yo show me what you mean? | |
| dog199200 Guest | | Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:21am UTC) | | Indeed it is! | |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:23am UTC) | | could you please edit the code
 Code: - <script type="text/javascript">
- <!--
- var ranks = Array(); var r=0;
-
- ranks[r++] = Array(0, 'New Blood', 1, 'http://s4.images.proboards.com/star.gif');
- ranks[r++] = Array(75, 'Vast Hunter', 2, 'http://s4.images.proboards.com/star.gif');
- ranks[r++] = Array(150, 'Junior Hunter', 3, 'http://s4.images.proboards.com/star.gif');
- ranks[r++] = Array(300, 'Assassin', 4, 'http://s4.images.proboards.com/star.gif');
- ranks[r++] = Array(500, 'Dark Knight', 5, 'http://s4.images.proboards.com/star.gif');
- ranks[r++] = Array(800, 'Blood Lord', 4, 'http://virtualforums.co.uk/images/red_star.gif');
- ranks[r++] = Array(1250, 'Supreme God', 5, 'http://virtualforums.co.uk/images/red_star.gif');
-
- function assign_rank(display_name, posts) {
- if(!display_name.match(/group(0|$)/i)) {
- posts = parseInt(posts.replace(/,/g, ''));
- r = 0;
- while(ranks[r] && ranks[r][0] < posts) {
- r++;
- }
- if(r > 0)
- r--;
- var rank_str = "" + ranks[r][1] + "<br />";
- for(c=0; c<ranks[r][2]; c++) {
- rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" />";
- }
- document.write(rank_str);
- }
- }
- //-->
- </script>
| |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:28am UTC) | | ok replace: <tr> <td class="window1" align="center"> <script type="text/javascript"> assign_rank('{display_name}', '{posts}'); </script> </td></tr>
with: <script type="text/javascript"> assign_rank('{display_name}', '{posts}'); </script>
then use this for the 'assign_rank' code...
<script type="text/javascript"> <!-- var ranks = Array(); var r=0;
ranks[r++] = Array(0, 'New Blood', 1, 'http://s4.images.proboards.com/star.gif'); ranks[r++] = Array(75, 'Vast Hunter', 2, 'http://s4.images.proboards.com/star.gif'); ranks[r++] = Array(150, 'Junior Hunter', 3, 'http://s4.images.proboards.com/star.gif'); ranks[r++] = Array(300, 'Assassin', 4, 'http://s4.images.proboards.com/star.gif'); ranks[r++] = Array(500, 'Dark Knight', 5, 'http://s4.images.proboards.com/star.gif'); ranks[r++] = Array(800, 'Blood Lord', 4, 'http://virtualforums.co.uk/images/red_star.gif'); ranks[r++] = Array(1250, 'Supreme God', 5, 'http://virtualforums.co.uk/images/red_star.gif');
function assign_rank(display_name, posts) { if(!display_name.match(/group(0|$)/i)) { posts = parseInt(posts.replace(/,/g, '')); r = 0; while(ranks[r] && ranks[r][0] < posts) { r++; } if(r > 0) r--; var rank_str = "<tr><td class=\"window1\" align=\"center\">" + ranks[r][1] + "<br />"; for(c=0; c<ranks[r][2]; c++) { rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" /></tr></td>"; } document.write(rank_str); } } //--> </script> | |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:32am UTC) | | doesn't work... | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:35am UTC) | | what happens?
| |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:37am UTC) | | nothing...the box is gone, but as well nothing else shows up | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:39am UTC) | | Recopy the assign_rank code from my above post:) | |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:41am UTC) | | it kind of works..it shows the rank image, but not the rank title. | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: my mini profile mod help :) (3rd Apr 08 at 2:43am UTC) | | Recopy again! | |
| dog199200 Guest | Re: my mini profile mod help :) (3rd Apr 08 at 2:46am UTC) | | : ) ty | |
| |
 |  |
|