YAFLogo

Posted by: shahzadgodil - Friday, 15 June 2012 22:35:58
Hi, We are trying to test this webservice message. http://yafnet.codeplex.com/SourceControl/changeset/view/b5858975b5dc#yafsrc%2fYetAnotherForum.NET%2fClasses%2fYafWebService.cs Our code is LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId); This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum. If we change NumPosts manually to 1 then it is populating in web. Please let me know how to fix this? Shahzad Godil

Posted by: tha_watcha - Saturday, 16 June 2012 04:30:00
[quote=shahzadgodil;54979]Hi, We are trying to test this webservice message. http://yafnet.codeplex.com/SourceControl/changeset/view/b5858975b5dc#yafsrc%2fYetAnotherForum.NET%2fClasses%2fYafWebService.cs Our code is LegacyDb.topic_save(1, "Subject", "", URL, description, message, userid,0, null, "1.1.1.1", DateTime.UtcNow, 1, 30, ref messageId); This is creating new topic fine in topic table as well as one record in message table. But it is not updating NumPosts field of topic to 1. And because of this, topic is not showing in forum. If we change NumPosts manually to 1 then it is populating in web. Please let me know how to fix this? Shahzad Godil[/quote] 30 looks like the wrong flag which indicates that the message is deleted, you should try 22 instead.

Posted by: shahzadgodil - Monday, 18 June 2012 09:47:39
It worked like a charm with status code 22 LegacyDb.topic_save(forumID, subject, 1, URL, description, message, userid, 0, null, "1.1.1.1", DateTime.UtcNow, 1, 22, ref messageId);