Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2006, 04:29 PM
cd1986 cd1986 is offline
 
Join Date: Sep 2005
Location: UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 05-23-2006, 05:09 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's a built in vbulletin setting. No need to use conditionals.
Reply With Quote
  #3  
Old 05-23-2006, 06:11 PM
cd1986 cd1986 is offline
 
Join Date: Sep 2005
Location: UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 05-23-2006, 07:21 PM
rogersnm rogersnm is offline
 
Join Date: Apr 2006
Location: Cyberspace, UK
Posts: 729
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wouldn't you be able to get the if's off the postbit and copy them to the threadbit?
Reply With Quote
  #5  
Old 05-23-2006, 07:49 PM
simsimt simsimt is offline
 
Join Date: Nov 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 05-23-2006, 08:13 PM
cd1986 cd1986 is offline
 
Join Date: Sep 2005
Location: UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03824 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete