> Forums > Active Forums > Community Support > Submit the new topic from another web application
Last Post 02 Mar 2011 12:03 PM by NFXBeats. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Not Resolved
bluerunx
Registered Users
bluerunx
Post Count:2

--
28 Feb 2011 07:03 AM
    • Active Forums Version: 4.3.3
    • DotNetNuke Version: 5.6.1
    Hello guys, is it possible to submit the new topic from another web application?
    I need to create some special form in DynamicForms and then submit (ONLY) the topic to ActiveForums.

    Thanks
    NFXBeats
    Customers
    NFXBeats
    Post Count:299

    --
    02 Mar 2011 12:03 PM
    Yes it is possible. I don't know if there is an API call you can make directly, but you can use the following stored procedures:

    activeforums_Topics_Save <= this will give you a topic id to pass into the next one. There are a lot of parameteres you need to pass into this. I copied a new version of this that sets the topicid as an OUT param to make it easier to use with LINQ.

    activeforums_Topics_SaveToForum <= this one places the topic into a specific forum, you need to pass the forumid, topicid

    Here is a snippet of how I do it:

    
    DateTime dtMin = new DateTime(1900, 1, 1); // cannot use a null date, use this value instead
    int? topicid = null;
    int forumid = 79;
    
    var res = dc.nfx_activeforums_Topics_Save(0, ref topicid, 0, 0, false, false, "", -1, true, false, false, false, 
            dtMin, dtMin, subject, body, "", DateTime.Now, DateTime.Now, userid, userdisplayname, ipaddress, 0, 0, null, 
            "<topicdata><properties></properties></topicdata>");
    
    if (topicid.HasValue)
    {
             dc.activeforums_Topics_SaveToForum(forumid, topicid, -1);
    }
    
    Status: I'm no longer moderated.
    You are not authorized to post a reply.
    > Forums > Active Forums > Community Support > Submit the new topic from another web application
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy