![]() |
Mod to limit certain user groups from seeing parts of a post...
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:
[group=6]blah, blah, blah[/group] |
Anyone? Bueller?
|
Yes, it's called wrapping the code in a template conditional.
|
Quote:
|
No, use a conditional wrapped around what you want to block.
|
Boofo, he wants to do it inside the contents of a post as opposed to using a template.
|
Like the postbit? ;)
|
Quote:
Wait... That won't work, as it would still be viewable in the source, no? |
Ok, first I need to know what it is you are trying to hide. Is it a certain word or phrase?
|
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 )
|
Lynne, you are absolutely correct in your assumption. Post caching will have to be turned off for it to work.
|
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.
|
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. ;)
|
Quote:
|
If you install this mod: https://vborg.vbsupport.ru/showthrea...ghlight=bbcode You will be able to use conditionals with your bbcode. I think that mod will solve your problem.
|
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.
|
Quote:
|
Make sure you turn post caching off or it won't work right.
|
Quote:
Quote:
Quote:
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. |
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! ;) |
Hey, that hack doesn't seem to be working.
|
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. |
All times are GMT. The time now is 07:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|