Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2002, 05:33 PM
Roxie's Avatar
Roxie Roxie is offline
 
Join Date: May 2002
Location: on vb.org
Posts: 526
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default specific users to start new threads

I was wondering if it was possible to only let certain users start threads in a forum. I want my members to be able to have sort of a journal. They can start the thread in their forum (no one else can), but others can reply. Is this possible?
Thanks
Reply With Quote
  #2  
Old 06-18-2002, 05:38 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you can put thread starters in a special user group and assign forum access permissions so that only this group can create new threads in that forum and others can reply..
Reply With Quote
  #3  
Old 06-18-2002, 05:39 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course...

Just move them into another usergroup, say named "Journal", and set the Forum Permissions for their forum for that usergroup and the Registered usergroup, making sure that the "Journal" members can start new threads in that forum, but the Registered members can only reply

Satan
Reply With Quote
  #4  
Old 06-18-2002, 05:41 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lol...

Logican beat me to it again!

Satan
Reply With Quote
  #5  
Old 06-18-2002, 06:02 PM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, I was going to do something like this too

But, without using usergroups, 'cause otherwise I would have to make a lot of different groups

The idea I came up with: a few subfora where only the admins, super moderators and the moderators of that specific subfora can post new threads.

But then I'll need a peace of code to check wheter or not a user is moderator of that subforum.



Btw, a lot of hacks that concern moderators use if usergroup = 5, but that's a special usergroup at my board
Reply With Quote
  #6  
Old 06-18-2002, 07:30 PM
Roxie's Avatar
Roxie Roxie is offline
 
Join Date: May 2002
Location: on vb.org
Posts: 526
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yea, I will have to make a bunch of different usergroups, but I will see how that works.
Thanks!
Reply With Quote
  #7  
Old 06-19-2002, 06:04 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you dont want to use usergroups and access permissions and if you need to hack that's the line you need :

if ($bbuserinfo[usergroupid]!=X AND $forumid=Y) { show_nopermission();exit;}

This allows only usergroup X to pass the line when forumid is Y (You can add it to newthread.php for new threads, newreply.php for new replies)

for specific users choose this one:

if ($bbuserinfo[userid]!=X AND $forumid=Y) { show_nopermission();exit;}

Same applies, only userid X can pass the line in forum Y.

Hope this helps..
Reply With Quote
  #8  
Old 06-19-2002, 07:40 AM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah well, I figured that out allready, but I'd like moderators (which are actually users that are in the Registered usergroup) to be able to start new threads as well.

So, how about this:
PHP Code:
if (ismoderator($forumid)) AND $forumid=OR $forumid=code to continue }
elseif (
$bbuserinfo[userid]!=AND $bbuserinfo[userid]!=AND $forumid=OR $forumid=Z) { show_nopermission();exit;} 
Would that work?

btw, one more little question, where to put this code and what code should be placed at the "Code to continue" part?
Reply With Quote
  #9  
Old 06-19-2002, 08:00 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

himm.. the code:

PHP Code:
if (!ismoderator($forumid) AND ($forumid==OR $forumid==Y)) 
{
show_nopermission();exit;} 
should do the trick.

For new threads: in newthread.php insert it before:

PHP Code:
if ($foruminfo[allowposting]==0) {
  eval(
"standarderror(\"".gettemplate("error_forumnoreply")."\");");
  exit;

For new replies: in newreply.php before:

PHP Code:
updateuserforum($threadinfo['forumid']); 
Reply With Quote
  #10  
Old 06-19-2002, 08:04 AM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks

Actually, I just came up with the idea to use if != moderator too, so I surfed to this post to tell you but then I saw you allready posted that code

And even more thanks for giving the location to put the code

btw, I'd like it template driven. This code is correct, isn't it?

PHP Code:
if (!ismoderator($forumid)) AND ($forumid=OR $forumid=Z)) 
{eval(
"standarderror (\"".gettemplate "error_newthreadnotallowed")."\");");exit;} 
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 06:30 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.06432 seconds
  • Memory Usage 2,270KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete