vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Seperating Select Sub-Boards

[F] Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 5:43am
umm ok I'm setting up an anime chat site and at the bottom i am setting up 5 rp's and so it don't stretch the site i am making a board with the name of the role play and putting the places to rp at as a sub-board. but i also have sub-boards that contain information for that role play and because how i am setting it up the sub-boards for the role play are mixing up with the info sub-boards and it don't work out, so can i please get a code that will allow me to separate them from each other {Smile}

Edit: One more thing, instead of having the sub-boards say sub-boards, can it also be named something different like as if they are categories?

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 18th Feb 08 at 6:04am
Could you explain that first blob of text a bit better, please? I don't quite understand what you're asking. {Unsure}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 6:10am
ah sorry i was just explaining what i needed it for, umm i need a code that will allow me to seperate selected sub-boards in a board. I have a part in my site that is for a role play, and i don't want it to stretch my forum so i out all its boards into a sub-board, but there is two types of sub-boards in that board, boards that contain information about the role play and then the role play boards and i'd like a code that will allow me to seperate the sub-boards for the info from the sub-boards for the role play itself.

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 18th Feb 08 at 6:23am
Posted By dog199200 on 18th Feb 08 at 6:10am
 
ah sorry i was just explaining what i needed it for, umm i need a code that will allow me to seperate selected sub-boards in a board. I have a part in my site that is for a role play, and i don't want it to stretch my forum so i out all its boards into a sub-board, but there is two types of sub-boards in that board, boards that contain information about the role play and then the role play boards and i'd like a code that will allow me to seperate the sub-boards for the info from the sub-boards for the role play itself.


