Okay, here is what I have and it's not working for me i.e. nothing happens and it does not send the permissions error allowing anyone to view. Let's say I want to send a no permissions error code to my custom
[media] BBcode.
I change all instances of
mycustombbcode to
media according to the instructions in Install Conditional Custom BB-Codes.txt and applied the instructed changes to functions_bbcodeparse.php
Then I make the proper additions to the functions_forumdisplay.php and it still does not block the group. Here is the function_bbcodeparse.php that I am using.
PHP Code:
// Start Hack Conditional BB-Codes (MarcoH64)
// ###################### Start bbcodehandler_media #######################
function handle_bbcode_media($code)
{
// Define Global Variables if needed:
// global $neededglobalvarnames;
// remove empty codes
if (trim($code) == '')
{
return '';
}
// Prevent caching if a BB-code is used that is userdependent
// Uncomment the following 2 lines if the parsing of the bb-code is user dependent.
// So:
// - If user permissions are checked
// - If usergroup is checked
// - if userid is checked
// - .....
// Leave commented if:
// - No checking is done
// - Checking is done based on forumid
// - ....
// global $bbcodeparse_nopostcache;
// $bbcodeparse_nopostcache = 1;
if ($bbuserinfo['usergroupid'] == 6)
{
// You can change the following to whatever suits you, text and/or html
$code = "<b>You must be registered to view the embedded media player</b>";
}
return $code;
}
// End Hack Conditional BB-Codes (MarcoH64)
Any ideas on what i am doing wrong?