[BETA] [3.2] Prime Notify

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [BETA] [3.2] Prime Notify

Post by kasimi »

You need to return '@primehalo_primenotify/primenotify_topic_notify';
joshwh88
Registered User
Posts: 4
Joined: Thu Jul 05, 2018 1:32 pm

Re: [BETA] [3.2] Prime Notify

Post by joshwh88 »

I double checked the settings you mentioned. All the users in question on my board had their email notifications on, and 2 of the 4 prime notify settings were set to user's choice. I changed the settings so all were set to user's choice and checked the UCPs again. The strangest thing happened! In all the users that were created after I did the prime notify install ( there are 3 such users ) 3 of the 4 settings finally showed up in the UCP, but for some reason the setting for private messages was still missing. In all users created before the prime notify install, all 4 settings properly showed up in the UCP.
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

joshwh88 wrote: Fri Aug 17, 2018 2:45 pm I double checked the settings you mentioned. All the users in question on my board had their email notifications on, and 2 of the 4 prime notify settings were set to user's choice. I changed the settings so all were set to user's choice and checked the UCPs again. The strangest thing happened! In all the users that were created after I did the prime notify install ( there are 3 such users ) 3 of the 4 settings finally showed up in the UCP, but for some reason the setting for private messages was still missing. In all users created before the prime notify install, all 4 settings properly showed up in the UCP.
For the three new users, do they have their "Someone sends you a private message" email notification checked? phpbb does not seem to set this by default for new users so I choose not to set it by default as well.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
joshwh88
Registered User
Posts: 4
Joined: Thu Jul 05, 2018 1:32 pm

Re: [BETA] [3.2] Prime Notify

Post by joshwh88 »

They did not. That did the trick! All 4 settings are now showing in the UCP. Still not sure why none of them were showing previously though (because emails were checked for new topics in subscribed forums and posts in subscribed topics). Well, I guess it doesn't matter now. Thanks for the help!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

kasimi wrote: Fri Aug 17, 2018 7:40 am You need to return '@primehalo_primenotify/primenotify_topic_notify';
Brilliant! Wish I would have known about that earlier!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

I just released v1.0.0 beta 9 which uses the default email template manager instead of my custom one.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
alsancle
Registered User
Posts: 7
Joined: Fri Aug 31, 2018 11:32 am
Name: Al SanClemente

Re: [BETA] [3.2] Prime Notify

Post by alsancle »

Ken, thanks for this great extension. Our employees tend to read the forum posts in their email as opposed to on the board.

I had two questions related to the email templates. I've customized them (basically removed all the extra text) but there are two thing I don't understand:

1. We are running 1.0.0-beta9 which uses the default email template manager. However, to change the emails I have to edit the templates found under the extension at : forum/ext/primehalo/primenotify/language/en/email and not templates under forum/language. I figured with the default template manager they would be under the later?

2. In the topic replies we would like to include the name of the forum since we have many on our board. I assumed this would be as simple as adding the FORUM_NAME tag but that comes back empty in the emails. Any thoughts?

Subject: {FORUM_NAME} Reply to "{TOPIC_TITLE}" by {AUTHOR_NAME}
{MESSAGE}

Forum: {FORUM_NAME}
Topic: {TOPIC_TITLE}
Author: {AUTHOR_NAME}

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

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

Don't confuse the template manager with the template files. I'm using the default template manager to manage my custom template files.

When subscribed to a forum the FORUM_NAME variable should be available because it uses the notification/type/topic.php PHP file and inside that file, in the get_email_template_variables() function, it sets up the FORUM_NAME variable (you can see this around line 221). When subscribed to a topic, the FORUM_NAME variable is never set as it uses the notification/type/post.php PHP file and in its get_email_template_variables() function that variable is never set up. You may be able to set it up yourself by editing my version of the file, ext/primehalo/primenotify/notification/type/post.php. Find the get_email_template_variables() function and try adding this line anywhere after the declaration of the $template_vars variable:

Code: Select all

$template_vars['FORUM_NAME'] = htmlspecialchars_decode($this->get_data('forum_name'));
Note that I have not actually tested this so it may or may not work.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
alsancle
Registered User
Posts: 7
Joined: Fri Aug 31, 2018 11:32 am
Name: Al SanClemente

Re: [BETA] [3.2] Prime Notify

Post by alsancle »

Thanks. I'll give it a try.
alsancle
Registered User
Posts: 7
Joined: Fri Aug 31, 2018 11:32 am
Name: Al SanClemente

Re: [BETA] [3.2] Prime Notify

Post by alsancle »

Worked great. Thanks!
minijon
Registered User
Posts: 1
Joined: Wed Sep 05, 2018 4:11 pm

Re: [BETA] [3.2] Prime Notify

Post by minijon »

what is the difference between old and new version.what kind of changes we will see if we install old version.
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

You should not see any difference between the latest version and the previous version.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [BETA] [3.2] Prime Notify

Post by koraldon »

Hi,
trying to update Beta5 to Beta9, and getting the following SQL error, any clue how to fix?
SQL ERROR [ mysqli ]

Duplicate entry 'notification.type.post-0-9297-notification.method.email' for key 'itm_usr_mthd' [1062]

SQL

UPDATE phpbb3_user_notifications SET item_type = 'notification.type.post' WHERE item_type = 'primehalo.primenotify.notification.type.post' AND method = 'notification.method.email'
User avatar
primehalo
Former Team Member
Posts: 2988
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo »

I would completely uninstall Beta5, then do a fresh install Beta9. Beta 8 changed how the user notification settings are handled which I think is causing that problem. Before Beta 8 it would try to convert existing notification settings instead of creating new settings for the extension that are based on the existing settings.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
koraldon
Registered User
Posts: 530
Joined: Sat Jun 30, 2007 12:42 pm

Re: [BETA] [3.2] Prime Notify

Post by koraldon »

The issue is that I get the error when I'm trying to disable it at the ACP... before updating to beta9.
Thanks
Post Reply

Return to “Extensions in Development”