vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Mod to limit certain user groups from seeing parts of a post... (https://vborg.vbsupport.ru/showthread.php?t=170847)

fly 02-18-2008 03:51 PM

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]

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

Quote:

Originally Posted by Boofo (Post 1453964)
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

Quote:

Originally Posted by Boofo (Post 1454017)
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

Quote:

Originally Posted by Lynne (Post 1454091)
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/showthrea...ghlight=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

Quote:

Originally Posted by Lynne (Post 1454427)
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.

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

Quote:

Originally Posted by Boofo (Post 1454084)
Post caching will have to be turned off for it to work.

Quote:

Originally Posted by Boofo (Post 1454440)
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:

Originally Posted by Boofo (Post 1454602)
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.


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
  • Page Generation 0.01134 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete