Excellent suggestions, ElfMage. Your last one (the single file edit) seems most practical for including in the next release 1.2.0, since we are already in the testing phase. When this is finally released, I would ask you to review the new database structure.
The code was completely rewritten (twice) for the next version for improved speed on the customized pages themselves, the number of columns in the navbits table has nearly tripled, and each page creates many more than a single row. I am not sure if this would be too much to store in vBulletin's memory - at least, I don't have the experience working with arrays of that size.
The biggest was my the Presets array, which I was very impressed with myself for getting to work, since in the past arrays have just given me headaches - that is foreach ($array AS $key => $value) just didn't work for me until recently (maybe it was my old server?):
PHP Code:
$presets = Array(
'FORUM_HOME' => Array(
'name' => 'FORUM_HOME',
'url' => $forumhome[0],
'text' => $forumhome[1]
),
'THIS_PAGE' => Array(
'name' => 'THIS_PAGE',
'url' => '#',
'text' => $this_page
),
'WIKI_NAME' => Array(
'name' => 'WIKI_NAME',
'url' => $wiki_info[0],
'text' => $wiki_info[1]
)
);
where $forum_home and $wiki_info were arrays created from vBulletin settings in other function calls. By the way, if anyone has any ideas for additional presets, let me know.
ElfMage, after reviewing the new database structure, if you still believe caching all that information in vBulletin settings is more efficient than making a single query, don't hesitate to suggest this again.
Again thanks for the heads up on just editing functions.php, I could not find what file construct_navbits() was in when I wrote version 1.0.0.
EDIT: It just occurred to me... How would I pass variables into the construct_navbits() function without modifying the individual pages? Not all variables function as globals. This could destroy the conditionals feature - where say you only wanted the new navbits to appear on forumdisplay when the forum id was 2. I don't know if there is a workaround for this.