vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Board Code Mod Merge - View Topic (Page 1 of 2)
 |  |
| dog199200 Guest | [F] Board Code Mod Merge (18th Apr 08 at 7:50pm UTC) | | Can i get these two codes merged together, they dont work seperate
so i need this code:
 Code: - <script>
- /*Seperate Boards By Gradient
- Coded By Wrighty
- Do Not: Rip, Repost or Claim*/
-
- var g = {
- grad: 'http://i25.photobucket.com/albums/c51/dog199200/Deluxeanime/galbule.png',
- r: get('tr','tag'),
- init: function(){
- for(i=0; i<this.r.length; i++){
- if(this.r[i].id.match(/board_(\w)/) && this.r[i].innerHTML.match(/new posts/i) && this.r[i+1].id.match(/board_(\w)/)){
- var d = document.createElement('tr');
- var c = document.createElement('td');
- c.colSpan='3';
- c.style.cssText = 'height: 10px; background-image: url('+this.grad+');';
- d.appendChild(c);
- this.r[i].parentNode.insertBefore(d, this.r[i].nextSibling);
- i = i+1;
- }
- }
- }
- };
- g.init();
- </script>
added into this:
 Code: - <style>
- .boardtotals{
- display: none;
- }
- </style>
- <script>
- /*Board Mod
- Created By Wrighty*/
-
- for(i=0; i<get('td','tag').length; i++){
- if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].className== "window1 boardstatus"){
- get('td','tag')[i+1].width = '55%';
- var a = get('td','tag')[i].parentNode.insertCell(3);
- with(a){
- className = 'window1';
- width= '50px';
- align= 'center';
- innerHTML = (get('td','tag')[i+1].innerHTML.match(/\s(\d+)\sPosts/))? RegExp.$1 : '0';
- }
- var b = get('td','tag')[i].parentNode.insertCell(3);
- with(b){
- className = 'window1';
- width= '50px';
- align= 'center';
- innerHTML = (get('td','tag')[i+1].innerHTML.match(/(\d+)\sTopics\s/))? RegExp.$1 : '0';
- }
- }
- if(get('td','tag')[i].colSpan == '3'){
- if(get('td','tag')[i].width == '100%' && get('td','tag')[i].className.match(/title1/)){
- get('td','tag')[i].colSpan = '5';
- }
- if(get('td','tag')[i].className.match(/categorytitle/)){
- get('td','tag')[i].colSpan = '5';
- var r = document.createElement('tr');
- var a = document.createElement('td');
- var b = document.createElement('td');
- var c = document.createElement('td');
- var d = document.createElement('td');
- var e = document.createElement('td');
- a.className = b.className = c.className = d.className = e.className = 'title1'
- a.appendChild(document.createTextNode(' '));
- b.appendChild(document.createTextNode('Forum'));
- c.appendChild(document.createTextNode('Last Post'));
- d.appendChild(document.createTextNode('Topics'));
- e.appendChild(document.createTextNode('Posts'));
- r.appendChild(a);
- r.appendChild(b);
- r.appendChild(c);
- r.appendChild(d);
- r.appendChild(e);
- get('td','tag')[i].parentNode.parentNode.insertBefore(r,get('td','tag')[i].parentNode.nextSibling);
- }
- }
- }
- </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 | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Board Code Mod Merge (19th Apr 08 at 2:34am UTC) | | Have you tried swapping their position? (Which is above the other I mean!) | |
| dog199200 Guest | Re: Board Code Mod Merge (19th Apr 08 at 4:53am UTC) | | there not in the same place, thats why they need to be combined to work. | |
| dog199200 Guest | Re: Board Code Mod Merge (20th Apr 08 at 6:48pm UTC) | | bump | |
| Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Board Code Mod Merge (21st Apr 08 at 2:48am UTC) | | 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. | |
rroll.to— Shorten a link, rickroll your friends. |
| dog199200 Guest | Re: Board Code Mod Merge (21st Apr 08 at 3:29am UTC) | | 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 | |
| Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: Board Code Mod Merge (21st Apr 08 at 4:09am UTC) | | Which is in a skin and which isn't? | |
rroll.to— Shorten a link, rickroll your friends. |
| dog199200 Guest | Re: Board Code Mod Merge (21st Apr 08 at 4:13am UTC) | | 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. | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Board Code Mod Merge (22nd Apr 08 at 6:22pm UTC) | | try changing: c.colSpan='3'; to: c.colSpan='5';
In the first code! | |
| dog199200 Guest | | Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Board Code Mod Merge (23rd Apr 08 at 6:47am UTC) | | can you post the category code that you're using please? | |
| dog199200 Guest | Re: Board Code Mod Merge (23rd Apr 08 at 1:36pm UTC) | | lol, ok
Board Head
 Code: - <div id="subboards"></div>
Board Foot
 Code: - <script type="text/javascript">
