vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Simple Guild List code - View Topic
Topic Rating: *****
Printable View
Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Simple Guild List code (24th Feb 10 at 11:57am EST)
Code:
 
  1. <script>
  2.  
  3. function GuildListing(Page){
  4.  
  5. GuildPages = Math.ceil((GuildList.length + 1)/10);
  6.  
  7. var GuildStart = (GuildPage * 10) - 10
  8. var GuildEnd = GuildStart + 10
  9.  
  10. var Guildpost = '<table class="border" width="100%">\n<tr height="20">\n<td class="title1" colspan="2">Guild List - Page ' + Page + '</td>\n</tr>\n';
  11.  
  12. for(i=GuildStart;i<=GuildEnd;i++){
  13.  
  14. if(i%2 == 0){
  15.  
  16. GuildPost += '<tr height="30">\n';
  17.  
  18. }
  19.  
  20. if(GuildList[i]){
  21.  
  22. GuildPost += '<td class="window1" width="50%">' + GuildList[i][0] + '</td>\n';
  23.  
  24. } else {
  25.  
  26. GuildPost += '<td class="window2" width="50%"> </td>\n';
  27.  
  28. }
  29.  
  30. if(i%2 == 1){
  31.  
  32. GuildPost += '</tr>\n';
  33.  
  34. }
  35.  
  36. }
  37.  
  38. GuildPost += '<tr height="20">\n<td class="title2" colspan="2">Close Window</td>\n</tr>\n</table>\n';
  39.  
  40. return GuildPost;
  41.  
  42. }
  43.  
  44. </script>
  45.  
 


There is a variable called GuildList which is a multidimensional array

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: 3,974
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 55%  


pmtwitter vForum
Re: Simple Guild List code (27th Feb 10 at 2:57am EST)
Is it not working or something? You've simply posted a code and not stated what you want us to do! {Unsure}

Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Simple Guild List code (27th Feb 10 at 5:00am EST)
I used document.write(GuildListing(1)); but nothing shows up

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: 3,974
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 55%  


pmtwitter vForum
Re: Simple Guild List code (27th Feb 10 at 5:21am EST)
Just from reading it ...

GuildList - Not defined anywhere


That's all I can see that would be the problem! {Smile}

Aiken
Full Member
***

[Avatar]

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


pmtwitterskypemsnyahooxfire
Re: Simple Guild List code (27th Feb 10 at 5:41am EST)
It is defined, I just didn't post it

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: 3,974
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 55%  


pmtwitter vForum
Re: Simple Guild List code (27th Feb 10 at 6:10am EST)
Have you got somewhere where this whole code is in use?

 Printable View

All times are GMT+0 :: The current time is 5:49am
Page generated in 0.3421 seconds
with 37 Database Queries and 0 cache files
This Forum is Powered By vForums (v2.3)
Create a Forum for Free | Find Forums