vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Deactivate user account temporarily (https://vborg.vbsupport.ru/showthread.php?t=27309)

Thomas P 09-04-2001 08:58 AM

Hi there,
someone ever came accross the idea to temporarily deactivate a member's account - would be helpful occassionally ;)
-Tom

Admin 09-04-2001 10:50 AM

Just create a new usergroup, with no post-permissions.

Thomas P 09-04-2001 01:16 PM

Hi FireFly,
thanks for the kick in the butt! ;)
Sure, that's the best way, so I just create a group "Arrest" with no post-permission and may play with the error-message to state the current status of the user...
Just another quick question :D Would it be hard to create an extra error message for this user group "You're under posting arrest, please wait a week and be a little more friendly in the future"?
Thanks, your fast replies are as always greatly appreciated,
-Tom

Admin 09-04-2001 02:34 PM

Kicking people in the butt is always fun. :D

About the error message, it shouldn't be too hard.
Take a look at functions.php, find this:
PHP Code:

  if ($bbuserinfo[userid]==0) {
    eval(
"standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
  } else {
    eval(
"standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
  } 

change it to
PHP Code:

  if ($bbuserinfo[userid]==0) {
    eval(
"standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
  } elseif (
$bbuserinfo[usergroupid]==555) {
    eval(
"standarderror(\"".gettemplate("error_nopermission_arrested")."\");");
  } else {
    eval(
"standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
  } 

but change 555 to the usergroup of the arrested, and also create a template named error_nopermission_arrested.

Yup, that should work. :)

Thomas P 09-04-2001 04:54 PM

Thanks a bunch, great, very clean solution - thanks! :)
You should become an IT teacher/trainer, since you can make things very clear ;)
-Tom

Admin 09-04-2001 05:05 PM

So it worked... cool. :p

There's one "bug" in this though. If a user tries to get to some kind of admin. options, he'll get a "You are arrested punk!" message. If you care so much I'll try to fix it.

Thomas P 09-05-2001 06:45 AM

Yeah, worked instantly very well! https://vborg.vbsupport.ru/

I lost you here, how could that happen?
If you don't mind, I would like to hear how to solve a potential problem :)

Cheers pal for your help on this

Admin 09-05-2001 10:26 AM

How could that happen? Very easily:

A user tries to edit another's post.
If he is not logged in, he will get the "No permissions not logged in" message.
If he is logged in, and under arrest, he will get the "You are under arrest man" message.
Else, he will get the "No permissions logged in" message.

Got it?

Thomas P 09-05-2001 10:36 AM

Quote:

Originally posted by FireFly
If he is logged in, and under arrest, he will get the "You are under arrest man" message.
Else, he will get the "No permissions logged in" message.

Well, that's fine, isn't it?

Quote:

Got it?
Not sure :D
thx,
-Tom

Admin 09-05-2001 10:42 AM

I guess it's fine... but just make sure you add all of the other options that the regular nopermission templates have.
Just add something for the arrested part.

Hey, if it's good for you, it's sure good for me. :)


All times are GMT. The time now is 06:08 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.01093 seconds
  • Memory Usage 1,742KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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