MOD Email Req not working and how to remove all email feat.?


  -----  
Author Message

Linda Nolan
Member

Wed Feb 20, 2008 6:13 pm   Post subject: MOD Email Req not working and how to remove all email feat.?
Look at that:

http://www.phpbb.com/community/viewtopic.php?f=17&t=769125

As I reported, this MOD "Email Requirement" is not working:

http://www.phpbbhacks.com/download/2280

I am going to ask the same question here, please, if you how to do all of that, reply this thread.

Regards,

Quote:

Is it possible to remove all these options from the board? I don't want them disabled, I want them removed.

The first options, available on each profile.

Always notify me of replies:
Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.

Always show my e-mail address

Notify on new Private Message:

I guess this is the option related to send a notification by email to you when someone send a PM. It should also be removed.

I want that people go to my board instead of checking their mailboxes.

Watch this topic for replies

Again, I don't want any notifications being sent.

The last option I need to remove is the email field on the register page. I want all users being able to create new accounts without having to specify any email address.

I know it's possible to avoid the validation process, however the register screen is asking for email addresses anyway.


If there's no way to do that, I want at least that these options are disabled by default (always show my email address, notify on new PMs and Always notify me of replies).

Note: I am using the last phpBB 2 version, 2.0.23.
 

Thoul
Administrator

Fri Feb 22, 2008 4:31 pm   Post subject: Re: MOD Email Req not working and how to remove all email fe
Remove E-Mail Requirement was designed and tested on phpBB 2.0.18. I haven't had a chance to look at 2.0.23 yet, but that version probably has some differences from 2.0.18 that prevent the mod from working. Some mods upgrade nicely with phpBB, but some don't.

I think you had a wrong impression of what the mod does, anyway. It just makes the email field optional - the field is still displayed.

To remove the "Watch this topic" links, find and remove all instances of {S_WATCH_TOPIC} in your template. viewtopic_body.tpl should have one, but other files might too.

For the other profile options, you'll need to find and delete these entries in profile_add_body.tpl:

Code:

   <tr>
     <td class="row1"><span class="gen">{L_PUBLIC_VIEW_EMAIL}:</span></td>
     <td class="row2">
      <input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>


Code:

   <tr>
     <td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span><br />
      <span class="gensmall">{L_NOTIFY_ON_REPLY_EXPLAIN}</span></td>
     <td class="row2">
      <input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
     <td class="row2">
      <input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>


And also in usercp_register.php, find this:

Code:

   $sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;


After it, add this:

Code:

   $viewemail = 0;
   $notifyreply = 0;
   $notifypm = 0;
 

Linda Nolan
Member

Fri Feb 22, 2008 9:48 pm   Post subject: Re: MOD Email Req not working and how to remove all email fe

Thoul wrote:

I think you had a wrong impression of what the mod does, anyway. It just makes the email field optional - the field is still displayed.
Sorry, but this is not true. The email field is still displayed and unfortunatelly, it's required. If you don't enter a valid email address, you will not be able to make a registration, even if your board doesn't need the validation process.

That's what's bothering me. When I installed your MOD, I was expecting this email field was not required anymore.

Is it true what that user said about phpBB having issues because you are not using any email on your profile? I guess he is making this up, since I know for a fact that WebWiz forums (made using ASP) don't require any email for you to make a register, so if this is optional on this kind of script, why not on phpBB, which is free, by the way?

I also noticed that the profile CP actually have this email field marked with (*) which means you might have removed from the register page, but the profile page is having a conflict with your MOD.

One user pointed out on that thread, these instructions. I don't followed/tested them:

Quote:

That is due to this in includes/usercp_register.php


Code:

$result = validate_email($email);


Quote:

which is then called in includes/functions_validate like this


Code:

    function validate_email($email)
    {
       global $db, $lang;

       if ($email != '')
       {
          if (preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $email))
          {
             $sql = "SELECT ban_email
                FROM " . BANLIST_TABLE;
             if ($result = $db->sql_query($sql))
             {
                if ($row = $db->sql_fetchrow($result))
                {
                   do
                   {
                      $match_email = str_replace('*', '.*?', $row['ban_email']);
                      if (preg_match('/^' . $match_email . '$/is', $email))
                      {
                         $db->sql_freeresult($result);
                         return array('error' => true, 'error_msg' => $lang['Email_banned']);
                      }
                   }
                   while($row = $db->sql_fetchrow($result));
                }
             }
             $db->sql_freeresult($result);

             $sql = "SELECT user_email
                FROM " . USERS_TABLE . "
                WHERE user_email = '" . str_replace("\'", "''", $email) . "'";
             if (!($result = $db->sql_query($sql)))
             {
                message_die(GENERAL_ERROR, "Couldn't obtain user email information.", "", __LINE__, __FILE__, $sql);
             }
         
             if ($row = $db->sql_fetchrow($result))
             {
                return array('error' => true, 'error_msg' => $lang['Email_taken']);
             }
             $db->sql_freeresult($result);

             return array('error' => false, 'error_msg' => '');
          }
       }

       return array('error' => true, 'error_msg' => $lang['Email_invalid']);
    }


Quote:

so if the email field is blank, it will toss an error saying "Email is invalid" or something like that.

So, comment that line out in includes/usercp_register.php so it looks like this


Code:

    //      $result = validate_email($email);


I was beginning to think that your MOD was not really tested or completed or my version was entirely different and doesn't match with your MODifications.

Please, check this out! The email field is still being required and if you put something different from linda@email.com on that field, you will not be able to make a register.

Perhaps you have missed that part on your MOD. If you include those instructions, this MOD might work.
 

Thoul
Administrator

Mon Feb 25, 2008 4:03 pm   Post subject: Re: MOD Email Req not working and how to remove all email fe

Quote:

Is it true what that user said about phpBB having issues because you are not using any email on your profile?


phpBB can have a few problems in this situation. It usually revolves around sending e-mails, which it sounds like you don't want to happen anyway. It's perfectly possible for the forum to run without an e-mail address in the profiles.

Quote:

since I know for a fact that WebWiz forums (made using ASP) don't require any email for you to make a register, so if this is optional on this kind of script, why not on phpBB, which is free, by the way?


Because phpBB 2 has been feature frozen for six years. The developers have only made bug and security fixes to the software during that time. Much of the software is outdated by today's standards.

New features were introduced only in phpBB 3.0, which is also now feature frozen and will see only bug and security fixes.

Quote:

I was beginning to think that your MOD was not really tested or completed or my version was entirely different and doesn't match with your MODifications.


The mod was fully tested and working on the phpBB version stated in the mod. I can't comment on your version, as the mod has not been tested on that.

Quote:

I also noticed that the profile CP actually have this email field marked with (*) which means you might have removed from the register page, but the profile page is having a conflict with your MOD.


The * is removed from the subsilver profile editor during the install of the modification. If you've installed another template or a profile replacement mod, you'll have to remove the * mark from that yourself.
 

Page 1 of 1
Display posts from previous: