Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Suggestions and Feature Requests

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2016, 01:16 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,838
Ittermat is on a distinguished road
Question 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?
Reply With Quote
  #2  
Old 03-22-2016, 03:43 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,994
Kyttias is on a distinguished road
Default

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.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 03-22-2016, 05:52 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 32,838
Ittermat is on a distinguished road
Default

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:53 PM.

Currently Active Users: 454 (0 members and 454 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636