MyBB Community Forums

Full Version: Spoiler content only to VIP member
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
is it possible to make spoiler contents only visible to only to specific group?
i want to show spoiler contents only to usergroup 7, than is it possible?
thaank you.
you can try it with YourCode
when i click on plugin in admin cp it give following error.
^ plugin coder has responded to your post in the plugin release thread
You can edit the PHP code of the plugin.

Adding:

if ($mybb->user['gid'] == 7)
 {
   SHOW SPOILER CODE
 }

I don't really remember the variable for Group ID. But i think, that's it Smile
you can use your own code, only add the vars for usergroups:


function my_plugin(&$post){
global $mybb;

if($mybb->user['usergroup'] == 14)
{
$message = preg_replace("#\[$spoiler\](.*?)\[/$spoiler\]#is",$1,$message); 
}

}


You have to add the id of usergroup, and a spoiler MyCode, maybe by code, or in MyBB admincp.

Then add that code and use it at your own in that way only shows on postbit, but you have to say what happens on archive mode and printthread too.

Cheers.
Hello!

With your code, would it be possible to create a hide-tag? I want my users to view images (inside the img-mycode) but not the guests. For 1.6 there was a plugin for that. As mycode I would like to have it also possible to choose with dimensions the replacement would have. Maybe like [ hide width=xx height=xx ] or something.