Notify Admin on Registration

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Notify Admin on Registration

Post by RMcGirr83 » Fri Dec 11, 2009 4:34 pm

Try changing this

Code: Select all

date($config['default_dateformat'], $user_row['user_regdate']))
to this

Code: Select all

strftime("%a, %d %b, %G %H" , $user_row['user_regdate']))
That edit is done in includes/ucp/ucp_register.php
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
Lisbon
Registered User
Posts: 825
Joined: Wed Jan 30, 2008 12:28 pm
Location: Zermatt

Re: Notify Admin on Registration

Post by Lisbon » Fri Dec 11, 2009 4:56 pm

RMcGirr83 wrote:Try changing this

Code: Select all

date($config['default_dateformat'], $user_row['user_regdate']))
to this

Code: Select all

strftime("%a, %d %b, %G %H" , $user_row['user_regdate']))
That edit is done in includes/ucp/ucp_register.php
Not work :oops:
Image

Tks for help

mrshs
Registered User
Posts: 34
Joined: Thu Oct 01, 2009 12:54 pm

Re: Notify Admin on Registration

Post by mrshs » Sat Dec 12, 2009 1:26 pm

mrshs wrote:
ISPY06 wrote:i used automod to install and it installed fine,but no email was sent to my admin email. any ideaS?
I have exactly the same problem. I get no e-mail. No nothing. I installed it with automod, and it installed without any error messages. What shall I do?
Is it possible to get some help?

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Notify Admin on Registration

Post by iftitaj » Sat Dec 12, 2009 1:57 pm

Is there this file in your forum's location:

Code: Select all

language/en/email/admin_notify_registered.txt
Also have you purged your cache, refresh template?

mrshs
Registered User
Posts: 34
Joined: Thu Oct 01, 2009 12:54 pm

Re: Notify Admin on Registration

Post by mrshs » Sat Dec 12, 2009 2:22 pm

iftitaj wrote:Is there this file in your forum's location:

Code: Select all

language/en/email/admin_notify_registered.txt
Also have you purged your cache, refresh template?
Hi, thanks so much for your reply!

I did check for the .txt-file. It's there. I've also purged the cache several times- before and now again, just to make sure.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Notify Admin on Registration

Post by iftitaj » Sat Dec 12, 2009 2:57 pm

Are you using english language on your forum?

Have you check manual edit from install.xml ? Maybe AutoMOD failed to edit properly.

Check this:

Open includes/ucp/ucp_register.php

Find:

Code: Select all

					// BEGIN "Notify admin on registration MOD" - most of the code borrowed from phpBB, thank you
					// Don't send e-mail if activation was sent, would only be duplicite
					if ($config['require_activation'] != USER_ACTIVATION_ADMIN) 
					{
						// Grab an array of user_id's with a_user permissions ... these users can activate a user
						$admin_ary = $auth->acl_get_list(false, 'a_user', false);
						$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();

						// Also include founders
						$where_sql = ' WHERE user_type = ' . USER_FOUNDER;

						if (sizeof($admin_ary))
						{
							$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
						}

						$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
							FROM ' . USERS_TABLE . ' ' .
							$where_sql;
						$result = $db->sql_query($sql);
						
						while ($row = $db->sql_fetchrow($result))
						{
							$messenger->template('admin_notify_registered', $row['user_lang']);
							$messenger->to($row['user_email'], $row['username']);
							$messenger->im($row['user_jabber'], $row['username']);

							$messenger->assign_vars(array(
								'USERNAME'			=> htmlspecialchars_decode($data['username']),
								'USER_MAIL'			=> $data['email'],
								'USER_REGDATE'		=> date($config['default_dateformat'], $user_row['user_regdate']))
							);

							$messenger->send($row['user_notify_type']);
						}
						$db->sql_freeresult($result);										
					}
					// END "Notify admin on registration MOD"	
Let me know whether the above code is there and it should be exactly that (except starting spaces in lines, if any).

User avatar
Galilei
Registered User
Posts: 14
Joined: Sun Jun 21, 2009 2:24 am
Location: Spain (Marbella)

Re: Notify Admin on Registration

Post by Galilei » Sat Dec 12, 2009 7:54 pm

Hi,

I have the same problem. My forum is in spanish language and date out in english. The code above message is correct. I did not use AutoMOD to install. I also happened in version 3.0.5, now using the 3.0.6

