Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   Notification when someone comments on your profile? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5083)

Ittermat 03-22-2016 01:16 PM

Notification when someone comments on your profile?
 
^ Title XD

Is there a way to do this? I didnt even know I was getting comments on my profile cuz nothing told me so... is there a way to set up a notification system for it?

Kyttias 03-22-2016 03:43 PM

Hmmm.... in classes/class_visitormessage.php, after line 91, add the following (note that this is sort of untested, let me know if there are problems!):
PHP Code:

    $mysidia->db->insert("messages", array("id" => NULL"fromuser" => "SYSTEM""touser" => $this->touser"status" => "unread""datesent" => $date->format("M d, Y")." at ".$date->format("h:i A"), "messagetitle" => "New Profile Message!""messagetext" => "{$this->fromuser} wrote the following on your profile: <br><blockquote class='well'>\"{$mysidia->input->post("vmtext")}\"</blockquote><br> You can <a href='../../profile/view/{$this->touser}'>visit your profile</a> to reply to this message.")); 

This will send the user a PM whenever they receive a profile message. But if you want "notification system" like behavior, you'll need to look over this thread. In short, Mysidia's template system is built on top of Smarty. You can display how many unread messages a user has as part of the template. You could also do this anywhere else by making a variable that will simply hold the number of unread messages and then displaying it:

PHP Code:

$messages $mysidia->db->select("messages", array(), "touser='{$mysidia->user->username}' and status='unread'")->rowCount(); 

Sorry if that's a bit advanced but I hope it helps. :happyc:

Ittermat 03-22-2016 05:52 PM

Thank you Kyttias!! You're the best! I'll look into it <3


All times are GMT -5. The time now is 01:52 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.