vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Thread Starter Conditional? (https://vborg.vbsupport.ru/showthread.php?t=116475)

cd1986 05-23-2006 03:29 PM

Thread Starter Conditional?
 
I want to make it so that only thread starters and admins can see a thread in a particular forum. Not sure of the correct conditional usage for this though.

Can anyone assist me on this one?

amykhar 05-23-2006 04:09 PM

It's a built in vbulletin setting. No need to use conditionals.

cd1986 05-23-2006 05:11 PM

Maybe i've missed the setting you're referring to - i've set forum permissions so that all regular users cannot "view others' threads" or "reply to others' threads" and this stops people viewing the actual thread content. However, i can still see the full list of threads in forumdisplay.

Is there a way to only let a user see the threads they have started in forumdisplay ($threadbits) and no others? I originally tried it using:

Code:

<if condition="$foruminfo[forumid] == 'x'">
<if condition="$threadinfo['postuserid'] == $bbuserinfo['userid'] && $threadinfo['firstpostid'] = $bbuserinfo['userid']">
$threadbits
</if>
<else />
$threadbits
</if>

But it failed spectacularly. Or have i just not found the correct vB setting?

rogersnm 05-23-2006 06:21 PM

wouldn't you be able to get the if's off the postbit and copy them to the threadbit?

simsimt 05-23-2006 06:49 PM

Like what amykhar said, what you're trying to achieve can be done without any template/conditionals editing. I already have set a forum on my forum where members can only see/reply to their own threads without being able to see other threads by other memebrs on the same forum.

To do this, you need to edit the desired usergroup (mostly registered users) permissions. Follow the steps:

AdminCP -> Forums & Moderators -> Forum Permissions.

Locate the forum you want to edit permissions for, then click on [Edit] next to the appropriate usergroup.

Then modify the forum permissions as follows:
Forum Viewing Permissions

Can View Forum: Yes
Can View Thread Content: Yes
Can View Others' Threads: No

Post / Thread Permissions

Can Post Threads: Yes
Can Reply to Own Threads: Yes
Can Reply to Others' Threads: No

All the other values wouldn't affect the principal goal, so you're free to edit them as you like.

cd1986 05-23-2006 07:13 PM

Thanks guys - turned out to be my error. I'd got all the permissions set up, but forgotten that the "registered user" i was using for testing had an overriding access mask on that particular sub-forum, thus making all my testing useless. Works fine now of course.

I'd still be interested in that conditional though, just out of curiosity. ;)

EDIT:

Code:

<if condition="$thread['postuserid'] == $bbuserinfo['userid'] && $thread['firstpostid'] = $bbuserinfo['userid']">
Works if used in threadbit...


All times are GMT. The time now is 12:59 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.02360 seconds
  • Memory Usage 1,715KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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