Announcement

Collapse
No announcement yet.

[release] Tiny hack: Custom nopermission message to unactivated users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [release] Tiny hack: Custom nopermission message to unactivated users

    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
    Last edited by Mas*Mind; Fri 25th May '01, 4:49pm.

  • #2
    great
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3
      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 . Totally forgot about that

      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.
      Last edited by Mas*Mind; Fri 25th May '01, 4:51pm.

      Comment


      • #4
        Originally posted by Mas*Mind
        because it totally defeats the purpose of email-verification . Totally forgot about that
        LOL
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment


        • #5
          Doesn't anyone (besides eva ) find this hack usefull?

          Comment


          • #6
            Originally posted by Mas*Mind
            Doesn't anyone (besides eva ) find this hack usefull?
            probably for most people the default template message is sufficient
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #7
              I installed it, Thanks!
              ...

              Comment


              • #8
                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.

                Comment


                • #9
                  Mas,

                  I just added this hack, thanks!

                  Comment


                  • #10
                    installed in mine cheers!

                    Comment


                    • #11
                      I installed it too! Thanks!

                      Comment


                      • #12
                        So far so good.

                        This should be very usefull. I am getting loads of emails at the moment from people who can not be bothered to read their emails or they may have not recieved it for some reason. Now they can help themselfs by getting the email resent.

                        I have added it in and tested it and all seems well.

                        One thing though which is not this hack but a problem with VB in general.

                        If you do not allow viewing to unregistered or users awaiting confirmation then they are asked to login when they come to your VB. So they are allowed to login but then get the above permission hack displayed.

                        When they go to the resend activation email link they just keep getting the same page as they do not have permission to view the remail page ?

                        Maybe i missed a setting.
                        Regards

                        Justin
                        Interesting Devices Ltd
                        http://interesting-devices.com
                        http://id-discussions.com
                        http://caravan-smart.co.uk


                        Comment


                        • #13
                          So far so good.

                          This should be very usefull. I am getting loads of emails at the moment from people who can not be bothered to read their emails or they may have not recieved it for some reason. Now they can help themselfs by getting the email resent.

                          I have added it in and tested it and all seems well.

                          One thing though which is not this hack but a problem with VB in general.

                          If you do not allow viewing to unregistered or users awaiting confirmation then they are asked to login when they come to your VB. So they are allowed to login but then get the above permission hack displayed.

                          When they go to the resend activation email link they just keep getting the same page as they do not have permission to view the remail page ?

                          Maybe i missed a setting.
                          Regards

                          Justin
                          Interesting Devices Ltd
                          http://interesting-devices.com
                          http://id-discussions.com
                          http://caravan-smart.co.uk


                          Comment


                          • #14
                            ok iget these erorrs after i installed it and now i try to access my board and here is what comes up

                            Parse error: parse error in ./functions.php on line 1805

                            Warning: Cannot add header information - headers already sent by (output started at ./functions.php:1805) in ./functions.php on line 1187

                            Warning: Cannot add header information - headers already sent by (output started at ./functions.php:1805) in ./functions.php on line 1187

                            Fatal error: Call to undefined function: vbdate() in ./sessions.php on line 354
                            My FFXI Linkshell Website
                            - http://www.stealthvertigo.com

                            Comment


                            • #15
                              you backed up your functions.php right?

                              Then revert it and apply the changes again...You did something wrong (can't figure out what)

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X