Comma Lists

These are the lists anywhere in vBulletin that have items separated by a comma - for instance the list of members viewing a form, or logged in members on Forumhome, or sub forum lists, or the list of a forums moderators. Since vBulletin 4 was released, it has been relying on CSS to space out and add the commas to these "comma lists", but this has proven to have flaws, and be somewhat unreliable across browser platforms.

Most of these lists have also been displayed using what are called "bit" templates - for instance, on a members profile page, to display the list of recent visitors vb gets the list from the database and loops round it, rendering each member individually using a "bit" template to build a formatted list, and then renders that list on the final page. If you have 25 members listed, that is 25+ template render calls. On some pages the list can be even bigger. Its a lot "work" for vb to render a template, so this process is a heavy use of resources.

in vBulletin 4.1.8, this system has been changed so that all these lists are built and displayed in a different manner. vBulletin will extract the data from the database, loop round it, and build an array of necessary values - this array includes the comma where necessary for each item except the last one. This array is then passed to the final template render, where it is displayed by the use of foreach template syntax - this takes the array given to it, and loops round it, item by item, and inside this loop we put the formatting that used to be in the "bit" template.

The final result is we get a formatted comma list that should display nicely in all browsers, and only one template render call instead of the 25+ we needed before. One final point - the comma (and space) used to separate the items is a phrase, so you can alter it to be whatever you prefer.