vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Progress bar for posting ranks - View Topic (Page 1 of 2)Page: 1 2
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: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Progress bar for posting ranks (26th Apr 10 at 4:58pm UTC)
Global Header:
Code:
 
  1. <script>
  2.  
  3. function PostLevel(Posts){
  4.  
  5. if(vf_username != 'guest' && GroupCheck(0)){
  6.  
  7. Posts = parseInt(Posts)
  8. var PPost = ''
  9.  
  10. var PostList = []
  11. PostList[0] = [0,1];
  12. PostList[1] = [1,5];
  13. PostList[2] = [5,250];
  14. PostList[3] = [250,250];
  15.  
  16. for(i = PostList.length; i >= 0; i--){
  17.  
  18. if(Posts > PostsList[i][0]){
  19.  
  20. var PostPer = (Posts/PostList[i][1])*100
  21.  
  22. if(PostPer > 100){
  23. PostPer = 100
  24. }
  25.  
  26. PostPer = (PostPer * 2)-4
  27.  
  28. PPost = '<tr><td class="window2" colspan="2"><div style="width:98px; height:18px; background-color:000;"><div style="float:left; width:' + PostPer + 'px; height:16px; background-color:FF0;"></div></div></td></tr>';
  29.  
  30. document.write(PPost);
  31.  
  32. }
  33.  
  34. }
  35.  
  36. }
  37.  
  38. }
  39.  
  40. </script>
 


Mini-Profile template:
Code:
 
  1. <script>
  2. PostLevel({posts});
  3. </script>
 


It is not being displayed at all

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 5:11pm UTC)
Do you have a link to a profile with this on so that I can see the rest of the coding please? {Smile}
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 33
Joined:  
Reputation: 62%  


pmwww
Re: Progress bar for posting ranks (26th Apr 10 at 6:39pm UTC)
Doesn't work for me either.

http://dmtesting.vforums.co.uk/action/view_profile/admin

I put it under the post count table, so it should be directly underneath the post count, but it's not.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 6:55pm UTC)
Darkmage... the reason I asked for a link is because he is using other predefined functions within his coding that you don't have defined. {Smile}
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 33
Joined:  
Reputation: 62%  


pmwww
Re: Progress bar for posting ranks (26th Apr 10 at 6:56pm UTC)
Oh I see. {Tongue Out} Well it still doesn't work on mine. >.<
Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Progress bar for posting ranks (26th Apr 10 at 7:14pm UTC)
Here's one: http://tfah.vforums.us/profile/eunie

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 9:03pm UTC)
This line:
if(Posts > PostsList[­i][0]){
PostsList is undefined
I think you mean "PostList"

Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Progress bar for posting ranks (26th Apr 10 at 9:39pm UTC)
I fixed that but it still isn't working

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 10:18pm UTC)
Change your for loop to:
for(i = PostList.length-1; i >= 0; i--){

Also add a break; statement to the end of your if statement.
Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Progress bar for posting ranks (26th Apr 10 at 10:21pm UTC)
I did that, still not showing

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 10:33pm UTC)
Unfortunately being a guest I can't test it exactly. Can you remove the first line (and the corresponding closing brace) from your code that sets it so that only guests can see it ... then I can test it further for you ... I have it on my test forum, and it worked fine... :/
Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Progress bar for posting ranks (26th Apr 10 at 10:35pm UTC)
I think I might have coded that part wrong O.o

I took it off but the div's in the code aren't there but the tr and td are

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 10:36pm UTC)
That could be the bit that's 'causing to not work. Is there any reason that you don't want to show it to the Guests?
Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Progress bar for posting ranks (26th Apr 10 at 10:38pm UTC)
That isn't what I was trying to do, my mistake

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
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Progress bar for posting ranks (26th Apr 10 at 10:52pm UTC)
Does it work now?
 Printable View
Page: 1 2

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