Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DNN Forum API QuestionDNN Forum API Question
Previous
 
Next
New Post
8/11/2008 10:54 AM
 

I was using the code api to create the post "PostController.PostAdd()" but sometimes a thread wasn't being created and sometimes it was... Go figure... So, I decided to use the Forum_AA_ThreadAdd stored procedure as well. So, it got even more complicated. I think I have a handle on it now.

Thanks!


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
8/14/2008 4:27 PM
 

Hey Brian,

I have been struggling with what seems to be an application scope caching issue. The Forum module cache is set to -1, but for some reason, the forumID is -1 when I call the database to get the newly created forum (so I can add a post to it). In my update event I have the following (partial) code.

if (chkAddForum.Checked && (chit.ThreadID == 0 || chit.ThreadID == -1))
            {

                // Perform Forum Discovery based on Module Title (if one doesn't exist this functions stored procedure creates and returns the new forum record)
                ForumInfo forum = ctlActionChits.GetActionChitForum(ddlCommittee.SelectedItem.Text);

                int retval = ctlPost.PostAdd(0, forum.ForumID, dnnUser.UserID, Request.UserHostAddress, true, txtSubject.Text, txtDescription.Content, false, Null.NullDate, false, 0, string.Empty, moduleInfo.PortalID, -1, -1);

                // Syncronize forum module and clear the cache so new forum will be displayed
                ctlForum.ClearCache_ForumGetAll(forum.GroupID);
                ModuleController.SynchronizeModule(forum.ModuleID);

                PostInfo post = ctlPost.PostGet(retval, moduleInfo.PortalID);
               
                chit.ThreadID = post.ThreadID; // Errors here

            }
           

The error occurs on the last line when I step through the code. The real problem is that my forum.ForumID is -1 instead of the actual forumID. A quick database check reviels that the record exists.

Finally, when I browse the forums module as Host, the group count in Edit Groups is correct, but the forum is not displayed in the module. Browsing to HostSettings and clearing the cache then restarting the application will cause my newly created forum to be displayed and all behaviors are normal.

Any thoughts?


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
8/14/2008 4:46 PM
 

Hmmm... At a point like that I would probably have to look through the forum code and see if they are maintaining a cache of their own that they clear or something when a new forum is added.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
12/21/2008 6:05 AM
 

Use namespace DotNetNuke.Modules.Forum  with following: ForumController, GroupController, PostController
You have a full API for this.

In a similar way you have other module APIs like Announcements...
Came back to this thread after stumling on the API, after being given the WRONG direction in the replies here, and thinking there was no API.

Thanks, Moshe (pashute)

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DNN Forum API QuestionDNN Forum API Question


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out