vForums Support




 
vForums Homepage
Loading...
Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: View Topic: [F] Board Code Mod Merge
     1,  2Printable View
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



[F] Board Code Mod Merge (18th Apr 08 at 8:50pm)
Can i get these two codes merged together, they dont work seperate

so i need this code:

Code:Select All
  1. <script>
  2. /*Seperate Boards By Gradient
  3. Coded By Wrighty
  4. Do Not: Rip, Repost or Claim*/
  5.  
  6. var g = {
  7.     grad: 'http://i25.photobucket.com/albums/c51/dog199200/Deluxeanime/galbule.png',
  8.     r: get('tr','tag'),
  9.     init: function(){
  10.         for(i=0; i<this.r.length; i++){
  11.             if(this.r[i].id.match(/board_(\w)/) && this.r[i].innerHTML.match(/new posts/i) && this.r[i+1].id.match(/board_(\w)/)){
  12.                 var d = document.createElement('tr');
  13.                 var c = document.createElement('td');
  14.                 c.colSpan='3';
  15.                 c.style.cssText = 'height: 10px; background-image: url('+this.grad+');';
  16.                 d.appendChild(c);
  17.                 this.r[i].parentNode.insertBefore(d, this.r[i].nextSibling);
  18.                 i = i+1;
  19.             }
  20.         }
  21.     }
  22. };
  23. g.init();
  24. </script>


added into this:

Code:Select All
  1. <style>
  2. .boardtotals{
  3.     display: none;
  4. }
  5. </style>
  6. <script>
  7. /*Board Mod
  8. Created By Wrighty*/
  9.  
  10. for(i=0; i<get('td','tag').length; i++){
  11.     if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].className== "window1 boardstatus"){
  12.         get('td','tag')[i+1].width = '55%';
  13.         var a = get('td','tag')[i].parentNode.insertCell(3);
  14.         with(a){
  15.             className = 'window1';
  16.             width= '50px';
  17.             align= 'center';
  18.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/\s(\d+)\sPosts/))? RegExp.$1 : '0';
  19.         }
  20.         var b = get('td','tag')[i].parentNode.insertCell(3);
  21.         with(b){
  22.             className = 'window1';
  23.             width= '50px';
  24.             align= 'center';
  25.             innerHTML = (get('td','tag')[i+1].innerHTML.match(/(\d+)\sTopics\s/))? RegExp.$1 : '0';
  26.         }
  27.     }
  28.     if(get('td','tag')[i].colSpan == '3'){
  29.         if(get('td','tag')[i].width == '100%' && get('td','tag')[i].className.match(/title1/)){
  30.             get('td','tag')[i].colSpan = '5';
  31.         }
  32.         if(get('td','tag')[i].className.match(/categorytitle/)){
  33.             get('td','tag')[i].colSpan = '5';
  34.             var r = document.createElement('tr');
  35.             var a = document.createElement('td');
  36.             var b = document.createElement('td');
  37.             var c = document.createElement('td');
  38.             var d = document.createElement('td');
  39.             var e = document.createElement('td');
  40.             a.className = b.className = c.className = d.className = e.className = 'title1'
  41.             a.appendChild(document.createTextNode(' '));
  42.             b.appendChild(document.createTextNode('Forum'));
  43.             c.appendChild(document.createTextNode('Last Post'));
  44.             d.appendChild(document.createTextNode('Topics'));
  45.             e.appendChild(document.createTextNode('Posts'));
  46.             r.appendChild(a);
  47.             r.appendChild(b);
  48.             r.appendChild(c);
  49.             r.appendChild(d);
  50.             r.appendChild(e);
  51.             get('td','tag')[i].parentNode.parentNode.insertBefore(r,get('td','tag')[i].parentNode.nextSibling);
  52.         }
  53.     }
  54. }
  55. </script>


and by not working i mean that the Gradient doesn't run under the topic and post cells, also they dont load at the same time so it look really tacky
Back to Top - Link to Post - Last edit: 18th May 08 at 5:49pm by Dwight

Just Testing For Errors, If there is a problem caused by my sig let me know.
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,264
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Board Code Mod Merge (19th Apr 08 at 3:34am)
Have you tried swapping their position? (Which is above the other I mean!)
Back to Top - Link to Post

Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (19th Apr 08 at 5:53am)
there not in the same place, thats why they need to be combined to work.
Back to Top - Link to Post - Last edit: 20th Apr 08 at 7:48pm by Dwight

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (20th Apr 08 at 7:48pm)
bump
Back to Top - Link to Post

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
cout << "Marc";
vChat Developer
*****
I <­3 Ross

[Avatar]

Posts: 2,916
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 16
Joined: 9th Dec 2007

Additional Groups:
Coding Team

Reputation: 17%  



Re: Board Code Mod Merge (21st Apr 08 at 3:48am)
19th Apr 08 at 5:53am, Dwight said:
there not in the same place, thats why they need to be combined to work.


Wrighty is suggesting that you switch their positions as code conflicts are quite often due to placement issues. Smiley
Back to Top - Link to Post

Image


Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (21st Apr 08 at 4:29am)
but they cant be, one is in a skins header/footer and the other isn't, also i have tried to put them in the same board and it doesn't work no matter which order they are in
Back to Top - Link to Post - Last edit: 21st Apr 08 at 4:39am by Dwight

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
cout << "Marc";
vChat Developer
*****
I <­3 Ross

[Avatar]

Posts: 2,916
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 16
Joined: 9th Dec 2007

Additional Groups:
Coding Team

Reputation: 17%  



