Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: LDeeJay on August 06, 2008, 11:19:51 PM

Title: Notify Default On
Post by: LDeeJay on August 06, 2008, 11:19:51 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1318)

Set "Turn notification on when you post or reply to a topic." default to on.

As soon as the user registers, this option is set in the user profile. It can be turned off again by the user or by default after uninstalling.
Title: Re: Notify Default On
Post by: Armin2008 on August 07, 2008, 12:44:54 AM
Nice modification. Very handy.
Title: Re: Notify Default On
Post by: Nibogo on August 07, 2008, 09:24:53 PM
Simple but nice mod
Title: Re: Notify Default On
Post by: Bobn on September 28, 2008, 07:34:40 PM
Hello,

Getting errors on a 1.6 install,, any help?
Title: Re: Notify Default On
Post by: LDeeJay on September 28, 2008, 08:04:45 PM
I just did a test on 1.1.6 without errors. What's the message?
Title: Re: Notify Default On
Post by: Bobn on September 28, 2008, 08:06:32 PM
1. Execute Modification modification.xml Modification parse error
2. Execute Modification - Modification parse error


http://www.mysite.com/forum/index.php?action=packages;sa=install;package=NotifyON.zip 
8: Undefined index: package_readme
File: /home/mysite.com/httpdocs/forum/Sources/Packages.php
Line: 294
Title: Re: Notify Default On
Post by: LDeeJay on September 28, 2008, 08:30:50 PM
Is 1.1.6 your first installation or did you use previous versions of SMF as well and is this an upgrade? Look like it's the installer that goes wrong, not my script. What if you do a manual installation?
Title: Re: Notify Default On
Post by: Bobn on September 28, 2008, 08:32:22 PM
Quote from: LDeeJay on September 28, 2008, 08:30:50 PM
Is 1.1.6 your first installation or did you use previous versions of SMF as well and is this an upgrade? Look like it's the installer that goes wrong, not my script. What if you do a manual installation?

Hi,

its a conversion from phpbb. I didnt see the manual install instructions??
Title: Re: Notify Default On
Post by: LDeeJay on September 28, 2008, 08:47:04 PM
On this  (http://custom.simplemachines.org/mods/index.php?mod=1318)page you can select your version on the right and click submit. The page that follows will show you what to change. (It's a slight adjustment of Register.php). If not, let me know, I'll post them here.
Title: Re: Notify Default On
Post by: Soms on September 29, 2008, 02:33:12 AM
Nice Mod!
Title: Re: Notify Default On
Post by: djrem on September 29, 2008, 08:59:07 AM
Isnt this already available in the Theme options as standard?
Title: Re: Notify Default On
Post by: LDeeJay on September 29, 2008, 09:11:54 AM
I'm not sure. Does it depend on which theme you use? It wasn't available in mine..  (using the bloc (http://www.bloczone.net/) theme). Which option would you use then?
Title: Re: Notify Default On
Post by: Sabreā„¢ on November 10, 2008, 12:34:46 PM
Quote from: djrem on September 29, 2008, 08:59:07 AM
Isnt this already available in the Theme options as standard?

hmmm  I havent seen this option available in any of the themes Ive used.
Would be interested to see which theme you speak of buddy, always willing to learn more. :)

Thank you LDeeJay.
I was thinking earlier about setting a few options to default, and you have now given me a brilliant angle to look at.

Good work buddy :)

Title: Re: Notify Default On
Post by: afe on December 22, 2008, 12:01:25 PM
Hello, I've installed http://custom.simplemachines.org/mods/index.php?mod=1318
and I've tested it out many times for hours, and it still doesn't work.

Please help and thank you. 
Title: Re: Notify Default On
Post by: LDeeJay on December 22, 2008, 12:19:59 PM
What version of SMF do you use? Do you have access to the database? Can you register as a new user and see what's added to the smf_themes table?
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 02:21:08 PM
1.1.7 and I am in the database, the smf_themes table in phpMyAdmin but I don't know what I'm supposed to look for.

Thanks, please help. :)
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 02:38:34 PM
Wait, it works! Yay! I think the reason for why it wasn't working was because I changed the default theme to a different theme (without installing the package, just replaced the files), but now it works!

