Site Settings Question (Forums - New Topic Links)

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/5/2012 10:32:31 AM
Gravatar
Total Posts 28
~Leslie

Site Settings Question (Forums - New Topic Links)

We are having a problem with the 'New Topic' links on the Forum View page.  In researching the code on ThreadList.ascx.cx, it was found that the procedure to create the link at the top of the page is different from the procedure to create the same link on the bottom of the page.

{
lnkNewThread.HRef = SiteRoot
+ "/Forums/EditPost.aspx?forumid=" + ItemId.ToInvariantString()
+ "&pageid=" + PageId.ToInvariantString()
+ "&mid=" + ModuleId.ToInvariantString();

lnkNewThreadBottom.HRef = siteSettings.SiteRoot
+ "/Forums/EditPost.aspx?forumid=" + ItemId.ToInvariantString()
+ "&pageid=" + PageId.ToInvariantString()
+ "&mid=" + ModuleId.ToInvariantString();

lnkLogin.Visible = false;
}

The top link works fine by using the SiteRoot parameter to create a relative link to the new thread page.  siteSettings.SiteRoot on the second link creates an absolute link based on the site setting parameter which isn't working on our website.

Where does the siteSettings value come from initially (when the site is opened) as opposed to the siteRoot? Is it stored in the database, web.config, cache?  Is there documentation explaining the way this parameter is assigned and how it works throughout the application?  We have one site, but the root directory is different between networks, so we want to make sure we have this initial value set correctly.

Thanks!

~Leslie

1/5/2012 10:52:15 AM
Gravatar
Total Posts 18439

Re: Site Settings Question (Forums - New Topic Links)

Hi Leslie,

This is now fixed in the repository, I changed it like this:

lnkNewThreadBottom.HRef = lnkNewThread.HRef;

Best,

Joe

1/5/2012 11:15:20 AM
Gravatar
Total Posts 28
~Leslie

Re: Site Settings Question (Forums - New Topic Links)

Thanks again Joe, but can you point me to where the siteSettings parameter is getting it's value when the website opens?  I ask because the same problem is happening on the event calendar when moving between months.  The links appear to be using the siteSettings parameter causing the link not to work.

~Leslie

1/5/2012 12:05:04 PM
Gravatar
Total Posts 18439

Re: Site Settings Question (Forums - New Topic Links)

Hi Leslie,

You'll find it in Web/Components/CacheHelper.cs line 203 in LoadSiteSettings method.

Can you elaborate what you mean by:

We have one site, but the root directory is different between networks, so we want to make sure we have this initial value set correctly.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.