vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Groups and Ranks - View Topic
Topic Rating: *****
Printable View
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Groups and Ranks (23rd Sep 08 at 2:49pm UTC)
Something that will show a memberss rank below the group if none of the member's groups are staff groups.

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
ashkir
Full Member
***

[Avatar]

Posts: 1,159
Status: Offline
Gender: Male
Location: Cali!
Age: 36
Joined:  
Reputation: 42%  


pmtwitterskypemsnyahoo
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]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Groups and Ranks (23rd Sep 08 at 5:50pm UTC)
Not a listing of the ranks but if a member is in a group I want a code that will also show their rank.

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Groups and Ranks (25th Sep 08 at 3:53pm UTC)
bump

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
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]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Groups and Ranks (27th Sep 08 at 11:30am UTC)
Thanks, that is what I want...

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
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:
 
  1. <script type="text/javascript">
  2. assign_rank('{display_name}', '{posts}');
  3. </script>
  4.  
 


Put it just under the original (rank) command and it should work fine.


Global Header Portion:
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. var ranks = Array(); var r=0;
  4.  
  5. ranks[r++] = Array(0, 'Rank 1 Name', Rank 1 Image Amount, 'Rank 1 Image URL');
  6. ranks[r++] = Array(0, 'Rank 2 Name', Rank 2 Image Amount, 'Rank 2 Image URL');
  7. ranks[r++] = Array(0, 'Rank 3 Name', Rank 3 Image Amount, 'Rank 3 Image URL');
  8.  
  9. function assign_rank(display_name, posts) {
  10. if(!display_name.match(/group0/i)) {
  11. posts = parseInt(posts.replace(/,/g, ''));
  12. r = 0;
  13. while(ranks[r] && ranks[r][0] < posts) {
  14. r++;
  15. }
  16. if(r > 0)
  17. r--;
  18. var rank_str = "" + ranks[r][1] + "<br />";
  19. for(c=0; c<ranks[r][2]; c++) {
  20. rank_str += "<img src=\""+ ranks[r][3] +"\" alt=\"*\" />";
  21. }
  22. document.write(rank_str);
  23. }
  24. }
  25. //-->
  26. </script>
 

[/code]


To add more ranks to it, please just repeat this:

Code:
 
  1. 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]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Groups and Ranks (28th Sep 08 at 10:23pm UTC)
Yep, it works!! {Grin}

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
dog199200
Guest
Re: Groups and Ranks (29th Sep 08 at 1:06am UTC)
{Smile} glad to hear it
 Printable View

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