Mention if you're using this component with CB, EasySocial or Jomsocial

Why not work sending message in DD with JomSocial

More
7 years 10 months ago #33727 by daowolf
I get error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''from','deleted','from_name','posted_on','subject','body') VALUES ' at line 2 SQL=INSERT INTO eao_community_msg ('from','deleted','from_name','posted_on','subject','body') VALUES ('0', '0' , 'System' , '2016-06-15 11:38:07' ,'СВИДАНИЕ: daowolf & soboleva : Это судьба !' , '<div><a href="http://192.168.3.10//component/community/765-denis-yurchenko/profile.html" >Visit daowolf's profile


Thank you,

The administration bot' )

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #33728 by nordmograph
Try 1.1.4c and let me know

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #33729 by daowolf
Error too:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''from','deleted','from_name','posted_on','subject','body') VALUES ' at line 1 SQL=INSERT INTO eao_community_msg ('from','deleted','from_name','posted_on','subject','body') VALUES ('0', '0' , 'System' , '2016-06-15 11:55:53' ,'СВИДАНИЕ: daowolf & soboleva : Это судьба !' , '<div><a href=\"http://192.168.3.10//component/community/765-denis-yurchenko/profile.html\" >Visit daowolf\'s profile


Thank you,

The administration bot' )

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #33732 by daowolf
YESSS!! I Fix this. That works:

// core pms notifications
if($profileman =='js')
{
$db = JFactory::getDBO();
$q ="INSERT INTO #__community_msg (`from`,`deleted`,`from_name`,`posted_on`,`subject`,`body`)
VALUES
('0', '0' , 'System' , '".date('Y-m-d H:i:s')."' ,'".$db->escape($subject)."' , '". '{"content":"' . str_replace('"', '\"', $db->escape($body))."\"}' ) ";
$db->setQuery($q);
$db->execute();
$msg_id = $db->insertid();
$q ="UPDATE #__community_msg SET `parent`=".$msg_id." WHERE `id` = ".$msg_id;
$db->setQuery($q);
$db->execute();
$ids = array( $my->id , $partner->id );
for($i=0;$i<count($ids);$i++)
{
$q = "INSERT INTO #__community_msg_recepient
(`msg_id` , `msg_parent` , `msg_from` , `to` , `bcc` , `is_read` , `deleted`)
VALUES
('".$msg_id."' , '".$msg_id."' , '0' , '".$ids[$i]."', '0' , '0' , '0' )";
$db->setQuery($q);
$db->execute();
}
}
elseif($profileman =='es')
{
//to do
}

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #33733 by nordmograph
Well done
1. couldn't the str_replace function be replcad by 'addslashes' function?
2. Are the profile links rendered correctly ?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #33734 by daowolf
1. I not a guru of PHP..
2. Opsss... yes, link is broken ((

Please Log in or Create an account to join the conversation.

Time to create page: 0.366 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.