Thanks
Ciencias Galilei - ver phpBB: 3.0.11 - Styles: X-Static

lovevoice
Registered User
Posts: 146
Joined: Mon Apr 20, 2009 1:52 am

Re: Notify Admin on Registration

Post by lovevoice » Mon Dec 14, 2009 3:21 am

hello ,
Great Mod , but i have a question .
i put to member as a founders then the notifications goes to those members not the admin ?
how can i make the message only for ADMIN which is name is ADMIN not founder ?
thanx

lovevoice
Registered User
Posts: 146
Joined: Mon Apr 20, 2009 1:52 am

Re: Notify Admin on Registration

Post by lovevoice » Fri Dec 18, 2009 1:20 am

up :cry:

lovevoice
Registered User
Posts: 146
Joined: Mon Apr 20, 2009 1:52 am

Re: Notify Admin on Registration

Post by lovevoice » Mon Dec 21, 2009 12:18 am

up again

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Notify Admin on Registration

Post by RMcGirr83 » Mon Dec 21, 2009 12:41 am

If you don't want founders to get emails change this

Code: Select all

                  // Also include founders
                  $where_sql = ' WHERE user_type = ' . USER_FOUNDER;

                  if (sizeof($admin_ary))
                  {
                     $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
                  }
to this

Code: Select all

                  // Also include founders
                  $where_sql = ' ';

                  if (sizeof($admin_ary))
                  {
                     $where_sql = 'WHERE ' . $db->sql_in_set('user_id', $admin_ary);
                  }
then only admins will get the notification.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

gonzo54
Registered User
Posts: 30
Joined: Sun Aug 02, 2009 9:18 am

Re: Notify Admin on Registration

Post by gonzo54 » Mon Dec 21, 2009 1:09 am

Hi, sounds like a nice little mod will this work on v 3.0.6. Thanks in advance

mrshs
Registered User
Posts: 34
Joined: Thu Oct 01, 2009 12:54 pm

Re: Notify Admin on Registration

Post by mrshs » Mon Dec 21, 2009 12:50 pm

iftitaj wrote:Are you using english language on your forum?

Have you check manual edit from install.xml ? Maybe AutoMOD failed to edit properly.

Check this:

Open includes/ucp/ucp_register.php

Find:

Code: Select all

					// BEGIN "Notify admin on registration MOD" - most of the code borrowed from phpBB, thank you
					// Don't send e-mail if activation was sent, would only be duplicite
					if ($config['require_activation'] != USER_ACTIVATION_ADMIN) 
					{
						// Grab an array of user_id's with a_user permissions ... these users can activate a user
						$admin_ary = $auth->acl_get_list(false, 'a_user', false);
						$admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();

						// Also include founders
						$where_sql = ' WHERE user_type = ' . USER_FOUNDER;

						if (sizeof($admin_ary))
						{
							$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
						}

						$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
							FROM ' . USERS_TABLE . ' ' .
							$where_sql;
						$result = $db->sql_query($sql);
						
						while ($row = $db->sql_fetchrow($result))
						{
							$messenger->template('admin_notify_registered', $row['user_lang']);
							$messenger->to($row['user_email'], $row['username']);
							$messenger->im($row['user_jabber'], $row['username']);

							$messenger->assign_vars(array(
								'USERNAME'			=> htmlspecialchars_decode($data['username']),
								'USER_MAIL'			=> $data['email'],
								'USER_REGDATE'		=> date($config['default_dateformat'], $user_row['user_regdate']))
							);

							$messenger->send($row['user_notify_type']);
						}
						$db->sql_freeresult($result);										
					}
					// END "Notify admin on registration MOD"	
Let me know whether the above code is there and it should be exactly that (except starting spaces in lines, if any).
Sorry, for the late reply. I checked the file now, and yes, the whole code is there. :?

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: Notify Admin on Registration

Post by ameeck » Tue Dec 29, 2009 9:38 am

If anyone wants to continue with this MOD, please PM me. I do not have enough time for it and I will gladly pass it to someone else.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Notify Admin on Registration

Post by iftitaj » Tue Dec 29, 2009 10:27 am

mrshs wrote:Sorry, for the late reply. I checked the file now, and yes, the whole code is there. :?
Sorry can't think of any other mistakes/error at your end. :|

Post Reply

Return to “[3.0.x] Abandoned MODs”