Community Server on my mind

J-O Eriksson's blog


  • Running on CS 2.1 SP 2

    See top menu for subscription options

    Technology Blogs - Blog Top Sites

    BlogRankers.com

    Add to Technorati Favorites



The forgotten notifications (a new CSModule)

Do you have any forums posts that have been caught by a spam rule? Or do you have any forums posts that haven't been approved for other reasons?

It's not easy to know unless you frequently visit your Control Panel -> Forums to Moderate. I have had sites where I discovered posts that were several months old. On one of my sites someone complained that his post didn't show up after posting. Going to forums moderation, of course there it was.

During the autumn of 2006 I therefore started to build a CSModule to enable notifications for moderated forums posts. But I never got it to work correctly. And since I had other things with higher priority to do at the time, I forgot about it. That is, until George J. Capnias posted about it about a week ago. His findings was that the code for that operation is missing from CS. So he presents us with the code to make this work. Great, now we can have our notifications of moderated forum posts that we might believe we had from the beginning. Smile

Since I'm not that fond of altering the original source code of CS, and the fact that I'm known to somewhat like CSModules, I thought I'd still finish off my forgotten CSModule. And I did!

The problem I had before, and didn't manage to solve then, was using one of the e-mail templates to send the mail. I found out now I couldn't really solve it with the could that should be used, but had to make some workarounds.

Here we can see the function for building the email from the 'ModeratorEmailNotification'-template:

As you can see, instead of using the PopulateHeader etc. to fill out the email, I had to use some RegEx's to do the job. The built-in Populate methods don't seem to have code for filling these fields.

The code for getting a collection of Moderators for a specific forum is partly taken from another users blog post, which also did some similar solution. I have tried to find the source I used for this code, but couldn't find it. If any of you readers recognize this code as something you've posted before, please let me know so I can give it the proper credits. I think I took part of that code and modified it just a little bit. Can't remember.

As you can see it uses the GetForumModeratorRoles to get the moderators of a forum.

Now I am running this CSModule on a couple of my sites, and it seems to work nice. However, I believe there's a problem for the admin user that is created when setting up a community and that is a member of all roles, it doesn't seem to work for that user, and I don't know why. If anyone have any insight on why it doesn't work, please let me know. It seems that the GetForumModeratorRoles don't fetch that user.

Do you want to try this on your site? I have uploaded it to the downloads section here at my blog, so please download and try if you want. There is a readme.txt in the ZIP on how to install it.

Download it here!

So now you can get your notifications for moderated forum posts, whether you choose to do it in the source code (George's solution), or via a CSModule (my solution).

If you enjoyed this post Subscribe to my feed via RSS or e-mail!
Posted: Monday, February 12, 2007 8:47 AM by J-O Eriksson

Comments

Dave Burke said:

blog bits Things seem to be settling down on the new Community Server licensing situation as Rob Howard

# February 13, 2007 10:54 PM

Daily News List Blog said:

The forgotten notifications CSModule released by the never-forgotten Swede. J-O Eriksson packages up

# February 15, 2007 9:07 PM

Community Server Bits said:

The forgotten notifications CSModule released by the never-forgotten Swede. J-O Eriksson packages up

# March 11, 2007 9:59 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS