The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have created custom bbcode that uses a [MP3] [/MP3] tag for this mod https://vborg.vbsupport.ru/showthread.php?t=72162 , what I want to do is secure it so only registered users can view it and unregistered users see a "Must Register" notice. I am having trouble with the preg_replace function. Here is my idea of what to add to functions_bbcodeparse.php
Code:
// Media hack begin <if condition="$post[usergroupid] == 1"> $string= "[MP3]song[/MP3]"; $pattern= "#\[mp3\](.*)\[/mp3\]#esiU"; $replace= "<b>You must be registered to view this</b>"; echo preg_replace($pattern, $replace, $string); </if> // Media hack end |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|