Something that will show a memberss rank below the group if none of the member's groups are staff groups.
Wouldn't a thread or something in the general rules / information be good for the rank listing and posts required?
Not a listing of the ranks but if a member is in a group I want a code that will also show their rank.
bump
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
Thanks, that is what I want...
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:
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:
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.
Yep, it works!!![]()
glad to hear it