vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   "Member Can't View Replies" (https://vborg.vbsupport.ru/showthread.php?t=117755)

Hogwarts 06-06-2006 12:57 AM

"Member Can't View Replies"
 
I am going to start developing a Hogwarts (Harry Potter) type vB soon, and I wanted to get some of my ideas out there for hacks. I don't think anything like this exists yet. I would like an add-on permission.

A permission that can be active for different forums. And here is what a normal user would have.

They can view the forum and all the regular default stuff but ...

They can NOT create their own threads (that's already there)

they can reply to the main thread (that's there as well)

Now when people hand in their "homework" I would like all the mods and upper class people to be able to read the threads, but NOT the regular members, so they can't copy and cheat ya know? I'd be nice if the student could see their own post so they knew it went threw, but that doesn't have to be there. though I’m not sure how they would know it went threw?

So yea a permission for "Memeber Can't View Replies"

if that makes since?

Reply with questions if anyone has some.

Edit: I found this, but it's for guests only right?
https://vborg.vbsupport.ru/showthrea...how+first+post

Maybe that could be edited to achive this? Also im not sure if that allows them to reply?

peterska2 06-06-2006 01:06 AM

This is available via usergroup permissions on a per forum basis.

You can set the permissions in the forum for 'can view others threads' to NO which will then only allow them to view the threads that they have created in the forum. You will need to apply this to every usergroup that you wish to hand in homework.

Make sure you set the guest permissions to deny view permissions for that forum too, otherwise they might cotton on to the fact that they can logout and see everything that way and cheat ;)

Hogwarts 06-06-2006 01:21 AM

That's not what I wanted though, I want them to be able to view the thread, just not the replys of other members.

So the teacher (mod/mega mod/admin ect) would create a homework assignment thread, and have a member reply.

Understand?

if worst comes to worst i'll just make them PM the teachers.

peterska2 06-06-2006 01:35 AM

Ah, I was imagining a different setup.

No problem :)

The modification that you have linked to will work, with a little modification of it's own.

Replace
Code:

!$bbuserinfo['userid']
with
Code:

in_array($bbuserinfo['usergroupid'], array(5,6,7))
If you have any additional usergroups that you wish to see the posts, add the id number to the list. Any usergroups not listed here will not meet the condition and so will not see the posts. I have allowed Moderators, Super Moderators and Administrators to view the posts in the code given.

Hogwarts 06-06-2006 01:51 AM

At the moment my vB licance is up, and I only have a 3.0.6 *I have an owned licance, its just i haven't had the money to upgrade to 3.5+ and I am going to in a day or two, I thought due to the fact that it was a templat mod i'd try it on my localhost vB i had to mess around with, but I got this error.

Code:

The following template conditional expression contains function calls:

<if condition="$post[postcount] > XX andin_array($bbuserinfo['usergroupid'], array(5,6,7))">

Function Name Usage in Expression
andin_array andin_array($bbuserinfo[\'usergroupid\'], array(5,6,7)

With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression.

The following functions are allowed in template conditional expressions:
in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of()


peterska2 06-06-2006 01:54 AM

make sure you have a space between the and and the in_array


All times are GMT. The time now is 11:58 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.01152 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)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