Why not just create two sub-boards [one for each purpose], then put the proper boards in the proper places? {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 6:30am
its because how i'm going to have the forum setup. Here look down at the Role Play Category and then into the Phoenix Emerald board and you will see what i mean: http://deluxeanimeforum.vforums.co.uk/

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 18th Feb 08 at 6:34am
Which boards belong in which category? Also, be sure to re-order the boards so that all the ones from one category are right after each other, as well as the other category. {Smile}

I'll have a look at this when I wake up [if Wrighty or Ross haven't filled it by then]. {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 6:47am
I already have the boards in the order that I want them in, so here is the list of how i want them to be categorized.




Category 1: Information
Boards: Role Play Info, Character Profile

Category 2: Role Play Jobs
Boards: Jobs

Category 3: Role Play Board ~ World: Altheron
Boards: The Rest In The Phoenix Emerald Board




can you please make it editable whom ever does this so that i can use it for 4 more role play's that i'm going to be adding to the site in the same exact way {Smile}

Edit: One more thing, can you have them have my head and base images around each of the categories plz?

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 18th Feb 08 at 4:28pm
This takes me back to my original question;

Why not make "Information" a sub-board, then make "Role-Play Info" and "Character Profile" sub-sub-boards.

Then make "Role Play Jobs" a sub-board, then make "Jobs" a sub-sub board within that board. Then do the same for category 3.

It would work out easier, to be honest. I'll still make you the code if you really want it, but I think that it would be better to use the sub-sub-board feature to your advantage, here. {Wink}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 5:59pm
i can do that but still the sub-boards are together as in Role Play Info and Jobs, and then the true role play boards..Umm i tired this before but it didn't work because of the differences in the systems. Could you possible edit the old proboards sub-boards sub-boards html code and make it work for this forum system and then from there i will hide the Role-Play Info board, which i did move the character profiles under, and the Jobs boards and use that code and then seperate them that way, it should be a lot easier. Sorry the point of the code was to seperate the sub-boards by type so it is not as cluttered and is easier to navigate the sub-boards.

Re: Seperating Select Sub-Boards - Posted By Michael (wrighty) on 18th Feb 08 at 6:00pm
Show me a printscreen of what you want you it to look like in the longrun ... either a preview of a current forum or a mock one made in paint/ps/

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 18th Feb 08 at 6:32pm
well like a normal board setup. I'm working on a pic to show you exactly what i'm talking about.

Edit: http://i25.photobucket.com/albums/c51/dog199200/demo.jpg

There it is, but Wrighty, the board design aint going to be right do to the code you just made me {Smile} sorry..

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 22nd Feb 08 at 10:19pm
bump, and for the design of the sub-board look here http://deluxeanimeforum.vforums.co.uk/

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 24th Feb 08 at 1:00pm
bump

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 26th Feb 08 at 3:22am
please can i get some help {Confused}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 28th Feb 08 at 4:02am
please someone

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 28th Feb 08 at 4:04am
You're first on my list of outstanding requests, so I'll have this done for you tomorrow for sure.

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 28th Feb 08 at 4:28am
outstanding, what does that mean? and thank you

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 28th Feb 08 at 9:29pm
Posted By dog199200 on 28th Feb 08 at 4:28am
 
outstanding, what does that mean? and thank you


Ones that still need to be done. {Wink}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 28th Feb 08 at 11:24pm
sorry i can be an air head {Smile}

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 29th Feb 08 at 3:21am
Posted By dog199200 on 28th Feb 08 at 11:24pm
 
sorry i can be an air head {Smile}


That's no problem; I just got in, so once I've got a big mug full of Cocoa in front of me I'll get right on this. {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 29th Feb 08 at 3:25am
awesome

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 29th Feb 08 at 11:37pm
Sorry, forgot to post back here.

Your code is coming along nicely, but I've decided to make it one step better. PM me for details. {Wink}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 1st Mar 08 at 1:52am
ok you got that i think of it in a PM {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 3rd Mar 08 at 2:33am
bump

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 3rd Mar 08 at 3:32am
Posted By dog199200 on 3rd Mar 08 at 2:33am
 
bump


Don't worry, I'm still working on it. {Wink}

Should be done shortly. {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 3rd Mar 08 at 4:28am
ya i know, sorry its just a habit to bump

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 5th Mar 08 at 12:11am
just wondering, how much longer?

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 5th Mar 08 at 12:59am
Not too long; weekend at the latest. {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 5th Mar 08 at 1:24am
ah ok ty

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 6th Mar 08 at 2:22am
bump

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 7th Mar 08 at 10:08pm
bump

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 8th Mar 08 at 3:52am
Almost done, expect it tomorrow. {Wink}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 8th Mar 08 at 8:45am
ah darn the day i'm not going to be home, ok its alright i'll get it Sunday then.

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 9th Mar 08 at 5:57pm
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..)

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 10th Mar 08 at 10:00pm
{Smile} bump

Re: Seperating Select Sub-Boards - Posted By CåñåÐå™ (canada) on 11th Mar 08 at 2:36am
I'm bumping this because i'll like to use it as well . {Grin}

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 12th Mar 08 at 10:23am
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}

Re: Seperating Select Sub-Boards - Posted By CåñåÐå™ (canada) on 12th Mar 08 at 11:24am
Oh ok that will be cool , thanks Marc {Grin} .

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 13th Mar 08 at 1:05am
cool

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 15th Mar 08 at 8:33pm
<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.

Re: Seperating Select Sub-Boards - Posted By CåñåÐå™ (canada) on 16th Mar 08 at 12:54am
Thank you Marc {Grin} .

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

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 16th Mar 08 at 1:07am
 
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}

Re: Seperating Select Sub-Boards - Posted By CåñåÐå™ (canada) on 16th Mar 08 at 1:19am
Ah i see ok cool , thank you Marc . {Smile}

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 16th Mar 08 at 1:20am
No worries. {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 16th Mar 08 at 7:33pm
{Smile} thank you so much this is perfect {Smile}

Re: Seperating Select Sub-Boards - Posted By Marc (cr0w) on 16th Mar 08 at 7:39pm
No problem. {Smile}

Sorry for the wait. {Sad}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 16th Mar 08 at 7:40pm
no its no problem, but one more thing, is there a way to put a space between the categories?

Re: Seperating Select Sub-Boards - Posted By Michael (wrighty) on 16th Mar 08 at 7:45pm
 
<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><br><br>';
}
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.



Try that! {Smile}

Re: Seperating Select Sub-Boards - Posted By dog199200 (dog199200) on 16th Mar 08 at 7:47pm
awesome, thats perfect, thx Wrighty for fixing it and thx Marc for coding it {Smile}

Re: [f] Seperating Select Sub-Boards - Posted By Michael (wrighty) on 16th Mar 08 at 7:50pm
Welcome! {Smile}

*locks*