Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Sep 2011, 03:28
DNCL DNCL is offline
 
Join Date: Jul 2011
BBCode Hide for VB4

Hello,

i need a full functional mod to hide [CODE] or other bbcode contents for a specific group, i have one but for some odd reason it hides the content for other groups too.

Is there a real working one for VB4?

Note: i don't want [ HIDE] [/HIDE ] hack.
Reply With Quote
  #2  
Old 09 Sep 2011, 15:15
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by DNCL View Post
Hello,

i need a full functional mod to hide [CODE] or other bbcode contents for a specific group, i have one but for some odd reason it hides the content for other groups too.
That may be due to post caching. The way things are set up, vb assumes that bbcodes will look the same for everyone viewing a specific style.


Note: i don't want [ HIDE] [/HIDE ] hack.

Why not? Is it not what you're asking for, or you don't like it for some other reason?
Reply With Quote
  #3  
Old 09 Sep 2011, 16:56
DNCL DNCL is offline
 
Join Date: Jul 2011
i have an already posts coded with [CODE] and i just want to hide them.
Reply With Quote
  #4  
Old 09 Sep 2011, 17:57
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, well I guess you could do something like this: edit the template bbcode_code (and maybe bbcode_code_printable as well), and add comments like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Then create a plugin using hook postbit_display_complete and something like this for code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


(of course you can change the usergroup ids and '(Code Removed)' string to whatever you want).

Edit: Actually this doesn't work perfectly. If the code happens to contain <!-- end code --> you'll still see everything after that.

Last edited by kh99; 09 Sep 2011 at 18:03.
Reply With Quote
  #5  
Old 09 Sep 2011, 18:34
DNCL DNCL is offline
 
Join Date: Jul 2011
This worked for me i guess but is this method works 100% and no caching issues for example?

Last edited by DNCL; 09 Sep 2011 at 19:03.
Reply With Quote
  #6  
Old 09 Sep 2011, 18:43
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by DNCL View Post
This worked for me i guess but is this method works 100% and no caching issues for example?
Yes, it happens after the caching so it should be OK (of course now it has to run a preg_replace on every post, but you can't have everything). And like I mentioned above it potentially would mess up if the code included one of those comments, but you change them to something even less likely to appear by accident.
Reply With Quote
  #7  
Old 09 Sep 2011, 19:03
DNCL DNCL is offline
 
Join Date: Jul 2011
can i parse bbcode in the message (Code Removed) ?
Reply With Quote
  #8  
Old 09 Sep 2011, 19:25
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
No, it has to be html. But you could probably render a template, like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


That doesn't let you use bbcode, but it's a little more convenient. I suppose you could run the replacement text through the bbcode parser if you wanted, but it really doesn't let you do anything you couldn't do by inserting html.
Reply With Quote
  #9  
Old 09 Sep 2011, 19:44
DNCL DNCL is offline
 
Join Date: Jul 2011
the HTML tags works with the first plugin you gave me, anything special wit the second one?
Reply With Quote
  #10  
Old 09 Sep 2011, 19:49
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
No, it just lets you put the html in a template but you don't need to do that.
Reply With Quote
  #11  
Old 09 Sep 2011, 19:51
DNCL DNCL is offline
 
Join Date: Jul 2011
Thank you very much, i will be using your plugin for a while now, hope it serve me well on the long run
Reply With Quote
  #12  
Old 13 May 2012, 14:22
Easy5s.net Easy5s.net is offline
 
Join Date: Jun 2011
Show at me is used mod this:
http://www.vbulletin.org/forum/showthread.php?t=271979

but when search showpost then output is not hidden be, me could not be hook to use do not plug at here
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Thread Enhancements MARCO1 BBCODE Hide Tags [ hide] [/ hide] MARCO1 vBulletin 4.x Add-ons 372 01 Feb 2018 13:21
BB Code Enhancements MARCO1 BBCODE Hide Tags [ hide] [/ hide] - Updated For VB 4.1.0 my123world Modification Graveyard 5 06 Dec 2010 21:30



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:10.

Layout Options | Width: Wide Color: