The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Rendering vboptions in posts
A twofer ...
1) Is there any existing bbcode addition or other mod which would let me display the current setting for a vB option in a post? In other words, say I have a sticky post with instructions like "You may attach up to 5 files in any single post." Only instead of 5, I want it to show whatever $vbulletin->options['attachlimit'] is currently set to. This obviously means I don't have to go back and change my instruction posts any time I change 'attachlimit' (or whatever). A seemingly small thing, but when I look at my site as a whole, and the amount of places I'm refering to vB options in instructions, announcements, etc., it would actually be a very useful feature. 2) If there isn't an existing bbcode mod for this, I'll probably write one. Which raises the second part of my question, which is: can anyone think of any security issues, obvious or obscure, with providing this feature? I would obviously create usergroup based permissions for the new vboption tag, and use that to restrict usage to just Admins and maybe Super Mods. But I'm still interested in any potential malicous or unintentional security issues anyone can think of, for which I could throw in some defensive coding to protect against. For instance, one thing I'd probably do is have a configurable list of vB options which the vboption tag would refuse to render, with an optional value / message to use instead: supersecretoption;"Sorry, this option is Ultra Double Super Secret!" Anyway, TIA for any thoughts, opinions or good light bulb jokes. -- hugh |
#2
|
||||
|
||||
Well that was easier than I was expecting. Especially using the Advanced Products Manager to help create the product, it took about 45 minutes to come up with a more or less complete package. One hook (on bbcode_create), an option group with few options, and some bitfield XML.
Attachment 51317 I'll test it for a while and wait to see if anyone has any suggestions about the security aspects, but as you can see from the attached screen shot, it works. -- hugh |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|