Just one thing - how do I edit what the user gets. Right now it says
"A reply has been posted to a topic you are watching by Administrator.

View the reply at: http://www.forums.mywebsiteblahblah.com/index.php?topic=4.new;topicseen#new

Unsubscribe to this topic by clicking here: http://www.forums.mywebsiteblahblah.com/index.php?action=notify;topic=4.0

More replies may be posted, but you won't receive any more notifications until you read the topic.

Regards,
The My Website Team."

Let's say I want it to put in what the post actually was. So if I said "testing hello, blah blah cool", it would say something like 'Admin posted "testing hello, bla..." on this site click here to view blah blah'

And also, how do I remove the unsubscribe link?

Thanks. :)
Title: Re: Notify Default On
Post by: LDeeJay on December 22, 2008, 02:40:17 PM
First, did you do a manual install or auto?

Then, when you check register.php, can you see

$request = db_query("
INSERT INTO smf_themes
(ID_MEMBER, variable, value)
VALUES (" . $memberID . ", 'auto_notify', 1)", __FILE__, __LINE__);


When you register as a new user, you should check smf_members to see the memberID your new member got.
Then look at the smf_themes table and check if there's a record for that memberID, with variable auto_notify and value 1.

If not, send me your register.php and I'll have a look.
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 02:50:22 PM
Yeah, it has a value of 1.
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 02:52:26 PM
It works fine perfectly with the default theme, but I've installed another theme and now it doesn't work. The theme that I've installed is http://custom.simplemachines.org/themes/index.php?lemma=1248
Title: Re: Notify Default On
Post by: LDeeJay on December 22, 2008, 03:15:45 PM
That's funny, it has nothing to do with the theme. Can you send me register.php?

To change the content, search for PersonalMessage.english.php in either Themes\default\languages or in your themes folder.

Inside you may find the text you want. Removing the variables starting with a $ will remove the links from your message.
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 03:39:25 PM
Here's the Register.php

Title: Re: Notify Default On
Post by: 4Kstore on December 22, 2008, 03:53:29 PM
Is perfect !!!

ThankS!
Title: Re: Notify Default On
Post by: LDeeJay on December 22, 2008, 03:54:22 PM
Allright, that one looks fine. Similar to what I've got, so...
And do you see the new memberID and auto_notify and value 1 in smf_themes?
Title: Re: Notify Default On
Post by: afe on December 22, 2008, 03:57:34 PM
Yes. OHH, I know. It says "More replies may be posted, but you won't receive any more notifications until you read the topic." so that's why. But how do I make it everytime someone posts, they user will get it?

Thanks. :)
Title: Re: Notify Default On
Post by: nancym on January 20, 2009, 08:36:01 AM
Is there a way in php or sql to set existing members to auto reply? This is a new forum and I hope I don't have to go into each profile and set this up.

Using 1.1.7 Using Classic theme modified by me. Everything seems to be working fine.

thanks
Title: Re: Notify Default On
Post by: LDeeJay on January 20, 2009, 08:47:20 AM
You could do that with an SQL statement if you have (direct) access to the db:

UPDATE smf_themes SET auto_notify = 1;

Otherwise you might want to put this into a php-file and execute it from there.
Make sure you are admin and have a backup.

Was a bit too quick and got two subjects mixed up now... hold on, correct answer in a minute.
The correct statement would be:

UPDATE smf_themes SET value = 1 WHERE variable = 'auto_notify';

