Version: 1.00, by JJR512
Developer Last Online: Jun 2006
Version: 2.2.x
Rating:
Released: 08-09-2002
Last Update: Never
Installs: 3
No support by the author.
This hack puts links to all forums a user has access to at the top of the page (or anywhere else you want it). I've been using hard-coded links on my own forums ever since my site opened over two years ago, and many people love them. For the record, the idea of having links to all forums at the top of the page is not my original idea; I originally saw it at Hardware Central. This is also something I requested once, long ago, at vbulletin.com, and Tubedogg came up with something that worked fairly well. However, his version never had any permission-checking features, so links to all forums were displayed. My version, written from the ground up by myself, does check permissions.
Some assistance was also provided by FireFly, who showed me how to keep the separation character from appearing after the last link. Thanks, FireFly!
This hack is basically very simple. You just add a few lines of code to one file, and a variable to your header template to show the output. But you can take this and customize it greatly, by formatting how the output is displayed, by surrounding the variable with various tags to center it or control the font style and size, or you could make it into a table; it's all up to you.
For a simple example, look at http://testvb.jjr512.com All I've done there is put the variable at the top of the header template, inside smallfont and center tags. For a more elaborate example, take a look at http://www.jjr512.com I've built it into a table with a different background color and a thin line border with curved corners. It's also duplicated in the footer. How you do it on your site is up to you. The possibilities are endless. If you come up with something you feel is neat and unique, maybe you could share it with us to give others an idea or two.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I wasn't too sure if what I described in my previous message was very clear, so I've attached an image of my admin cp/forums setup page, so you can see my displayorders.
Originally posted by Erwin The more forums you have, the more queries. And all these queries will be on EVERY page of your forum. So watch out! Have a look and see how forumjump does the query for forum permissions - forumjump only uses 1 extra query, no matter how many forums.
Yes, the more forums, the more queries, but the scary thing is that it's not just one additional query per forum, because I don't have that many forums! I think the getperms is adding a few queries per each forum, meaning that the queries will grow bigger by greater amounts as you have more forums!
So, I will be closely examining the forumjump feature to see if I can learn anything from it. Until then, heavy-usage board owners may wish to not install it. Personally, I haven't noticed any difference, but I wouldn't exactly call my board very active...
No, you explained it perfectly. I was doing mine like 1 for the category and 1...2...3...4...5 for the forums on every one of them. I should have known better than to do it that way. DOH!!! Now everything is listed as it should be. Thanks for taking the time to explain it.
Here is a link to that function I told you about. The one Firefly wrote. Hope it helps.
Originally posted by JJR512 I wasn't too sure if what I described in my previous message was very clear, so I've attached an image of my admin cp/forums setup page, so you can see my display-orders.
Originally posted by JJR512 OK, I see what you mean about the zero thing now. Yes, there is no provision in my hack to ignore forums with a displayorder of 0. Actually, I had no idea that vBulletin wouldn't display forums like that, because it's never even occurred to me to try. When I want a forum to not show up anymore, I edit the forum properties and set "Is active?" to No. Incidentally, if you do this, the forum actually still is active, if someone gets into it manually with putting that forum's forumid number in a forumdisplay.php URL. But the forum does not show up at all on the message board or in the list generated by this hack. On my board, we call this a "hidden forum", and have one hidden forum in use. So, if you want these forums to not show up in this list, just set the active status to no. Or, if you really insist, I could throw in some additional code to ignore a forum if its displayorder is 0.
Actually I could just tell you how to do it...In the first query, change
Code:
WHERE active='1'
To
Code:
WHERE active='1' AND displayorder>'0'
Now I haven't tested that, but that should work in theory. (Note: Unless this proves to be a common problem, I do not plan on putting this change into the official release.)
But I strongly suggest setting the active status to no; this will solve the problem not just with my hack, but also with the Spider Friendly hack, too!
Thanks JJR512 ... I took your advice and changed the status to no and that did work. Unfortunately, even doing this, I still have too many forums and/or their names are too long ... making the many lines sit unattractively at the top of my pages. Great hack though and thanks for taking the time to help me.