Version: 1.00, by harmor19
Developer Last Online: May 2023
Category: Administrative and Maintenance Tools -
Version: 3.6.4
Rating:
Released: 06-06-2007
Last Update: Never
Installs: 30
Uses Plugins
No support by the author.
It kind of bothered me that you couldn't use vBulletin conditionals in the BBCodes. For example you couldn't use <if condition="$bbuserinfo[usergroupid] == {option}">{param}</if>.
With this small hack you can customize your BBCodes by using vBulletin's own conditionals.
Installing
Download the plugin XML. Go into to your ACP --> Plugins & Products --> Download / Upload Plugins. Scroll to the bottom of the page. Browse to vbulletin-plugins_adv_bbcodes.xml and click "Import".
View the screenshot for an example BBCode you can use.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
<if condition="$bbuserinfo['userid']>0">{param}<else />This code is not visible for Guests</if>
or:
Code:
<if condition="$bbuserinfo['reputation']>=100">{param}<else />This code is only visible for reputation points.</if>
Other question security related:
I found out that it would parse vb variables directly in the post.
The question is if there is a security matter / issue or not?!
For example I can write in my post
Code:
$bbuserinfo[reputation]
and it would
directly in my post show my reputation value. So I am afraid it could be used by
members for malicious actions or is this impossible?
There are a two problems with this mod. One is where a member can type $bbuserinfo[var] and it will output the value in the database but only for their userid. I used preg_replace to fix the problem.
Another is when someone types an array with either single or double quotes $var['foo'] or $var["foo"].
Can anybody help with the second problem?
Did you include the fix for the first problem in the plugin yet?
For restricting multiple usergroups, can you use the is_member_of() function instead of the boolean operator? (I know that this works in templates, not sure about here)
[bbcode_name=5,6]visible to mods and admins only[/bbcode_name]
or you might need quotes, depending on how things are parsed, and whether or not this is related to problem #2 above:
[bbcode_name='5,6']visible to mods and admins only[/bbcode_name]
I am concerned about the security risk, because I have a ton of private/hidden profile fields with personal information about my users that I wouldn't want people to have access to
Other question security related:
I found out that it would parse vb variables directly in the post.
The question is if there is a security matter / issue or not?!
For example I can write in my post
Code:
$bbuserinfo[reputation]
and it would
directly in my post show my reputation value. So I am afraid it could be used by
members for malicious actions or is this impossible?
Installed and working great! But, is there any security/abuse concern here? Can this be exploited?
There are a two problems with this mod. One is where a member can type $bbuserinfo[var] and it will output the value in the database but only for their userid. I used preg_replace to fix the problem.
Another is when someone types an array with either single or double quotes $var['foo'] or $var["foo"].
Can anybody help with the second problem?
I have some concern about this, could you give an example of the preg_replace regex and where to put it? I would guess it would go in the plugin, but before or after the