vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [Site Needed for Deleted] Categorized SubBoard Mod - View Topic
Topic Rating: *****
Printable View
This topic was locked 24th May 08 at 10:01am by Michael
dog199200
Guest
[Site Needed for Deleted] Categorized SubBoard Mod (18th May 08 at 4:58pm UTC)
Resolved
Can i get a mod to this code so that it will add head/base images around the categories please?

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Categorized Sub-Boards by Cr0w
  5. Copyright 2008
  6. Do not repost
  7. */
  8. var sp = []; var brds = new Array(); var cts = new Array(); //Do Not Edit This Line
  9.  
  10. // Categories
  11. cts[0] = "Information Boards";
  12. cts[1] = "Guilds";
  13. cts[2] = "Jobs";
  14. cts[3] = "Altheron (Roleplay Boards)";
  15.  
  16. // Board Organization
  17. sp[0] = ["Roleplayinfo2",0];
  18. sp[1] = ["Guilds",1];
  19. sp[2] = ["Jobs",2];
  20. sp[3] = ["PhoenixCave",3];
  21. sp[4] = ["Lunior",3];
  22. sp[5] = ["Shadowforest",3];
  23. sp[6] = ["RycoCity",3];
  24. sp[7] = ["LaconiumCity",3];
  25. sp[8] = ["Zuler",3];
  26. sp[9] = ["Falidor",3];
  27. sp[10] = ["Cirvil",3];
  28. sp[11] = ["Belveon",3];
  29. sp[12] = ["Zenreone",3];
  30. sp[13] = ["ShelbyMountains",3];
  31. sp[14] = ["AlfronCity",3];
  32.  
  33.  
  34.  
  35. // No More Edits
  36. if(!location.href.match(/topic/)){
  37. var tr = get('tr','tag');
  38. var td = get('td','tag');
  39. var sb = get('subboards','id');
  40. var n = 0;
  41. var nt = "";
  42. var ntree = get('nav_tree','id');
  43.  
  44. for(t=0;t<tr.length;t++){
  45. if(tr[t].id.match(/^board_(.+?)$/i)){
  46. for(i=0;i<sp.length;i++){
  47. if(RegExp.$1==sp[i][0]){
  48. brds[n] = tr[t].cloneNode(true);
  49. n++;
  50. }
  51. }
  52. tr[t].style.display = "none";
  53. }
  54. }
  55. for(s=0;s<td.length;s++){
  56. if(td[s].width=="70%" && td[s].innerHTML.match(/Sub\-Board Name/) && td[s+1].width=="22%"){
  57. td[s].parentNode.parentNode.parentNode.parentNode.style.display = "none";
  58. }
  59. }
  60.  
  61. ntree.style.display = "none";
  62. nt = '<table align="center" width="' + vf_width + '"><tr><td id="nav_tree">' + ntree.innerHTML + '</td></tr></table>';
  63. for(x=0;x<cts.length;x++){
  64. nt += '<table align="center" class="border" cellpadding="2" cellspacing="1" width="' + vf_width + '">';
  65. nt += '<tr><td align="center" class="title1" colspan="5">' + cts[x] + '</td></tr>';
  66. var num = 0;
  67. for(q=0;q<brds.length;q++){
  68. if(sp[q][1]==x){
  69. if(num >0){
  70. nt += '<tr><td colspan = "5" style="height: 10px; background-image: url(http://i25.photobucket.com/albums/c51/dog199200/Deluxeanime/galbule.png);"></td></tr>';
  71. }
  72. nt += '<tr>' + brds[q].innerHTML + '</tr>';
  73. num++
  74. }}
  75. nt += '</table><br><br>';
  76. }
  77. sb.innerHTML = nt;
  78. }
  79. //-->
  80. </script>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Categorized Sub-Boards Mod (18th May 08 at 5:20pm UTC)