Re: Board Code Mod Merge (21st Apr 08 at 5:09am)
Which is in a skin and which isn't? Smiley
Back to Top - Link to Post

Image


Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (21st Apr 08 at 5:13am)
the board mod isn't but it can go in either place, but the seperate Boards By Gradient would be skin to have different gradient to match the skins.
Back to Top - Link to Post

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,264
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Board Code Mod Merge (22nd Apr 08 at 7:22pm)
try changing:
c.colSpan='3';
to:
c.colSpan='5';

In the first code! Smiley
Back to Top - Link to Post

Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (22nd Apr 08 at 11:20pm)
OK ty that works, but i have a small error with the code could you fix it for me?

http://deluxeanimeforum.virtualforums.co.uk/board/PhoenixEmerald/

for some reason the gradient code is clashing with the categories subboard codes, and its adding bards at the bottom/....
Back to Top - Link to Post

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,264
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Board Code Mod Merge (23rd Apr 08 at 7:47am)
can you post the category code that you're using please? Smiley
Back to Top - Link to Post

Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (23rd Apr 08 at 2:36pm)
lol, ok

Board Head
Code:Select All
  1. <div id="subboards"></div>


Board Foot
Code:Select All
  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. // No More Edits
  35. if(!location.href.match(/topic/)){
  36. var tr = get('tr','tag');
  37. var td = get('td','tag');
  38. var sb = get('subboards','id');
  39. var n = 0;
  40. var nt = "";
  41. var ntree = get('nav_tree','id');
  42.  
  43. for(t=0;t<tr.length;t++){
  44. if(tr[t].id.match(/^board_(.+?)$/i)){
  45. for(i=0;i<sp.length;i++){
  46. if(RegExp.$1==sp[i][0]){
  47. brds[n] = tr[t].cloneNode(true);
  48. n++;
  49. }
  50. }
  51. tr[t].style.display = "none";
  52. }
  53. }
  54. for(s=0;s<td.length;s++){
  55. if(td[s].width=="70%" && td[s].innerHTML.match(/Sub\-Board Name/) && td[s+1].width=="22%"){
  56. td[s].parentNode.parentNode.parentNode.parentNode.style.display = "none";
  57. }
  58. }
  59.  
  60. ntree.style.display = "none";
  61. nt = '<table align="center" width="' + vf_width + '"><tr><td id="nav_tree">' + ntree.innerHTML + '</td></tr></table>';
  62. for(x=0;x<cts.length;x++){
  63. nt += '<table align="center" class="border" cellpadding="2" cellspacing="1" width="' + vf_width + '">';
  64. nt += '<tr><td align="center" class="title1" colspan="5">' + cts[x] + '</td></tr>';
  65. for(q=0;q<brds.length;q++){
  66. if(sp[q][1]==x){
  67. nt += '<tr>' + brds[q].innerHTML + '</tr>';
  68. }
  69. }
  70. nt += '</table><br><br>';
  71. }
  72. sb.innerHTML = nt;
  73. }
  74. //-->
  75. </script>



Edit: also i hate to keep asking things, but could you make it so that the sub board category mod will show head/base image please?
Back to Top - Link to Post - Last edit: 23rd Apr 08 at 2:39pm by Dwight

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (27th Apr 08 at 7:31pm)
bump
Back to Top - Link to Post

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,264
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Board Code Mod Merge (27th Apr 08 at 7:42pm)
try chaning this line:
brds[n] = tr[t].cloneNode(true);
n++
to:
brds[n] = tr[t].cloneNode(true);
brds[n+1] = tr[t+1].cloneNode(true);
n = parseInt(n+2);

That might work! Smiley
Back to Top - Link to Post

Image
Dwight
Senior Member
****

[Avatar]
I'm an evil turkey!!!

Posts: 854
Status: Offline
Gender: Male
Location: Behind You
Age: 16
Joined: 21st Jan 2008
Reputation: 1%  



Re: Board Code Mod Merge (27th Apr 08 at 7:48pm)
like this?

Code:Select All
  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. // No More Edits
  35. if(!location.href.match(/topic/)){
  36. var tr = get('tr','tag');
  37. var td = get('td','tag');
  38. var sb = get('subboards','id');
  39. var n = 0;
  40. var nt = "";
  41. var ntree = get('nav_tree','id');
  42.  
  43. for(t=0;t<tr.length;t++){
  44. if(tr[t].id.match(/^board_(.+?)$/i)){
  45. for(i=0;i<sp.length;i++){
  46. if(RegExp.$1==sp[i][0]){
  47. brds[n] = tr[t].cloneNode(true);
  48. brds[n+1] = tr[t+1].cloneNode(true);
  49. n = parseInt(n+2);
  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. for(q=0;q<brds.length;q++){
  67. if(sp[q][1]==x){
  68. nt += '<tr>' + brds[q].innerHTML + '</tr>';
  69. }
  70. }
  71. nt += '</table><br><br>';
  72. }
  73. sb.innerHTML = nt;
  74. }
  75. //-->
  76. </script>


if so, the code breaks and doesn't show my boards
Back to Top - Link to Post

Just Testing For Errors, If there is a problem caused by my sig let me know.
http://youtube.com/watch?v=5hLIa_mm_8Ihttp://youtube.com/watch?v=9_5zltDXEA4http://youtube.com/watch?v=8mweIc6ufrk
     1,  2Printable View

All times are GMT+1 :: The current time is 11:41pm
Page generated in 1.4305 seconds
with 17 Database Queries and 18 cache files
This Forum is Powered By vForums
Create a Forum for Free