Make sure you are admin and have a backup.
Title: Re: Notify Default On
Post by: krick on July 06, 2009, 01:19:05 PM
Is this mod compatible with SMF 1.1.9 ?
Title: Re: Notify Default On
Post by: Nibogo on July 06, 2009, 01:36:59 PM
Quote from: krick on July 06, 2009, 01:19:05 PM
Is this mod compatible with SMF 1.1.9 ?

Yes you just need to modify the package-info.xml adding 1.1.9 ;)
Title: Re: Notify Default On
Post by: krick on July 06, 2009, 01:58:11 PM
I doesn't appear to work.

I installed the mod, and double checked the source files on my server to make sure that the changes were actually made.  I registered a new test user.

I expect to see a new auto_notify entry in the smf_themes table for this user, but it was not created.

Going into the user preferences for this new user, "Turn notification on when you post or reply to a topic." is unchecked.

Has there been a change to Register.php between 1.1.6 and 1.1.9 that would prevent the modification from working?

Is it possible that reCAPTCHA conflicts with this mod?
Title: Re: Notify Default On
Post by: shane is my name on November 26, 2009, 12:35:58 AM
Hi I Love this mod, BUt once I changed my registration method to "Member Activation"  (via email), then the new members are not set up with the default notify ON anymore.

The code is still in the register file.  Im guessing that it just skips that section now that its using member activation? HAs anyone found a way to still use this NOTIFY ON mod even when they use Member Activation?
Title: Re: Notify Default On
Post by: shane is my name on November 29, 2009, 09:27:40 PM
I thought I read somewhere that this was included with smf 2.0...  But I just installed a 2.0 rc2 forum and I can not find this feature anywhere.

Do I still need to use this mod in 2.0?
Title: Re: Notify Default On
Post by: checkmater on December 03, 2009, 06:35:16 PM
Quote from: shane is my name on November 29, 2009, 09:27:40 PM
Do I still need to use this mod in 2.0?

Dont remember where I read about it but that function is included in SMF 2.0 for sure....

I just installed it on 1.1.11 and is working fine.
Title: Re: Notify Default On
Post by: dragonway on February 25, 2010, 01:54:27 AM
Quote from: shane is my name on November 26, 2009, 12:35:58 AM
Hi I Love this mod, BUt once I changed my registration method to "Member Activation"  (via email), then the new members are not set up with the default notify ON anymore.

The code is still in the register file.  Im guessing that it just skips that section now that its using member activation? HAs anyone found a way to still use this NOTIFY ON mod even when they use Member Activation?

Hi shane

I just had the same problem, and I found the solution  :)

When the email member activation is used, the following code is within a "else" :

Quote
// Set notifications on by default.... the user can change this later.
   
      $request = db_query("
         INSERT INTO {$db_prefix}themes
            (ID_MEMBER, variable, value)
         VALUES (" . $memberID . ", 'auto_notify', 1)", __FILE__, __LINE__);

The content of this "else" is not executed. So you need to move this code in the "elseif" just above. I did it and it works fine now, with email member activation  8)
Title: Re: Notify Default On
Post by: shane is my name on February 25, 2010, 02:05:15 AM
hey thanks for that info.  I had given up on the issue thinking it was a lost cause.  but im glad you found the solution, Im gonna do what you said.  :)  thanks again!
Title: Re: Notify Default On
Post by: chumley1 on June 13, 2010, 09:29:36 PM
Newbie here.....just come to look for this particular info. Can you please elaborate on this? which file this is in and what to move and where to exactly ... thanks for any help.
Title: Re: Notify Default On
Post by: chumley1 on June 13, 2010, 09:44:09 PM
Scratch that.... sorted now ;)
Title: Re: Notify Default On
Post by: WhatsTheRent on June 30, 2010, 06:19:03 PM
I'd love to have this mod for 2.0 RC3
Title: Re: Notify Default On
Post by: chat2joe on October 25, 2010, 12:38:55 PM
So would I!!  Why isn't notify default anyway?!