Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2238

phpBB Custom Coding • Disable default Email notifications

$
0
0
Open includes/functions_user.php and on line 372 comment out or delete these lines.

Code:

if ($notifications_data === null){$notifications_data = array(array('item_type'=> 'notification.type.post','method'=> 'notification.method.email',),array('item_type'=> 'notification.type.topic','method'=> 'notification.method.email',),);}
Optionally you create two boolean custom profile fields. One for topic notifications and one for PM's, field identification should be topic_notify and pm_notify. "Publicly display profile field:" set to no, Under visibility options only check "Display on registration screen:" and "Hide profile field:". The rest should be self explanatory.

Instead of commenting/deleting the lines above replace with:

Code:

// Use default notifications settings if notifications_data is not set// Mod - Custom fields available on registration to set email notification preferencesif ($notifications_data === null){$notifications_data = array();if (isset($cp_data['pf_topic_notify']) && $cp_data['pf_topic_notify'] == 1 ){$notifications_data[] = array('item_type'=> 'notification.type.post','method'=> 'notification.method.email',);$notifications_data[] = array('item_type'=> 'notification.type.topic','method'=> 'notification.method.email',);}if (isset($cp_data['pf_pm_notify'])  && $cp_data['pf_pm_notify'] == 1){$notifications_data[] = array('item_type'=> 'notification.type.pm','method'=> 'notification.method.email',);}}
The profile fields do not do anything past registration and can be safely deleted at any time in the future if you no longer need them for registration,

Statistics: Posted by thecoalman — Mon Jan 06, 2025 9:57 pm



Viewing all articles
Browse latest Browse all 2238

Trending Articles