Login

Graffiti and Yet Another Forum.NET 1.9.3

Friday, June 19 2009 by patrickmason 6 Comments ,

There has been much buzz around getting forum support into Graffiti, and one solution is to use YetAnotherForum.net(YAF).  Now the problem is in most shared hosting environments you would be forced to run the forums under a Virtual Directory in graffiti and that will not work out of the box.  The key is merging the web.configs together so they operate off of the graffiti web.config.

NOTE: As always, you use this at your own risk and I cannot be held responsible if you mess something up.  Back up your graffiti site and database before trying any of this.  There its said, you are on your own buddy. ;)

There is a great article Here on how to get it going in graffiti but it seems a bit dated and the steps need some expansion to work with the latest release of YetAnotherForum.net.  So after much playing around I got it to work and so I will share.  First off, download the YetAnotherForum.net build for the .NET framework 2.0 from here.  Save yourself time but not doing 3.5.  Will it work?  Maybe.  Not for me and time is money so 2.0 worked out of the box. with these steps, 3.5 did not. 

First, get YAF to work as its own website like it says in the other article.  This will assure you get everything set up correctly.  You can point the db.config connection string to your Graffiti Database.  It will create the schema inside it without interfering.  If you host in anenvironment where you can have multiple SQL dbs, its your call.

Now:

  1. Create a folder in your graffiti website called forums(or whatever but for me it was forums). Make a virtual directory on your web site that points to this folder. The alias of the virtual should be the same.
  2. Copy the entire YAS site to this new folder. You should have already created a web.config from reccommend-config.config as described in the YAS install notes. Rename that web.config to something else to ensure it is not processed.
  3. Now copy the mail.config and UrlRewriter.config to the root of your graffiti site.
  4. Now from the renamed web.config in the forums directory, copy the <configSections> element to the graffiti web.config right under the configuration node.
  5. Now copy the entire <add> connectionstring node from the YAS db.config under the connection string in the graffiti web.config so there are 2 connection strings under the <connectionStrings> element in the graffiti web.config.
  6. Now from the renamed YAS web.config, copy the <system.net> node to the graffiti web.config above <system.web> the node.
  7. Now from the renamed YAS web.config, copy the <rewriter> node to the graffiti web.config above the new  <system.net> node.
  8. Copy all the keys (not the <appSettings> parent node) from the YAS app.confg to the Graffiti web.config <appSettings> node. Keeping the comments is up to you.
  9. Now create a new location in the graffiti web.config and set the path to your forums folder <location path="forums"></location>
  10. From the renamed YAS web.config copy the entire <system.web> (including the system.web) node into this new location element
  11. In the newly pasted area find <pages> and in that node find <namespaces>.  Above every child node in that namespaces node add the 2 new nodes <remove namespace="Graffiti.Core" /><remove namespace="Telligent.Glow" />
  12. And that should be it, run it and it should work fine

If you have issues or comments please let me know

6 comment(s) so far

#1 - Tony wrote on Friday, June 19 2009

Can you not drop this into your YAF web.config - <location path="." allowOverride="true" inheritInChildApplicaions="false">, that way you don't have to merge the web.configs and they should should run without interferring with each other?

Didn't try that but if it works, super cool :)

Or you can just remove the 2 offending namespaces from Graffiti in the YAF web.config file.

<remove namespace="Graffiti.Core" />

<remove namespace="Telligent.Glow" />

Hat tip to Joe Stagner .... His way seems to work and is much easier than mine. Though I prefer to overcomplicate things for the sake of simplicity ;) I swear I had tried that but it is quite possible I had already messed it up too much by then. :) Thanks joe!

#5 - iiisark@abv.bg wrote on Saturday, August 08 2009

Graffiti os really cool CMS,but there are not many themes,plugins and support.I hope it will become more popular in the future

Great blog, this could be the best blog I ever visited this month. Never stop to write something useful dude!

Leave a comment


Twitter

  • Spent most of this new years sick. Blah
  • JOIN LIVE WEBINAR w/ @SuperNovaAwards winner @CORE4Research Nov. 30! Learn more & Register now: http://t.co/OstGz2uI
  • I bought wine cause I liked the penguin on the bottle

Find Me On...