vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] my mini profile mod help :) - View Topic (Page 1 of 2)Page: 1 2
Topic Rating: *****
Printable View
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.

Code:
 
  1. <center>
  2. <table border="1" width="130" bordercolor="black" cellpadding="2" cellspacing="0" id="mini_profile">
  3. <tr>
  4.  
  5. <td class="window1" align="center">{display_name}</td>
  6.  
  7. </tr>
  8. <tr>
  9. <td class="window1" align="center">
  10.  
  11. <script>
  12. var a = /(Administrator|Moderator|Global Moderator|Shelkra Clan Leader|Shelkra Clan Member|Eternus Clan Leader|Eternus Clan Member|Huyahikuro Clan Leader|Huyahikuro Clan Member|OD Clan Leader|OD Clan Member)/;
  13. var rank = '{rank_name}';
  14. if(rank.match(a)){
  15.     document.write('{rank_image}');
  16. }else{
  17.     document.write('{rank}');
  18. }
  19. </script>
  20.  
  21. {if:secondrygroup}<script>
  22. var a = /(Administrator|Moderator|Global Moderator|Shelkra Clan Leader|Shelkra Clan Member|Eternus Clan Leader|Eternus Clan Member|Huyahikuro Clan Leader|Huyahikuro Clan Member|OD Clan Leader|OD Clan Member)/;
  23. var rank = '{secondrygroup_name}';
  24. if(rank.match(a)){
  25.     document.write('{secondrygroup_image}');
  26. }else{
  27.     document.write('{rank}');
  28. }
  29. </script><br>{/if:secondrygroup}
  30. </td>
  31.  
  32. </tr>
  33. <tr>
  34. <td class="window1" align="center">
  35.  
  36. <script type="text/javascript">
  37. assign_rank('{display_name}', '{posts}');
  38. </script>
  39.  
  40. </td>
  41. </tr>
  42.  
  43. {if:warning}<td class="window1" align="center">{warning}<br /></td>{/if:warning}
  44.  
  45. </tr>
  46.  
  47. {if:custom_title}<tr>
  48. <td class="window1" align="center">{custom_title}</tr>{/if:custom_title}</td>{ifnot:custom_title}<font color=#000000></font>{/ifnot:custom_title}
  49.  
  50.  
  51. </table>
  52. <br>
  53. <table width=130>
  54. <tr>
  55. <td align="center">
  56.  
  57. {avatar}{ifnot:avatar}<font color=#000000><strong>No Avatar<strong></font>{/ifnot:avatar}
  58.  
  59. </td>
  60. </tr>
  61. <tr>
  62.  
  63. <td align="center">{personal_text}</td>
  64.  
  65. </tr>
  66. </table>
  67. <br>
  68. <table border="1" width="130" bordercolor="black" cellpadding="2" cellspacing="0" id="mini_profile">
  69.  
  70. <tr>
  71. <td class="window1">Posts: {posts}</td>
  72. </tr>
  73. <tr>
  74. <td class="window1">
  75.  
  76. {if:online}
  77. Status: <b><font color=blue>Online</font></b>
  78. {/if:online}
  79. {ifnot:online}
  80. Status: <font color=red>Offline</font>
  81. {/ifnot:online}
  82.  
  83. </td>
  84. </tr>
  85. <tr>
  86.  
  87. {if:gender}<td class="window1">Gender: {gender}{/if:gender}
  88.  
  89. </td>
  90. </tr>
  91. </table><br>
  92. <table border=1 width=130 bordercolor=black cellpadding=2 cellspacing=0>
  93. <tr>
  94. <td class="window1" align="center">
  95.  
  96. ~Forum Data~</td>
  97.  
  98. </tr>
  99.  
  100. {if:additional_info}<tr><td class="window1" align="center">{additional_info}</td>
  101. </tr>{/if:additional_info}
  102.  
  103.  
  104. </table>
  105.  
  106. <br>
  107.  
  108. {contact}
  109. </center>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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! {Smile}

(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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: my mini profile mod help :) (3rd Apr 08 at 2:17am UTC)
Can yo show me what you mean?
dog199200
Guest
Re: my mini profile mod help :) (3rd Apr 08 at 2:18am UTC)
http://omegabloodlust.virtualforums.co.uk/action/view_profile/user/flametf/

i think it might be do to the Staff Has Normal Ranks code, so that might have to be modded to remove that now that i think about it
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: my mini profile mod help :) (3rd Apr 08 at 2:21am UTC)
Indeed it is! {Unsure}
dog199200
Guest
Re: my mini profile mod help :) (3rd Apr 08 at 2:23am UTC)
could you please edit the code {Smile}

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. var ranks = Array(); var r=0;
  4.  
  5. ranks[r++] = Array(0, 'New Blood', 1, 'http://s4.images.proboards.com/star.gif');
  6. ranks[r++] = Array(75, 'Vast Hunter', 2, 'http://s4.images.proboards.com/star.gif');
  7. ranks[r++] = Array(150, 'Junior Hunter', 3, 'http://s4.images.proboards.com/star.gif');
  8. ranks[r++] = Array(300, 'Assassin', 4, 'http://s4.images.proboards.com/star.gif');
  9. ranks[r++] = Array(500, 'Dark Knight', 5, 'http://s4.images.proboards.com/star.gif');
  10. ranks[r++] = Array(800, 'Blood Lord', 4, 'http://virtualforums.co.uk/images/red_star.gif');
  11. ranks[r++] = Array(1250, 'Supreme God', 5, 'http://virtualforums.co.uk/images/red_star.gif');
  12.  
  13. function assign_rank(display_name, posts) {
  14. if(!display_name.match(/group(0|$)/i)) {
  15. posts = parseInt(posts.replace(/,/g, ''));
  16. r = 0;
  17. while(ranks[r] && ranks[r][0] < posts) {
  18. r++;
  19. }
  20. if(r > 0)
  21. r--;
  22. var rank_str = "" + ranks[r][1] + "<br />";
  23. for(c=0; c<ranks[r][2]; c++) {
  24. rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" />";
  25. }
  26. document.write(rank_str);
  27. }
  28. }
  29. //-->
  30. </script>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: my mini profile mod help :) (3rd Apr 08 at 2:43am UTC)
Recopy again! {Tongue Out}
dog199200
Guest
Re: my mini profile mod help :) (3rd Apr 08 at 2:46am UTC)
: ) ty
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 12:28am
Page generated in 1.8218 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums