Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe Toggle in Notification Dropdown #41

Merged
merged 22 commits into from
Jun 1, 2024

Conversation

iMattPro
Copy link
Contributor

@iMattPro iMattPro commented May 27, 2024

Requires a new core template event in notification_dropdown.html after the footer DIV (like notification_dropdown_footer_after)
Screenshot 2024-05-27 at 2 05 30 PM Screenshot 2024-05-27 at 2 05 39 PM
Depends on phpbb/phpbb#6625

@iMattPro iMattPro requested a review from rxu May 27, 2024 16:13
@iMattPro iMattPro added the experimental Experimental changes label May 27, 2024
@iMattPro iMattPro marked this pull request as draft May 27, 2024 16:14
iMattPro added 3 commits May 27, 2024 10:03
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>
@iMattPro
Copy link
Contributor Author

@marc1706 look what we're cooking up

@iMattPro iMattPro marked this pull request as ready for review May 28, 2024 01:07
iMattPro added 7 commits May 28, 2024 06:42
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>

# Conflicts:
#	styles/prosilver/template/event/overall_footer_after.html
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>
@iMattPro iMattPro added the enhancement New feature or request label May 28, 2024
$sql_ary = [];

$sql = 'SELECT user_id
FROM ' . $this->table_prefix . 'users
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably limit user types to USER_NORMAL and USER_FOUNDER to skip unused accounts.

$sql = 'SELECT method
FROM ' . $this->table_prefix . "user_notifications
WHERE method = '" . $this->db->sql_escape('notification.method.phpbb.wpn.webpush') . "'";
$result = $this->db->sql_query($sql);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need at least 1 positive result so probably $this->db->sql_query_limit($sql, 1).

{
$sql = 'SELECT method
FROM ' . $this->table_prefix . "user_notifications
WHERE method = '" . $this->db->sql_escape('notification.method.phpbb.wpn.webpush') . "'";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add AND notify = 1 as far as we're looking for enabled notification types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I'm just looking to see if it exists yet, because if it does it means it's already been installed and people have started making settings already.

iMattPro added 2 commits May 31, 2024 08:28
Signed-off-by: Matt Friedman <[email protected]>
Signed-off-by: Matt Friedman <[email protected]>
@iMattPro iMattPro merged commit 01c60b5 into phpbb-extensions:main Jun 1, 2024
31 checks passed
@iMattPro iMattPro deleted the sub-anywhere branch June 1, 2024 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Experimental changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants