vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hide all but first post for usergroup (https://vborg.vbsupport.ru/showthread.php?t=300044)

Davey-UK 07-12-2013 03:25 PM

Hide all but first post for usergroup
 
1 Attachment(s)
Hello all.
I am looking for a mod that hides all but the first post to a specific usergroup in a specific category of the forum.
See screenshot & thanks in advance. By the way, i am not too bothered about the search engine side of it, as it will only be implemended on a small section of the forum.

Stefan118 07-12-2013 09:39 PM

You could try limited guest viewing.

https://vborg.vbsupport.ru/showthread.php?t=231352

Davey-UK 07-21-2013 03:49 PM

Ive already tried that, but doesnt fit my needs unfortunately.
I just need to hide thread content after the initial post, unless in a certain usergroup. Even if it means hacking into a default template, that would be fine for now. :(

Lynne 07-21-2013 10:49 PM

You could put a condition around the template (postbit or postbit_legacy, whichever you are using) and say "if !( (is_member_of($bbuserinfo,x) AND $thread[forumid] == y) AND ($post[postcount] != 1) )" (not totally sure that is correct, but you can play with the logic of it).

Davey-UK 07-22-2013 07:31 AM

You've only gone and cracked it Lynne!
Here is what it finally took to get it to work if anyone else is interested.

Code:

<vb:if condition="in_array($thread['forumid'], array(1,2,3)) AND ($post[postcount] != 1) AND !is_member_of($bbuserinfo, 1,2,3,4,5)">
Show a block message
<vb:else />
Show the full post
</vb:if>

You're a diamond, thankyou. :up:

Now to work on tweeking it even more.


All times are GMT. The time now is 03:06 PM.

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.01275 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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