YAFLogo

crf370
  • crf370
  • 58.4% (Neutral)
  • YAF Camper Topic Starter
2008-10-25T09:29:07Z
I run multiple websites for different organizations and to make administration easier, I host them all on one database. These forums are all installed on separate domains.

Unfortunately at this point, all subscription alerts come from one email address defined globally in the registry table as forumemail.

I would really like to see this separated out per board. My work around right now has been to change the code in YAF.Classes\YAF.Classes.Utils\Config\Boardsettings.cs.

All that is required is to change the following code:

		
                public string ForumEmail
		{
			get { return _reg.GetValueString( "ForumEmail", "" ); }
                        set { _reg.SetValueString("ForumEmail", value); }
		}

to


                public string ForumEmail
		{
			get { return _regBoard.GetValueString( "ForumEmail", "" ); }
                        set { _regBoard.SetValueString("ForumEmail", value); }
		}

Make sure you add the entry directly to the database for each board you run. Obviously the next step is to code this into the board settings but I haven't managed to get that far yet.

Sponsor
crf370
  • crf370
  • 58.4% (Neutral)
  • YAF Camper Topic Starter
2009-02-03T12:15:34Z
Another thing to remember is that if you have multiple forum email addresses, you will have a problem creating new boards. You need to modify the yaf_board_create Stored Procedures so that it does not return more than one forum email address.

SET @ForumEmail = (SELECT TOP 1 CAST([Value] as nvarchar(50)) FROM [dbo].[yaf_Registry] WHERE LOWER([Name]) = LOWER('ForumEmail'))

Add the TOP 1 to the SQL statement to make it work.