try this:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Categorized Sub-Boards by Cr0w
  5. Copyright 2008
  6. Do not repost
  7. */
  8. var sp = []; var brds = new Array(); var cts = new Array(); //Do Not Edit This Line
  9.  
  10. // Categories
  11. cts[0] = "Information Boards";
  12. cts[1] = "Guilds";
  13. cts[2] = "Jobs";
  14. cts[3] = "Altheron (Roleplay Boards)";
  15.  
  16. // Board Organization
  17. sp[0] = ["Roleplayinfo2",0];
  18. sp[1] = ["Guilds",1];
  19. sp[2] = ["Jobs",2];
  20. sp[3] = ["PhoenixCave",3];
  21. sp[4] = ["Lunior",3];
  22. sp[5] = ["Shadowforest",3];
  23. sp[6] = ["RycoCity",3];
  24. sp[7] = ["LaconiumCity",3];
  25. sp[8] = ["Zuler",3];
  26. sp[9] = ["Falidor",3];
  27. sp[10] = ["Cirvil",3];
  28. sp[11] = ["Belveon",3];
  29. sp[12] = ["Zenreone",3];
  30. sp[13] = ["ShelbyMountains",3];
  31. sp[14] = ["AlfronCity",3];
  32.  
  33.  
  34.  
  35. // No More Edits
  36. if(!location.href.match(/topic/)){
  37. var tr = get('tr','tag');
  38. var td = get('td','tag');
  39. var sb = get('subboards','id');
  40. var n = 0;
  41. var nt = "";
  42. var ntree = get('nav_tree','id');
  43.  
  44. for(t=0;t<tr.length;t++){
  45. if(tr[t].id.match(/^board_(.+?)$/i)){
  46. for(i=0;i<sp.length;i++){
  47. if(RegExp.$1==sp[i][0]){
  48. brds[n] = tr[t].cloneNode(true);
  49. n++;
  50. }
  51. }
  52. tr[t].style.display = "none";
  53. }
  54. }
  55. for(s=0;s<td.length;s++){
  56. if(td[s].width=="70%" && td[s].innerHTML.match(/Sub\-Board Name/) && td[s+1].width=="22%"){
  57. td[s].parentNode.parentNode.parentNode.parentNode.style.display = "none";
  58. }
  59. }
  60.  
  61. ntree.style.display = "none";
  62. nt = '<table align="center" width="' + vf_width + '"><tr><td id="nav_tree">' + ntree.innerHTML + '</td></tr></table>';
  63. for(x=0;x<cts.length;x++){
  64. nt += get('table','tag')[0].cloneNode(true) + '<table align="center" class="border" cellpadding="2" cellspacing="1" width="' + vf_width + '">';
  65. nt += '<tr><td align="center" class="title1" colspan="5">' + cts[x] + '</td></tr>';
  66. var num = 0;
  67. for(q=0;q<brds.length;q++){
  68. if(sp[q][1]==x){
  69. if(num >0){
  70. nt += '<tr><td colspan = "5" style="height: 10px; background-image: url(http://i25.photobucket.com/albums/c51/dog199200/Deluxeanime/galbule.png);"></td></tr>';
  71. }
  72. nt += '<tr>' + brds[q].innerHTML + '</tr>';
  73. num++
  74. }}
  75. nt += '</table>'+get('table','tag')[3].cloneNode(true)+'<br><br>';
  76. }
  77. sb.innerHTML = nt;
  78. }
  79. //-->
  80. </script>
 
dog199200
Guest
Re: Categorized Sub-Boards Mod (19th May 08 at 1:23am UTC)
i dont know what you did but you broke the code
dog199200
Guest
Re: Categorized Sub-Boards Mod (22nd May 08 at 1:29pm UTC)
bump
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Categorized Sub-Boards Mod (22nd May 08 at 3:03pm UTC)
Get to these tonight, or tomorrow during the day. Today's exam is done, so got a few days to code up! {Cheesy}
dog199200
Guest
Re: Categorized Sub-Boards Mod (24th May 08 at 2:31am UTC)
hey you can ignore this, i deleted the site because it was going no where,
 Printable View

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