• Page 1 of 2
  • 1
  • 2
  • »
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » uCoz forum with sub-boards (Tutorial)
uCoz forum with sub-boards
Dartz
Posts: 1931

Message # 1 | 11:27 AM
(This code isn't made by me. I found it in random Russian forum and made tutorial)

1. Create a main board for holding sub-boards. (Ex: Jade Dynasty)
2. Create boards which will be your sub-boards. (Ex: JD Discussion, JD Media)

3. Save your sub-board urls - will be needed for links.

4. CP -> Customize Design -> General appearance of forum pages.
5. Find the $BODY$ code (F3 for search) and paste this code after it:

    For one sub-board:
Code
<script type="text/javascript">
link=document.getElementsByTagName('a');
hideForums=new Array('JD Discussion');
       for(k=0;k<hideForums.length;k++){
         for(i=0;i<link.length;i++){
           if(link[i].className=='forum' && link[i].innerHTML==hideForums[k]){
             link[i].parentNode.parentNode.style.display='none';
           }
         }
       }      
</script>

    For many sub-boards:
Code
<script type="text/javascript">
link=document.getElementsByTagName('a');
hideForums=new Array('JD Discussion','JD Media');
       for(k=0;k<hideForums.length;k++){
         for(i=0;i<link.length;i++){
           if(link[i].className=='forum' && link[i].innerHTML==hideForums[k]){
             link[i].parentNode.parentNode.style.display='none';
           }
         }
       }      
</script>

Note: This code was unwrapped from .js file for faster rendering.

5. Inside the code you can see: 'JD Discussion' and 'JD Discussion','JD Media'.
6. Modify JD Discussion and JD Media to your sub-board names. (Exactly)

7. Go to your forum - the sub-boards you created are gone. (Invisible)
8. CP -> Forum Module -> Management of forums and sections.

9. Edit the board you want to hold the sub-boards. In description:

Code
<br>Subforums:      
<a href="http://ccteam.ucoz.net/forum/53">Discussion</a> |      
<a href="http://ccteam.ucoz.net/forum/54">Media</a>


Note: You can use any other system, like <ul> and <li> but only HTML is supported.

10. Modify:
    http://ccteam.ucoz.net/forum/53 - to your sub-boards url.
    http://ccteam.ucoz.net/forum/54 - to your sub-boards url.

    Discussion - to your sub-boards name.
    Media - to your sub-boards name.


11. If you want to have only one sub-board:
Code
<br>Subforum:      
<a href="http://ccteam.ucoz.net/forum/53">Discussion</a>      


Note: If something isn't working or isn't clear, do not hesitate to discuss the problem.

[... With uCoz since December 2 2007 ...]
Aloyasha
Posts: 75
Reputation: 2

Message # 2 | 2:58 AM
but the other board the one you used for the link is still visible?

Click^-^
Zain
Posts: 68
Reputation: -7

Message # 3 | 6:47 AM
can sub board have own icons ?
IndexForums
Posts: 23
Reputation: 0

Message # 4 | 7:30 PM
Thanks for the help! Little difficult to follow with no html experience but I still managed. One question, can you make sub forums of sub forums?

Edit: How do create more then 2 sub forums?

Post edited by IndexForums - Sunday, 2011-03-13, 8:23 PM
Animorph
Posts: 2856
Reputation: 189

Message # 5 | 10:33 PM
IndexForums,
1 question is no

2. answer is yes

Quote
<script type="text/javascript">
link=document.getElementsByTagName('a');
hideForums=new Array('JD Discussion','JD Media','new name');
for(k=0;k<hideForums.length;k++){
for(i=0;i<link.length;i++){
if(link[i].className=='forum' && link[i].innerHTML==hideForums[k]){
link[i].parentNode.parentNode.style.display='none';
}
}
}
</script>

Quote
<br>Subforums:
<a href="http://ccteam.ucoz.net/forum/53">Discussion</a> |
<a href="http://ccteam.ucoz.net/forum/54">Media</a> |
<a href="http://ccteam.ucoz.net/forum/54">new name</a>

To busy building a passive income online ;)
IndexForums
Posts: 23
Reputation: 0

