April 2007 - Posts
Introduction:
This module is used to set some default values for profiles and also email the system administrators when accounts are created. Source is included but I have a precompiled DLL in the zip for those that don’t have the tools to compile the module on their own.
The Update User Profile module performs the following tasks:
-
When a new account is created profile settings from the Anonymous user account are copied to the new account
-
An email is sent to the members of the system administrator role, if enabled
The role that is used is set in the CommunityServer.config file as is the flag that allows the email to be sent. If a member of the site is just making a profile update then nothing happens. I was interested in knowing when an account is created and forcing some non-default settings to be put in place.
The mail that is sent is pretty basic and to the point. Perhaps in an update the email should come from the templates but this will do for a version 1 and this was also a learning experience to figure out how to get my environment setup and create modules.
Getting setup:
-
Create a directory to hold the source code and VS2005 project file
-
Place the RpgJunkie.CsModules.UpdateUserProfile.csproj and UpdateUserProfile.cs into the new directory
-
Open the csproj file with Visual Studio 2005
-
Once in Visual Studio, Change the build directory to match your CS2007 Bin folder
-
Check the references for the CS DLLs since the path might not be the same as mine
-
Build the project
Settings:
NotificationGroup - This is the Role whos members will receive an emaiil each time a new account is created
EmailEnabled - Set this to 'true' to send email notifications to the NotificationGroup above
Configuration Additions:
You will need to add the following to the Modules section of the CommunityServer.config:
<add name = "NewUserUpdates" type = "RpgJunkie.CsModules.UpdateUserProfile, RpgJunkie.CsModules.UpdateUserProfile">
<NotificationGroup>SystemAdministrator</NotificationGroup>
<EmailEnabled>true</EmailEnabled>
</add>
You can download the zip with the source here.
It looks like the count down timer has run its course. Fantasy Grounds 2 has been released. I downloaded the installer and its downloading updates as I write this. So far I don't know too much about what has changed but I'm sure I'll get to kick the tires here pretty soon.
For those of you that don't know... this is a virtual D20 table top game. You and your party connect via the internet and play D20 adventures as if you were there in person. There are character sheets, dice, and other interesting items. With the advent of voice chat, from external applications, its just like being there.
Well I'm happy to say that I'm up and running with Community Server 2007! I actually have two sites but the main one, RpgJunkie, upgraded with out any problems. I was lucky that I picked a providor that allows you to connect to the database with SQL tools. That's actually the trouble with the other domain; it's hosted on GoDaddy and I can't get directly to the datbase. With my other provider I have database backups enabled so all I had to do was download and restore to my development server.
All I have left to do is install my custom module.. it's purpose is to copy specific settings from the Anonymous user profile to all new accounts as they are created. I'm planning on doing some others but I still need to learn how somethings function.. namely if they took care of the issue with adding new applications to the core. I also need to learn how you add a page and enable the theme and navigation elements. Anyone have a writeup on this?
I guess it's time to see what I'm going to do with the other domain, find out whats wrong with it or start over.. time will tell.
Ok, I figured out what the problem was with IE7 throwing and exception when using the editor on Community Server 2007. I turned on Enable Ink in my profile not really knowing what it was for. That was actually one of the reasons I turned it on.. I was trying to figure out what it was.
As it turns out it is for tablet PCs, Ink refers to Microsoft.Ink which is the input device for tablet PCs.. go figure.. I'm not on a tablet.. puzzle solved!
Community Server 2007 was released yesterday! I’m hoping to move the main RPG Junkie site over to the new version within the next few days. So far my test upgrade on my development server seemed to work although I did have to run the 1.x > 2.0 SQL update and then the 2.x to 2.1 updates before running the 3.x upgrade. I’m not sure why that is since I’m running 2.0 currently. The only thing I can think of is the corruption that I experienced during the last upgrade. Last time I ended up hand stitching the blogs back together. I think the root cause was due to some problems with the first version I was running and the site was initially converted from .Text.
I did notice one odd thing after installing cs2007 on my test server and that was the editor. I loaded up the site and went in to edit a blog entry, not that I was going to save it, and IE7 blew up. I did confirm that it was an issue on this system since it was working fine on my virtual machine. Hopefully this wont cause me too many troubles going forward since I would rather maintain this site via the dev server and not a virtual machine. The only real concern is the size of my database.. 245 meg is a bit more then I care to install on a VM. Worse case I can just used a scaled down version of the site since the content is not really that important but I do like to have real world data to test with.
At any rate I have worked out the process of creating CSModules so I’m on the learning curve to see what else I can do. I would like to know if the issue of creating a new application, like blogs and fourms, was addressed with the new release. I had intended to create some add on applications but while reading up on the process I found out that there was no easy way to integrate them. I guess we’ll see what happens. If all else I expect that I might me able to link in some other pages and hang them off the existing navigation path.
Here is a little tidbit for those of you that use Team Foundation Server. When working on a team you are forced to create batch/command files to create a workspace in TFS. The other option is to create it manually. This is clearly not a fun way to deal with the problem.
I was talking to someone in the know today about this and they said you could treat someone else's workspace as a template since they are actually stored on the server and not your local system. Follow these steps and you get a copy of the other person's workspace. This of course assumes that everyone is configured the same, path wise, but who wouldn't be?
From a Visual Studio command prompt; you can issue the following command to copy some one else's Team Foundation workspace:
tf workspace /new /template:[Workspace Name To Copy];[Domain]\[User Account] /server:[Server]
When you are prompted; change the 'Name' field at the top of the dialog to add the new workspace to your Visual Studio. This will allow you to avoid having to recreate the workspace by hand or update a command file each time the workspace changes.
If you don't know the name of the workspace you can use the following command to list them:
tf workspaces /owner:[Domain]\[User Account] /server:[Server]
More Posts