Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
ashkir Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/W9M-tej.gif) Posts: 1,159 Status: Offline Gender: Male Location: Cali! Age: 36 Joined:
pmskypemsnyahoo | Re: Groups and Ranks (23rd Sep 08 at 5:10pm UTC) | | Wouldn't a thread or something in the general rules / information be good for the rank listing and posts required? | |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
dog199200 Guest | Re: Groups and Ranks (26th Sep 08 at 1:41am UTC) | | ah ok, so meaning you wnat it to show the ranks even if the member is in group? If so then I have the code you need on one of my forums, i'll just have to fish it out for you | |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
dog199200 Guest | Re: Groups and Ranks (27th Sep 08 at 7:26pm UTC) | | OK i think mine has been modified a bit from the original version that could of been found on PBS, so if it doesnt work please let me know.
Mini Profile Template Portion:
 Code: - <script type="text/javascript">
- assign_rank('{display_name}', '{posts}');
- </script>
-
Put it just under the original (rank) command and it should work fine.
Global Header Portion:
 Code: - <script type="text/javascript">
- <!--
- var ranks = Array(); var r=0;
-
- ranks[r++] = Array(0, 'Rank 1 Name', Rank 1 Image Amount, 'Rank 1 Image URL');
- ranks[r++] = Array(0, 'Rank 2 Name', Rank 2 Image Amount, 'Rank 2 Image URL');
- ranks[r++] = Array(0, 'Rank 3 Name', Rank 3 Image Amount, 'Rank 3 Image URL');
-
- function assign_rank(display_name, posts) {
- if(!display_name.match(/group0/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>
[/code]
To add more ranks to it, please just repeat this:
 Code: - ranks[r++] = Array(0, 'Rank Name', Rank Image Amount, 'Rank Image URL');
OK now I you have any problems please feel free to post back and i'll do my best to help you out. I'm not sure how your system is setup, but this code should work either way. | |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
dog199200 Guest | Re: Groups and Ranks (29th Sep 08 at 1:06am UTC) | | glad to hear it | |
|