Showing posts with label Yet Another Forum. Show all posts
Showing posts with label Yet Another Forum. Show all posts

Wednesday, February 6, 2008

Integrating YetAnotherForum.net into Umbraco

Tools needed
- Installed Umbraco installation
- Installed YetAnotherForum Application
- Download this (yaf.dll)

How to install YAF
- Download latest release version from www.yetanotherforum.net (Version 1.9.1.6 at time of writing)
- Extract files into any directory
- Rename default.config to web.config
- Configure yafnet.config with connection to MSSQL database you want to use (tables use a yaf_ naming connection so should be any problems using Umbraco database, however I put it on a separate database)
- Create an application through IIS pointing to the directory where YAF is located.
- Run application and run through install.

Integrate YAF into existing Umbraco Installation
- Copy bits from web.config (YAF directory) to Web.config (Umbraco Installation)
- Copy directories and files from yaf directory to umbraco directory (don’t need default.aspx) as you can see this can get a bit messy
- Copy yaf.dll downloaded before into Bin directory.
- Create a new UserControl (forum.ascx)



<%@ Control Language="C#" ClassName="WebUserControl1" %>
<%@ Register TagPrefix="yaf" Namespace="yaf" Assembly="yaf" %>
<%@ Register TagPrefix="yc" Namespace="yaf.controls" Assembly="yaf" %>
<form id="Form1" runat="server" enctype="multipart/form-data">
<yaf:forum runat="server" id="forum" />
</form>


- Upload usercontrol to umbraco usercontrol directory
- Create a new Umbraco macro and select the forum.ascx
- Insert into Umbraco template.
- Create a new page called Forum (if you don’t want to call the page Forum you need to download the 1.9.1 YAF source and change the file Classses\UrlBuilder.cs)