The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Forum Links Details »» | |||||||||||||||||||||||||
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
|
Comments |
#12
|
||||
|
||||
Quote:
And what do you mean by "forums marked with a zero"? |
#13
|
||||
|
||||
Hi JJR512 ... I don't know how it is finding this deleted forum either, hmmmm ... makes me think I have additional issues ... but it is displaying one that I deleted long ago.
In regard to the forums marked with a zero, it's done in the cp, regarding the order that you want forums to be displayed. If you don't want it to be displayed, mark it with a zero and it won't show up on your forum home page. These were some forums created for our first "birthday celebration" and have outlived their usefulness ... I've just not deleted them. By the way, both your hack and Overgrow's Spider Friendly hack displays the deleted forum and the ones marked with a zero ... it's just that his hack isn't on my forum home page ... so it's no biggie. Destee |
#14
|
||||
|
||||
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' Code:
WHERE active='1' AND displayorder>'0' 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! |
#15
|
||||
|
||||
This hack is a nice idea, JJR512, but there is no way I can keep it installed when I went from 37 queries on my home page to 125 queries after adding this hack. Your page was well over 100 queries when I looked at it. That would slow any board with any kind of activity to a crawl. Is there any way to reduce the queries to a more manageable size?
|
#16
|
||||
|
||||
Quote:
https://vborg.vbsupport.ru/showthrea...threadid=42115 |
#17
|
||||
|
||||
Wow! I had no idea it was that much. I can only assume that most are coming from the getpermissions routine. I don't know of any way to reduce the number of queries involved; I'm not that skilled yet.
If anyone else can offer some advice, I'm sure we'd all appreciate it. |
#18
|
||||
|
||||
Yeah, it shocked me to no end. I was just getting used to 37 queries.
The more forums you have the query count would probably go up, right? Did you check the function out that Firefly posted on getting permissions from the db? That might help. Also, it doesn't display in the same order my forums are listed. Any way to get that displaying in the same order? Quote:
|
#19
|
||||
|
||||
Thank you, sir, you are a gentleman and a scholar.
Quote:
|
#20
|
||||
|
||||
Quote:
Quote:
Say you have CategoryA, with a displayorder of 1. Then you have CategoryB, with a displayorder of 10. Then you have two forums, Forum1 with a displayorder of 2, and Forum2, with a displayorder of 3. If Forum2 is a subforum in CategoryA, on your forums home page, it will appear higher up that Forum1, even though it has a higher displayorder, because it's part of a category with a lower forumdisplay. I think that's probably a little confusing; I hope it makes sense. What I did to get everything in the right order is this. For all categories, I gave them displayorders of 100, 200, 300, etc., in the order they should appear on the forums home page. Then for each main forum, I gave them a number like 110, 120, 130, etc., if the forum is in the first category (which has a displayorder of 100); for forums in the second category, they were numbered like 210, 220, etc., and so on, you get the idea. If any main forum has a subforum, say a forum with a displayorder of 110 has a subforum, the subforum displayorder is 111, and another would be 112, and so on. Make sense? If you renumber the displayorders of all your forums like this, they should show up on the board itself the same way they always have, but will also be in the correct order in the forumlinks. |
#21
|
||||
|
||||
Quote:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|