Thanks for the reply... I've been working on this quite a bit and the problems go fairly deep.
I'm not branching to a new set of pages for the forum. I'm simply using the link in one of my pages. I can't use the approot because that effects many links and in the end causes many other side effects. The fact is my app is rooted at "/".
I've ended up rewriting the the "entire" folder handling. As I see it there are several important locations to anyone who is integrating YAF into an existing site.
AppRoot - base website location
YAFCodeFolder - where all of the YAF non-binary code sits (i.e. pages, editors, controls, languages, resources)
YAFBoardFolder - where all of the board content would sit (i.e. images, themes)
I'm not really sure how AppRoot is used. In any of my environments approot doesn't need to be used, but let's go with it.
Currently, YAF mixes, matches and ignores serverfileroot and boardroot in so many varied ways that I just can't make all of the board related files exist in only one directory (other than the root). In my case I want to have a single board and have ALL of the board files (except the binaries) in directories that hang off of a single subdirectory.
The problem is compounded by the fact that I develop on a local machine and am publishing to a subdomain. YAF attempts to adjust for subdomains, but it does so by prefixing boardroot with the subdomain directory and that means that you can't use approot as an offset anyway because you would get approot/subdomain/boardroot, which wouldn't work. Fileroot seems to be "added" as well, so you can't use fileroot for the code files and boardroot to point to the board files. I tried many combinations and just couldn't make it work.
I see the following "formulas" for the "new" YAF... folders above:
YAFCodeFolder - /approot(config param)/subdomain(automatic)/coderoot (new config param)/
YAFBoardFolder - /approot(config param)/subdomain(automatic)/boardroot (config param)/[optional board ID for multiboard use]/
(Of course the above folders would need to be cleaned up to handle multiple "/"s etc.)
So what I did was modify the the BaseUrlBuilder and a few other routines to produce code and board folders as above, then I modified the YAFForumFolders class to include every special folder (the ones listed above and some of their subfolders).
Then I started wiping out any reference to ForumClientFileRoot, ForumServerFileRoot, etc. and replaced them with calls to YAFBoardFolders methods. This way if I ever need to adjust what's in what folders it can all be controlled in one place. I also removed the "second hand" path calculations. Often when folders are reference they are prepended by approot or build on the fly. With this change none of that is required.
I now have the site running (both local and in a test subdomain) with my main site in one directory and all of the board files sitting in a single subdirectory. I'm not using any of the YAF aspx pages, I'm using the forum control on one of the pages in my main site.
I haven't made it yet, but I envision that whether a particular folder hangs off of the code folder or off of the board folder should also be configurable (i.e. in a multiboard environment, you might want to customize the resources or the images and in that case you'd want them to hang off of the board folder, otherwise save the space and hang it off of the code folder.)
Seems to be working now...