MyBB Community Forums

Full Version: Member.php -> Need some help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Mybb,

Alright so, I wanted to make an edit that made "Email notification upon getting a PM" a default checked option. (When you register it's set to "off"
by default. )

So I did some googling, and I found a thread. I tried the SQL statement

Found in this thread: http://community.mybb.com/archive/index....729-2.html

UPDATE mybb_users SET emailnotify='yes' WHERE emailnotify='no';

I changed the "emailnotify" to "emailpmnotify", and it didn't work.
Then I changed it to "pmnotify" (after looking at the fields) and it said
success, but only affected 0 rows.

I only did that though, because the source edit appeared not to work.

The source edit, I found here: http://community.mybb.com/showthread.php?tid=14281

And this is now my current member.php file:

if(!$fromreg)
		{
			$allownoticescheck = "checked=\"checked\"";
			$hideemailcheck = '';
			$emailnotifycheck = '';
			$receivepmscheck = "checked=\"checked\"";
			$pmnoticecheck = " checked=\"checked\"";
			$emailpmnotifycheck = 'checked=\"checked\"';
			$invisiblecheck = '';
			if($mybb->settings['dstcorrection'] == 1)
			{
				$enabledstcheck = "checked=\"checked\"";
			}
			
		}

After doing the source edit, I refreshed all caches and and settings and
what not, and it still doesn't work. When I went to view a member, who I
know has it off, it's not set to "on". .__.

So, any help on getting this checked by default?

-Viral.
That thread is for support for a 1.2 forum, it's not a good idea to try and use stuff for 1.2 on 1.6, as it most likely won't work.

First off, a query will only affect current users, won't do anything for new users.You don't need to edit PHP files to do this, in the member_register template, find:

<td valign="top" width="1"><input type="checkbox" class="checkbox" name="emailpmnotify" id="emailpmnotify" value="1" {$emailpmnotifycheck} /></td>

replace with:

<td valign="top" width="1"><input type="checkbox" class="checkbox" name="emailpmnotify" id="emailpmnotify" value="1" checked="checked" /></td>

And now it will be ticked by default.
Matt,

Hey, thanks for the quick reply. I went ahead and made the edit.
And now anyone who registers in the future, should be fine. What am
I to do for the current members though?

(Also thanks for the quick code editing).

What type of query could I use to affect current members to make it default?

-Viral.
Run this query:

UPDATE `mybb_users` SET `pmnotify` = '1';
Matt,

Wow...It was so simple. Lol. That's awesome. Thanks for the
quick help and the patience with me.

-Viral.
I'm faviouz, not Matt.

Though you can say we're both awesome. Toungue
Faviours,

Oh, orange, sorry. I saw the read from the corner of my eye, while reading the
post and thought it was Matt. Sorry about that. .__. /*fail on me*

Thanks to you both.

-Viral.