Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  DNN Forum API Question
Previous Previous
 
Next Next
New Post 8/11/2008 8:54 AM
User is offline John Valentine
129 posts
www.webinnovationsystems.com/
9th Ranked


Re: DNN Forum API Question 

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 2:27 PM
User is offline John Valentine
129 posts
www.webinnovationsystems.com/
9th Ranked


Re: DNN Forum API Question 
Modified By John Valentine  on 8/14/2008 4:36: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 2:46 PM
User is offline Brian Dukes
479 posts
www.engagesoftware.com
8th Ranked


Re: DNN Forum API Question 

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
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  DNN Forum API Question
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


PartnerPoint | Community of Microsoft Partners
PartnerPoint is one of the largest and most active online communities of Microsoft Partners worlwide with over 8,000 members.
www.PartnerPoint.com
Web Valley
Website design, Database development
www.webvalley.com
UK DotNetNuke CMS installation, hosting & support
UK based installation, branding, customising, integration, hosting, training, support and maintenance services for DotNetNuke
www.deburca.co.uk

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP