[RC1] Prime Notify Topic - Add Msg to Notification Email

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by primehalo » Mon Jan 14, 2008 7:17 pm

Find:

Code: Select all

            $author  = !isset($msg_data['author'])        ? '' : $msg_data['author']; // This is the name, not the ID
  
Replace with:

Code: Select all

            $author  = !isset($msg_data['username'])    ? '' : $msg_data['username']; // This is the name, not the ID
  
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ItsPaPPy
Registered User
Posts: 9
Joined: Sat Jan 12, 2008 12:28 am

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by ItsPaPPy » Mon Jan 14, 2008 7:32 pm

thank you and FYI the above needs to be located in functions_posting.php
just cause i knew someone would ask

but it doesnt seem to work....

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 7:56 pm

primehalo wrote:Find:

Code: Select all

            $author  = !isset($msg_data['author'])        ? '' : $msg_data['author']; // This is the name, not the ID
   
Replace with:

Code: Select all

            $author  = !isset($msg_data['username'])    ? '' : $msg_data['username']; // This is the name, not the ID
   
Muchas gracias!
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

ItsPaPPy
Registered User
Posts: 9
Joined: Sat Jan 12, 2008 12:28 am

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by ItsPaPPy » Mon Jan 14, 2008 8:15 pm

i do what yall say to do
but all i get is this
Topic: Reply here testing something
Author:
Message:
I replied.

still no author :(

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by primehalo » Mon Jan 14, 2008 8:18 pm

My mistake, it's supposed to be replaced with this:

Code: Select all

            $author  = $user->data['username']; // This is the name, not the ID
 
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 8:21 pm

oops, me too. Author still blank.
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 8:35 pm

Hang on, please. Are we talking about changes in these lines of code?

Code: Select all

		if (isset($msg_data['message']))
		{
			$author  = !isset($msg_data['username'])		? '' : $msg_data['username']; // This is the name, not the ID
			$message = !isset($msg_data['message'])		? '' : $msg_data['message'];
			$uid     = !isset($msg_data['bbcode_uid'])	? '' : $msg_data['bbcode_uid'];	// bbcode uid if bbcodes are enabled for this message
I switched it from author to username inside those brackets. The correction you just mentioned above doesn't quite match. Am I in the wrong section of code?
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

ItsPaPPy
Registered User
Posts: 9
Joined: Sat Jan 12, 2008 12:28 am

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by ItsPaPPy » Mon Jan 14, 2008 8:36 pm

primehalo wrote:My mistake, it's supposed to be replaced with this:

Code: Select all

            $author  = $user->data['username']; // This is the name, not the ID
   
yayyyy!!!

Topic: Reply here testing something
Author: Blood
Message:
freak-a-leek

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 8:55 pm

OK, got it. Thanks!

Any thoughts on how to remain on the notification without having to return to the forum?
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 9:20 pm

I'm pretty sure it's in here(the remain getting notifications tweak I'm after):

Code: Select all

	// Handle the DB updates
	$db->sql_transaction('begin');

	if (!empty($update_notification['topic']))
	{
		$sql = 'UPDATE ' . TOPICS_WATCH_TABLE . "
			SET notify_status = 1
			WHERE topic_id = $topic_id
				AND " . $db->sql_in_set('user_id', $update_notification['topic']);
		$db->sql_query($sql);
	}

	if (!empty($update_notification['forum']))
	{
		$sql = 'UPDATE ' . FORUMS_WATCH_TABLE . "
			SET notify_status = 1
			WHERE forum_id = $forum_id
				AND " . $db->sql_in_set('user_id', $update_notification['forum']);
		$db->sql_query($sql);
	}
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

ItsPaPPy
Registered User
Posts: 9
Joined: Sat Jan 12, 2008 12:28 am

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by ItsPaPPy » Mon Jan 14, 2008 9:24 pm

brushwoodnursery wrote:OK, got it. Thanks!

Any thoughts on how to remain on the notification without having to return to the forum?
im not sure what i mean

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Mon Jan 14, 2008 9:40 pm

OK, I got the author to show. Now, I want the messages to continue coming to my emails even though I haven't returned to the site.

A workaround for this:
no more notifications will be sent until you visit the topic
That way, members who subscribe may continue to read posts without coming to the site until they want to post. I'm looking now at the code all the way at the bottom of functions_posting.php for clues. I'm not a coder, just a hack with ambition, so I'm posting it here because they seem to go hand in hand as concepts. You want to read the post's content in your email to see if it's worth coming to the site. What if you don't want to bother for that post? You still have to come to the site or you won't get the next email to read the next post.

Am I being clear or just confusingly verbose?
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Tue Jan 15, 2008 2:11 pm

Thank you Primehalo!! Your quick response to the request above was awesome! My group is now able to continue receiving emails until they unsubscribe. It's a really nice addition to this Mod.
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

casskhav
Registered User
Posts: 8
Joined: Wed Nov 07, 2007 9:18 pm

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by casskhav » Fri Jan 18, 2008 4:44 pm

So, I am after the same thing as brushwoodnursery. My group needs to get all notifications regardless of whether or not they visit the Board. I thought that was answered here in an earlier post - commenting out the updating of the watch tables. But then brushwoodnursery mentions primhalo's quick response and that they are now good to go. I don't see that quick response, but I have been reading everything I can before installing this awesome mod (it is my first).

Is the "real" answer the "$prime_notify_always = true"?

Thanks so much!

User avatar
brushwoodnursery
Registered User
Posts: 31
Joined: Sat Jan 12, 2008 1:49 am
Location: Philly, PA USA
Contact:

Re: [RC1] Prime Notify Topic - Add Msg to Notification Email

Post by brushwoodnursery » Fri Jan 18, 2008 5:07 pm

I meant his quick response to my request. He has updated the release to include notes on how to keep notification coming using his mod. I don't know if you've commented out the lines as suggested to you somewhere else. There would be no need to do it once you've added this and set it correctly. If you're on a stock setup of 3.0.0, it should be easy. Backup the file first. then make the changes very carefully.
-Dan
Using all ten thumbs, rusty scalpels and blunt instruments on PHP

Locked

Return to “[3.0.x] MODs in Development”