Log in

View Full Version : Mod to limit certain user groups from seeing parts of a post...


fly
02-18-2008, 03:51 PM
I *think* I've seen a mod where I could prevent/allow certain user groups from seeing parts of a post. Anyone know what its called? I want to be able to do something like this:

blah, blah, blah

fly
02-29-2008, 08:40 PM
Anyone? Bueller?

Boofo
02-29-2008, 08:46 PM
Yes, it's called wrapping the code in a template conditional.

fly
02-29-2008, 08:55 PM
Yes, it's called wrapping the code in a template conditional.

I'm thinking that you're suggesting that I can do it via BB code?

Boofo
02-29-2008, 09:25 PM
No, use a conditional wrapped around what you want to block.

Opserty
02-29-2008, 09:37 PM
Boofo, he wants to do it inside the contents of a post as opposed to using a template.

Boofo
02-29-2008, 09:44 PM
Like the postbit? ;)

fly
02-29-2008, 10:02 PM
Like the postbit? ;)

You're so elusive! How can I dynamically hide content in a template?

Wait... That won't work, as it would still be viewable in the source, no?

Boofo
02-29-2008, 10:48 PM
Ok, first I need to know what it is you are trying to hide. Is it a certain word or phrase?

Lynne
02-29-2008, 10:51 PM
Somebody was talking about something like this earlier and it was brought up that you need to turn off the post caching also. I must admit to being pretty post cache ignorant, but that is something that might want to be brought up. (And, if I'm totally wrong about this, then, um, I'll just shut up. :D )

Boofo
02-29-2008, 11:20 PM
Lynne, you are absolutely correct in your assumption. Post caching will have to be turned off for it to work.

Lynne
02-29-2008, 11:33 PM
Well then, I think I know where you are going with the idea... just wrap a conditional around the message part of the postbit? Although, I can't tell from the original post if the user was wanting to do this with all posts or wanting some BBCode for users to be able to do this themselves.

Boofo
03-01-2008, 12:06 AM
That's the way I would do it unless they are only trying to hide code and php stuff. Then they would have to go the the bbcode templates. You got it from here, Lynne. ;)

fly
03-01-2008, 01:05 PM
Well then, I think I know where you are going with the idea... just wrap a conditional around the message part of the postbit? Although, I can't tell from the original post if the user was wanting to do this with all posts or wanting some BBCode for users to be able to do this themselves.

Some BB code was what I was looking for I guess that at least myself, as an administrator, can use.

Lynne
03-01-2008, 02:56 PM
If you install this mod: https://vborg.vbsupport.ru/showthread.php?t=149107&highlight=bbcode You will be able to use conditionals with your bbcode. I think that mod will solve your problem.

Boofo
03-01-2008, 03:17 PM
And post caching will have to be turned off for that hack to function properly also. Anytime you do code replacements like this, caching will have to be turned off. Otherwise, the purpose of the replacement is defeated until the caching catches up to it.

fly
03-01-2008, 06:47 PM
If you install this mod: https://vborg.vbsupport.ru/showthread.php?t=149107&highlight=bbcode You will be able to use conditionals with your bbcode. I think that mod will solve your problem.

Yes yes! That's it. Thank you so much!

Boofo
03-01-2008, 06:50 PM
Make sure you turn post caching off or it won't work right.

Lynne
03-01-2008, 08:51 PM
Post caching will have to be turned off for it to work.

And post caching will have to be turned off for that hack to function properly also. Anytime you do code replacements like this, caching will have to be turned off. Otherwise, the purpose of the replacement is defeated until the caching catches up to it.

Make sure you turn post caching off or it won't work right.
What Bob? Did you say post caching will have to be turned off? :D




vboptions > Server Settings & Optimizations > Cached Posts Lifespan
Posts are normally stored with bbcode tags etc. in the same form as the user posted them with so that it may be edited later, and then parsed at display time. By caching them, they are parsed at post time (instead of display time) into the HTML they will be displayed in and stored separately from the pre-parsed posts. This results in a faster display on threads, since the posts do not have to be parsed at display time.

This option determines how long posts are stored. While a post is cached, it will take approximately twice as much storage space since it is essentially being stored twice. If you have a busy site, and threads typically don't last very long, you can probably set this to a lower value such as 10 days. If you have a slower site, and threads typically last longer, 20 to 30 days might be a better choice. If you have the disc space, you can set this to a higher value for better performance.

Boofo
03-01-2008, 08:55 PM
No, what I mean to say was that the POST CACHING will have to be turned off.

You and I both know if you don't say it enough times then the "why didn't this damned hack work like it is supposed to" questions will pop up soooner or later. So, with that said...

Turn the post cache off! ;)

fly
03-01-2008, 09:11 PM
Hey, that hack doesn't seem to be working.

DragonBlade
10-17-2008, 11:29 AM
I installed taht hack on a 3.7.3 board, and all seemed to be working... when I first posted it. After going back to it, I guess that post-cache thing interfered with it, because it was displaying the <if> and <else> tags as regular HTML tags when I viewed the HTMl source. >_>

Thankfully I found this thread, that told me post-caching was the problem, so I disabled it.