vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Tiny hack: Custom nopermission message to unactivated users (https://vborg.vbsupport.ru/showthread.php?t=18140)

Mas*Mind 05-25-2001 10:00 PM

Description: This hack prints a custom message to users that want to take an action they can't because they didn't activated their account yet. This probably saves you alot of emails from users who didn't properly read their activation-email asking you why they can't post while they did register.

VB-Version: Probably every version, certainly every 2.0 version

Instructions:
  1. open (and backup first) admin/functions.php
  2. Do a search for ###################### Start show_nopermission #######################
  3. replace
    PHP Code:

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

  4. with
    PHP Code:

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

  5. create a new template called error_nopermission_awaiting_moderation
  6. add the following content in it:
    PHP Code:

    You have recently registered at $bbtitle but not yet activated your accountYou can find the link to activate your account in your welcome-email.

    <
    p align="center">
    <
    table border="0" bgcolor="#555576" cellpadding="4" cellspacing="1" align="center">
    $logincode
    </table>
    </
    p>

    <
    p><smallfont>If you didn't received the activation-email <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> to resend it. <a href="member.php?s=$session[sessionhash]&action=lostpw">Forgotten your password?</a></smallfont> 

  7. save and upload admin/functions.php
  8. enjoy :)

eva2000 05-25-2001 10:30 PM

great :D

Mas*Mind 05-25-2001 11:46 PM

For those who allready installed this hack: You might wanna remove the
PHP Code:

You can activate your account <a href="register.php?s=$session[sessionhash]&a=act&u=$bbuserinfo[userid]&i=$bbuserinfo[joindate]">here</ain case you deleted the email

bit from your template because it totally defeats the purpose of email-verification :o. Totally forgot about that :D

Put this bit in it instead:

If you didn't received the activation-email <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> to resend it.

eva2000 05-25-2001 11:50 PM

Quote:

Originally posted by Mas*Mind
because it totally defeats the purpose of email-verification :o. Totally forgot about that :D
LOL :D

Mas*Mind 05-26-2001 10:33 AM

Doesn't anyone (besides eva ;)) find this hack usefull?

eva2000 05-26-2001 11:41 AM

Quote:

Originally posted by Mas*Mind
Doesn't anyone (besides eva ;)) find this hack usefull?
probably for most people the default template message is sufficient :)

Joshs 05-27-2001 12:38 AM

I installed it, Thanks!

Mas*Mind 05-28-2001 06:55 PM

I'm quite surprised this hack isn't that popular. Since I installed this hack I haven't got any email from members who are asking why they can post while they registered just because they didn't read their activation email properly (thus didn't activated their account). Before that I got a couple of them each day... Saves me alot of explanation.

Robert Basil 05-28-2001 10:49 PM

Mas,

I just added this hack, thanks!

BluSmurf 05-29-2001 01:41 PM

installed in mine :D cheers!


All times are GMT. The time now is 06:57 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.01087 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete