bgilbert
  • Posts: 5
  • Joined: 16/05/2014
Hi Guys,

I followed the guide on integrating the forum into my website. I ran into an issue though with the clickable links and their generated urls. My forum is on a usercontrol on a page named "discussion". My site already has URL rewriting using microsofts solution. I hope thats not a problem. Anyways, the links inside the user control end up being relative to the sub directory the forum is in. Eg: "/forum/discussion?g=topics&f1=1". I'm guessing it should be "/discussion?g=topics&f1=1"

Here's some of the relevant files.

app.config
Quote:


<appSettings>
<add key="YAF.BoardID" value="1" />
<add key="YAF.EnableURLRewriting" value="false" />
<add key="YAF.UrlRewritingFormat" value="standard" />
<add key="YAF.URLRewritingMode" value="Translit" />
<add key="YAF.UseSMTPSSL" value="false" />
<add key="YAF.DatabaseObjectQualifier" value="yaf_" />
<add key="YAF.DatabaseOwner" value="dbo" />
<add key="YAF.ConnectionStringName" value="yafnet" />
<add key="YAF.ProviderExceptionXML" value="ProviderExceptions.xml" />
<add key="YAF.AppRoot" value="~/forum" />
<add key="YAF.ProviderKeyType" value="System.Guid" />
<add key="YAF.MobileUserAgents" value="iphone,ipad,midp,windows ce,windows phone,android,blackberry,opera mini,mobile,palm,portable,webos,htc,armv,lg/u,elaine,nokia,playstation,symbian,sonyericsson,mmp,hd_mini" />
<add key="YAF.RadEditorSkin" value="Black" />
<add key="YAF.UseRadEditorToolsFile" value="true" />
<add key="YAF.RadEditorToolsFile" value="editors/radEditor/toolsFile.xml" />
<add key="YAF.ConfigPassword" value="w3trend$" />
<add key="YAF.BaseUrlMask" value="~/" />
</appSettings>



Thanks for any help.
Sponsor
bgilbert
  • Posts: 5
  • Joined: 16/05/2014
Okay I got the links to work, but then a bunch of the css and images files get 404's:

<add key="YAF.AppRoot" value="~/" />
<add key="YAF.FileRoot" value="~/forum"/>

Quote:


Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/css/jquery.notification.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/css/jquery.yafmodaldialog.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/css/forum.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/css/jquery.hovercard.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.pagemethod.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/Themes/cleanSlate/theme.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.notification.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.yafmodaldialog.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.timeago.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.hovercard.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/icons/InfoBig.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/js/jquery.min.js
Uncaught TypeError: Cannot read property 'DEFAULTS' of undefined bootstrap.js:861
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:35461/resources/icons/InfoBig.png

colema18
  • Posts: 2
  • Joined: 25/08/2014
Any solution for this, I have the same issue and didn't want to go in and adjust the source code if it can be done with a config setting. I think we basically need a setting that says use the YAF.FileRoot when getting html assets (css/js) and YAF.AppRoot when making links - or have an additional config setting like YAF.AssetRoot for the css/js urls.

Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved