vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Seperating Select Sub-Boards - View Topic (Page 3 of 4)Page: 1 2 3 4
Topic Rating: *****
Printable View
This topic was locked 16th Mar 08 at 7:50pm by Michael
dog199200
Guest
Re: Seperating Select Sub-Boards (7th Mar 08 at 10:08pm 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
***


Reputation: 40%  


pmwww
Re: Seperating Select Sub-Boards (8th Mar 08 at 3:52am UTC)
Almost done, expect it tomorrow. {Wink}

rroll.to— Shorten a link, rickroll your friends.
dog199200
Guest
Re: Seperating Select Sub-Boards (8th Mar 08 at 8:45am UTC)
ah darn the day i'm not going to be home, ok its alright i'll get it Sunday then.
dog199200
Guest
Re: Seperating Select Sub-Boards (9th Mar 08 at 5:57pm UTC)
bump

(I hope this isn't two early, i don't know how i could of posted at 12:45am and it being in the afternoon..)
dog199200
Guest
Re: Seperating Select Sub-Boards (10th Mar 08 at 10:00pm UTC)
{Smile} bump
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Seperating Select Sub-Boards (11th Mar 08 at 2:36am UTC)
I'm bumping this because i'll like to use it as well . {Grin}

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Seperating Select Sub-Boards (12th Mar 08 at 10:23am UTC)
Ross is doing an update on Friday that will make this code much easier to do, so I'll have it done then for sure. {Smile}

rroll.to— Shorten a link, rickroll your friends.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Seperating Select Sub-Boards (12th Mar 08 at 11:24am UTC)
Oh ok that will be cool , thanks Marc {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
dog199200
Guest
Re: Seperating Select Sub-Boards (13th Mar 08 at 1:05am UTC)
cool
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Seperating Select Sub-Boards (15th Mar 08 at 8:33pm UTC)
<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] = "Category 1 Name";
cts[1] = "Category 2 Name";

// Board Organization
sp[0] = ["Board ID",category_id];
sp[1] = ["Board ID",category_id];
sp[2] = ["Board ID",category_id];
sp[3] = ["Board ID",category_id];

// 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>';
}
sb.innerHTML = nt;
}
//-->
</script>


The above goes in your board footer.

This goes in your board header:

Code:
 
  1. <div id="subboards"></div>
 


Now, to edit:

cts[0] = "Category 1 Name"; - Self explanatory; the name for the first new category.

sp[0] = ["Board ID",category_id];

"Board ID" is the ID for the sub-board you're putting in a category. (Ex: This board's ID is "coderequest")

category_id is the ID number of the category your board is being put in. For example, if you have cts[0] = "Rawr", "Rawr" has an ID of 0.

Note: Make sure the "Board Organization" list is in the same order as your boards appear on the page, otherwise they will not get organized properly.

rroll.to— Shorten a link, rickroll your friends.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Seperating Select Sub-Boards (16th Mar 08 at 12:54am UTC)
Thank you Marc {Grin} .

One question how can i get the id for the cat abd sub-boards i have already ??

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Seperating Select Sub-Boards (16th Mar 08 at 1:07am UTC)
 
Thank you Marc {Grin} .

One question how can i get the id for the cat abd sub-boards i have already ??


Simply click on one of the sub-boards, and look in the URL for board/board_id/ - board_id is the ID of the board. {Wink}

rroll.to— Shorten a link, rickroll your friends.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Seperating Select Sub-Boards (16th Mar 08 at 1:19am UTC)
Ah i see ok cool , thank you Marc . {Smile}

Image
click here We have 15 Different Skins/Templates for your vForum
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Seperating Select Sub-Boards (16th Mar 08 at 1:20am UTC)
No worries. {Smile}

rroll.to— Shorten a link, rickroll your friends.
dog199200
Guest
Re: Seperating Select Sub-Boards (16th Mar 08 at 7:33pm UTC)
{Smile} thank you so much this is perfect {Smile}
 Printable View
Page: 1 2 3 4

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