chriscoe71
2009-10-12T18:49:10Z
In the past, we have had a couple of workflow issues that create a headache for me.

1. Loading and unloading of site analytics code depending on whether or not the site is being used for production or development.
2. Delivery of email when using a snapshot of the production database in a development environment. This one hits especially hard when testing out forums because of Topic and Post subscriptions.

To combat this, I added a couple of items:
1. New YAFBoardSetting string to store Analytics, accessible from Admin > Host Settings
2. New YAFBoardSetting bool to store the state of the server (Development or Production).
3. New UserFlag (int value 32) to store an "IsDeveloper" variable for each user

In production mode, the Analytics code will load in the footer of all Public facing pages. They will not load in the admin pages.

In development mode, Analytics code will not load at all and "Watch Emails" are only sent to users that are tagged as "Developers".

I am not a professional developer and there may be errors. I included the alteration to one Stored Procedure as part of the patch as well as separately. SQL is one place that I am completely lost, so there may be a more efficient way to pull the same thing off.

Basically, the method call passes the site state (Dev or Prod) to the SP. If it is set to Dev, the SP will only populate the Mail table with users that are tagged as Developers. I didn't touch the PM notifications.

File Attachment(s):
isdevserveranalytics.zip (4kb) downloaded 30 time(s).
chriscoe71 attached the following image(s):

Sponsor
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2009-10-12T18:58:18Z
Looks cool. FYI, for emails on a development system, you can do something else:

in the mail.config comment out the <smtp deliveryMethod="Network"> section and put:

<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="C:\Inetpub\wwwroot\YafInstall\emails" />
</smtp>

The directory has to be a complete directory to a valid path on your server. ASP.NET will put all emails as a file into that directory... no issues with delivery and you can view them easily in Outlook Express/Windows Mail.
chriscoe71
2009-10-12T19:18:02Z
Jaben wrote:

Looks cool. FYI, for emails on a development system, you can do something else:

in the mail.config comment out the <smtp deliveryMethod="Network"> section and put:

<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="C:\Inetpub\wwwroot\YafInstall\emails" />
</smtp>

The directory has to be a complete directory to a valid path on your server. ASP.NET will put all emails as a file into that directory... no issues with delivery and you can view them easily in Outlook Express/Windows Mail.



Great info. Thanks!

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