[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!
Suggested Hosts
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)
User avatar
primehalo
Former Team Member
Posts: 2788
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] [3.2] Prime Notify

Post by primehalo » Sat Oct 06, 2018 12:02 am

In the extension's folder, edit the ext.php file and go to the very bottom where it says:

Code: Select all

		// Change user's original notifications to ours
		$data = array('item_type' => $enable);
		$sql = 'UPDATE ' . USER_NOTIFICATIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $data) .
				 " WHERE item_type = '{$disable}' AND method = 'notification.method.email'";
		$this->db->sql_query($sql);
Comment out those lines, like so:

Code: Select all

		// Change user's original notifications to ours
		//$data = array('item_type' => $enable);
		//$sql = 'UPDATE ' . USER_NOTIFICATIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $data) .
		//		 " WHERE item_type = '{$disable}' AND method = 'notification.method.email'";
		//$this->db->sql_query($sql);
That should allow the script to complete.

But then you will have extra unused rows in the phpbb3_user_notifications table, basically any row with an item_type that starts with primehalo.primenotify so after that you'll want to manually run an SQL query to delete those, like so:

Code: Select all

DELETE FROM `phpbb_user_notifications` WHERE `item_type` LIKE 'primehalo.primenotify.%'
I would strongly advise that you backup your SQL database before making these changes, first before making the PHP code changes and then again before running the manual SQL delete command. At the very least you should make backups of the phpbb_user_notifications table.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: Roots and 35 guests