Message # 6 | 0:17 AM
Once I add this code in it works fine
Quote
<br>Subforums:
<a href="http://ccteam.ucoz.net/forum/53">Discussion</a> |
<a href="http://ccteam.ucoz.net/forum/54">Media</a> |
<a href="http://ccteam.ucoz.net/forum/54">new name</a>

but if I change "Discussion" to "Motherboards" and click save it shows an x and comes up with this message Forum description specified incorrectly. If I take out the s it will let me save it. I also tried to change "Discussion" to "CPUs and Overclocking" the x shows up again and the message is shown again. The only way it let me save the changes is if I took out every letter except CP. Why is it doing this?

Edit: Found out why.. cannot exceed 200 characters. I need to add like ten sub forums, is there anyway to change the maximum characters?

Post edited by IndexForums - Monday, 2011-03-14, 0:20 AM
runakter
Posts: 75
Reputation: 0

Message # 7 | 3:41 AM
Quote (IndexForums)
is there anyway to change the maximum characters?

If You Want To Change The Message Length Then.

CP>Settings>Common Settings>Module Settings(Up right corner)>Forum>Maximum message length:

And If You're Saying For Another Then It's Not Possible.


My Projects :
uCoz GuyGamesCentre24FootBall
Natashko
Posts: 3366
Reputation: 171

Message # 8 | 9:27 AM
IndexForums,
Quote (IndexForums)
Found out why.. cannot exceed 200 characters. I need to add like ten sub forums, is there anyway to change the maximum characters

if you mean "Forum description:" field in CP->Main » Forum » Management of forums and sections » New forum, text length cannot exceed 200 characters and it can't be changed.
IndexForums
Posts: 23
Reputation: 0

Message # 9 | 9:06 PM
I can't make the website I was looking to make since I can't make many sub forums. I guess I just got to modify, any suggestions on how to create a lot of forums?
Animorph
Posts: 2856
Reputation: 189

Message # 10 | 9:47 PM
IndexForums, be you cannot create more then 1 forum in your websites , but you can make several forum boards and sections

this will help you
http://video.ucoz.com/load/16


To busy building a passive income online ;)
Natashko
Posts: 3366
Reputation: 171

Message # 11 | 3:02 PM
IndexForums,
Quote (IndexForums)
I can't make the website I was looking to make since I can't make many sub forums. I guess I just got to modify, any suggestions on how to create a lot of forums

maybe you misunderstand something. The thing we are talking about is only a Forum description. How is it connected with the number of sub-forum that you may create? It is possible to create up to 1,000 sub-forums. To do so go to CP->Main » Forum » Management of forums and sections » New forum. Forums can be created within sections. I hope this is an answer to your question.
MarKuS
Posts: 4
Reputation: 0

Message # 12 | 7:52 PM
screen shot please
Animorph
Posts: 2856
Reputation: 189

Message # 13 | 8:29 PM
Natashko, i think he means the sub forums related to teh thread not forum board from forum sections

MarKuS, from what do you need a screenshot ?


To busy building a passive income online ;)
Kness
Posts: 108
Reputation: 3

Message # 14 | 10:12 PM
I've never understood this script I wished that somebody would make a video tutorial ._.
My Projects:
IndexForums
Posts: 23
Reputation: 0

Message # 15 | 0:24 AM
I was just planning on a website with a lot of forum sections. I was going to add sub-forums to lower the cluster problem, but since you can't change the 200 character limit in the forum description I'm only able to create 2 sub-forums before exceeding the 200 character limit.

Kness, I had to read the script about twenty times to get any sense on what it was saying. I got enough of it to play a trial and error game and eventually figured it out. What don't you exactly get?

uCoz Community » For Webmasters » Custom Solutions » uCoz forum with sub-boards (Tutorial)
  • Page 1 of 2
  • 1
  • 2
  • »
Search: