Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 03-29-2017, 11:49 PM
ewe ewe is offline
Member
 
Join Date: Mar 2017
Posts: 8
Gender: Female
Credits: 2,334
ewe is on a distinguished road
Default

I was similarly irritated by reply not grabbing a title and I accidentally stumbled upon this. I felt the need to change one thing, though - a devious and clever user could theoretically go through message IDs and read things not meant for them.

PHP Code:
$message = new PrivateMessage
// CHANGES START HERE

$title "(no subject)"// this way it'll never be blank
if($mysidia->input->get("id")){ // if there's an get value
    
$where trim($mysidia->input->get("id")); // trim the value
     
if (!ctype_digit($where)) { // if its not numeric only
        
$user $where// create a message to this user
    
} else if (ctype_digit($where)){ // if it IS numeric only then it's a reply, so pull data        
        
$oldMessage = new PrivateMessage($where); 
        
//my little paranoid change is here: 
        
if($mysidia->user->username == $oldMessage->fromuser) {     
          
$js "<script>$('.content h2').text('Reply To Message');</script>"// optional
          
$user $oldMessage->fromuser;     
          
$title "RE: ".$oldMessage->messagetitle;    
          
$msg "› {$user} wrote: ".$oldMessage->messagetext;
        }
    }
}

// CHANGES END HERE
$editor $message->getEditor(); 
Reply With Quote
 


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 05:47 PM.

Currently Active Users: 3005 (0 members and 3005 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636