- <!--
- /*
- Categorized Sub-Boards by Cr0w
- Copyright 2008
- Do not repost
- */
- var sp = []; var brds = new Array(); var cts = new Array(); //Do Not Edit This Line
-
- // Categories
- cts[0] = "Information Boards";
- cts[1] = "Guilds";
- cts[2] = "Jobs";
- cts[3] = "Altheron (Roleplay Boards)";
-
- // Board Organization
- sp[0] = ["Roleplayinfo2",0];
- sp[1] = ["Guilds",1];
- sp[2] = ["Jobs",2];
- sp[3] = ["PhoenixCave",3];
- sp[4] = ["Lunior",3];
- sp[5] = ["Shadowforest",3];
- sp[6] = ["RycoCity",3];
- sp[7] = ["LaconiumCity",3];
- sp[8] = ["Zuler",3];
- sp[9] = ["Falidor",3];
- sp[10] = ["Cirvil",3];
- sp[11] = ["Belveon",3];
- sp[12] = ["Zenreone",3];
- sp[13] = ["ShelbyMountains",3];
- sp[14] = ["AlfronCity",3];
-
-
- // No More Edits
- if(!location.href.match(/topic/)){
- var tr = get('tr','tag');
- var td = get('td','tag');
- var sb = get('subboards','id');
- var n = 0;
- var nt = "";
- var ntree = get('nav_tree','id');
-
- for(t=0;t<tr.length;t++){
- if(tr[t].id.match(/^board_(.+?)$/i)){
- for(i=0;i<sp.length;i++){
- if(RegExp.$1==sp[i][0]){
- brds[n] = tr[t].cloneNode(true);
- n++;
- }
- }
- tr[t].style.display = "none";
- }
- }
- for(s=0;s<td.length;s++){
- if(td[s].width=="70%" && td[s].innerHTML.match(/Sub\-Board Name/) && td[s+1].width=="22%"){
- td[s].parentNode.parentNode.parentNode.parentNode.style.display = "none";
- }
- }
-
- ntree.style.display = "none";
- nt = '<table align="center" width="' + vf_width + '"><tr><td id="nav_tree">' + ntree.innerHTML + '</td></tr></table>';
- for(x=0;x<cts.length;x++){
- nt += '<table align="center" class="border" cellpadding="2" cellspacing="1" width="' + vf_width + '">';
- nt += '<tr><td align="center" class="title1" colspan="5">' + cts[x] + '</td></tr>';
- for(q=0;q<brds.length;q++){
- if(sp[q][1]==x){
- nt += '<tr>' + brds[q].innerHTML + '</tr>';
- }
- }
- nt += '</table><br><br>';
- }
- sb.innerHTML = nt;
- }
- //-->
- </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? | |
| dog199200 Guest | Re: Board Code Mod Merge (27th Apr 08 at 6:31pm UTC) | | bump | |
| Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: Board Code Mod Merge (27th Apr 08 at 6:42pm UTC) | | 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! | |
| dog199200 Guest | Re: Board Code Mod Merge (27th Apr 08 at 6:48pm UTC) | | like this?
 Code: - <script type="text/javascript">
- <!--
- /*
- Categorized Sub-Boards by Cr0w
- Copyright 2008
- Do not repost
- */
- var sp = []; var brds = new Array(); var cts = new Array(); //Do Not Edit This Line
-
- // Categories
- cts[0] = "Information Boards";
- cts[1] = "Guilds";
- cts[2] = "Jobs";
- cts[3] = "Altheron (Roleplay Boards)";
-
- // Board Organization
- sp[0] = ["Roleplayinfo2",0];
- sp[1] = ["Guilds",1];
- sp[2] = ["Jobs",2];
- sp[3] = ["PhoenixCave",3];
- sp[4] = ["Lunior",3];
- sp[5] = ["Shadowforest",3];
- sp[6] = ["RycoCity",3];
- sp[7] = ["LaconiumCity",3];
- sp[8] = ["Zuler",3];
- sp[9] = ["Falidor",3];
- sp[10] = ["Cirvil",3];
- sp[11] = ["Belveon",3];
- sp[12] = ["Zenreone",3];
- sp[13] = ["ShelbyMountains",3];
- sp[14] = ["AlfronCity",3];
-
-
- // No More Edits
- if(!location.href.match(/topic/)){
- var tr = get('tr','tag');
- var td = get('td','tag');
- var sb = get('subboards','id');
- var n = 0;
- var nt = "";
- var ntree = get('nav_tree','id');
-
- for(t=0;t<tr.length;t++){
- if(tr[t].id.match(/^board_(.+?)$/i)){
- for(i=0;i<sp.length;i++){
- if(RegExp.$1==sp[i][0]){
- brds[n] = tr[t].cloneNode(true);
- brds[n+1] = tr[t+1].cloneNode(true);
- n = parseInt(n+2);
- }
- }
- tr[t].style.display = "none";
- }
- }
- for(s=0;s<td.length;s++){
- if(td[s].width=="70%" && td[s].innerHTML.match(/Sub\-Board Name/) && td[s+1].width=="22%"){
- td[s].parentNode.parentNode.parentNode.parentNode.style.display = "none";
- }
- }
-
- ntree.style.display = "none";
- nt = '<table align="center" width="' + vf_width + '"><tr><td id="nav_tree">' + ntree.innerHTML + '</td></tr></table>';
- for(x=0;x<cts.length;x++){
- nt += '<table align="center" class="border" cellpadding="2" cellspacing="1" width="' + vf_width + '">';
- nt += '<tr><td align="center" class="title1" colspan="5">' + cts[x] + '</td></tr>';
- for(q=0;q<brds.length;q++){
- if(sp[q][1]==x){
- nt += '<tr>' + brds[q].innerHTML + '</tr>';
- }
- }
- nt += '</table><br><br>';
- }
- sb.innerHTML = nt;
- }
- //-->
- </script>
if so, the code breaks and doesn't show my boards | |
| |
 |  |
|