EyeStorm Studio

Standards and Browser Aware Web Development

Standards and Browser Aware Web Development

Eyestorm is the online studio of David Wranovics, freelance web developer, owner and operator of the forum skin retail stores, ForumMonkeys and vBmode, founder of the original, now umbrella parent company, NetAtom COM. David supplements his larger projects with development partners he has met over the decade he has spent in web development.


The Anatomy of the vBulletin Animal

Part One

The Forumhome (a.k.a homepage, a.k.a index page)

Even despite years of study in its natural habitat, even though we have picked apart its scat and know what it eats (mysql queries), the vBulletin Animal nevertheless easily irritates newcomers with its ponderous template hierarchy. Over the next few weeks, I am going to try and manifest what I have learned after years of taming and grooming, and do it in color, so we all can at least get a fundamental understanding of  vBulletin modification.

The Forumhome

Here, you see a snapshot of the internals of the index page, commonly referred to in the vBulletin skinning circles as the forumhome.

So, looking at the forumhome template, we see that at the top it calls the header and navbar, and below it, the footer. The out-of-the-box vBulletin style begins the first element, the column headings (i.e. forum, last post, posts, threads) in the forumhome template; most skinners will tuck this code into the level1_nopost in a way that makes every forum begin with the category instead, followed by these column headings. Then, all that’s really left of the major organs is the level2_post which is where all the actual forum data can be found.

I often get questions about sidebars, those left or right hand columns you often see on forums where users plug random stuff (usually advertising) and how to get them to show up on just the index page, or to change them so they show up on every page. If you are coding a new skin or need to change the visibility of an existing column, the three choices of location, in order of popularity, are the forumhome, the header, and the navbar. Putting the code for your column in the forumhome template guarantees it will only be seen on the index page. You obviously, in every case, need to make sure that you planned the placement of your code correctly, so that when the user navigates to the actual post, and the column disappears, you didn’t leave an unterminated DIV or TD tag (thereby probably messing up the entire forum on every page but the index page).

If you want the column to appear on every page within your forum, the best way to implement this modification is to put it in the header template. The navbar template is another place you could put it, but there are a few pages that do not call the navbar and thus will not plug in the column, like the redirects, the error pages, and a few others. I often recommend using the navbar template for situations such as when you are running a CMS/Portal like VbAdvanced, which uses its own columns – that way you can turn the navbar off in the CMS/Portal, and not have to worry about juggling your own column around; you can keep the easy default three column layout of the CMS/Portal software and still have your custom column show up on the forum index and below. Another reason to use the navbar for your column is that it parses the statistics and other variables normally found under the What’s Going On table; the header does not.

Part Two

The Forumdisplay

The forumdisplay has two major functions. The first is apparent when you click on a category link or if you click on a forum link that has subforums attached to it. Clicking on the category link, for example, will show all the forums attached to the category (controlled by forumhome_level1_post), any subforums (controlled by forumhome_level2_post), and, if there are any threads, will also display the threadbit.

vBulletin forumdisplay

The more obvious function is just to display the threadbit, the actual threads people have posted. While all the controls and buttons are in the parent container and main template, the forumdisplay, if you are looking to maybe change the thread status icon background, change the order of the alt1 and alt2 classes in the thread rows, and so on, the threadbit is the place to go.

Leave a Reply