The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I want create a bbvode [vip]
Exp : [vip] Content [/vip] Content only view by VIP Members (VIP members have ID=14) Can you help me ??? thanks |
#2
|
|||
|
|||
![]()
It's not as simple as you think as you can't use conditionals in BBCodes.
I'm not sure on how to do this myself, I believe it's creating a new BBCode handler. |
#3
|
|||
|
|||
![]()
can you help me, i need it
|
#4
|
|||
|
|||
![]()
Came across this via google, I realize its old, but if others need it...
To hide messages from anyone not logged into the forum, you cannot do it with BBCODE, you must implement a custom BBCODE as a plugin. This is how you do that: 1. In admincp>add new plugin 2. Hook location = bbcode_create 3. Title = VIP BBCODE (or whatever) 4. PHP CODE: Code:
$custom_bbcode = 'registered'; $this->tag_list['no_option'][$custom_bbcode] = array (); $this->tag_list['no_option'][$custom_bbcode]['callback'] = 'handle_external'; $this->tag_list['no_option'][$custom_bbcode]['external_callback'] = 'hide_message_from_unregistered_users'; if (!function_exists ('hide_message_from_unregistered_users')) { function hide_message_from_unregistered_users (&$theobj, &$value, &$option) { if ($theobj->registry->userinfo['userid']) return $value; else return '<table border="8"><tr><td>This message can only be viewed by logged in Overclockers Members. <a href="overclockers.com/forums/register.php">Register an account</a></td></tr></table>'; } } |
#5
|
||||
|
||||
![]()
Does the above take into account posts are often cached? I've seen some implementations fail because the cached version (with or without the hidden code) gets shown to everyone regardless of their usergroup.
|
#6
|
||||
|
||||
![]()
Just an update, I tested the above code and it's a good start but there are two problems:
1) The cache issue- The cached version will show and it may or may not have the VIP content. But even if you shut off the cache, problem 2) If a non-VIP member quotes a post with VIP content they will see the original post code with everything you are trying to hide. The second might not be an issue if you are hiding from guests since usually guests can't quote posts to begin with- but the cache is still a problem. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|