Quote:
Originally Posted by hornstar1337
What is the function declaration?
you also said something about the calls? I'm not sure what that is.
and in those files you stated what needs to be changed, can you give me a little example, so i dont stuff anything up lol
is it this.
semdpm() needs to be changed to SendPmAws()
i think that looks correct, but im really not sure what the calls are, and what would i need to search in the pugins, and what would need to be changed there.
Thanks for your help.
|
PHP Code:
function SendPM($message,$title,$to,$from)
{
global $db;
//#################################################
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
//#################################################
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$db->query_first("SELECT * FROM ".TABLE_PREFIX."user WHERE userid='{$to}'"); // Grab Member Its Going TO
$from=$db->query_first("SELECT * FROM ".TABLE_PREFIX."user WHERE userid='{$from}'"); // Grab Member Its Coming FROM
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$db->query_write("INSERT INTO ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature ,allowsmilie) VALUES ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$db->query_write("INSERT INTO ".TABLE_PREFIX."pm (pmtextid, userid) VALUES (".$db->insert_id().", '{$to['userid']}')");
if ($to['pmpopup'])
{
$db->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid='{$to['userid']}'");
}
else
{
$db->shutdown_query("UPDATE ".TABLE_PREFIX."user SET pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}
// Update pm count
}
change that to
PHP Code:
function SendPMAws($message,$title,$to,$from)
{
global $db;
//#################################################
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
//#################################################
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$db->query_first("SELECT * FROM ".TABLE_PREFIX."user WHERE userid='{$to}'"); // Grab Member Its Going TO
$from=$db->query_first("SELECT * FROM ".TABLE_PREFIX."user WHERE userid='{$from}'"); // Grab Member Its Coming FROM
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$db->query_write("INSERT INTO ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature ,allowsmilie) VALUES ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$db->query_write("INSERT INTO ".TABLE_PREFIX."pm (pmtextid, userid) VALUES (".$db->insert_id().", '{$to['userid']}')");
if ($to['pmpopup'])
{
$db->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid='{$to['userid']}'");
}
else
{
$db->shutdown_query("UPDATE ".TABLE_PREFIX."user SET pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}
// Update pm count
}
carefull with upper / lowercase in functionames ...
in the files i posted before you would call your new function like this
PHP Code:
SendPMAws($message,$title,$to,$from);
every occourance used will need to be replaced or you'll get errors