Read all posts & Registration PM

This post has 37 Replies | 8 Followers

Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam
Alex Crome Posted: Sat, Sep 22 2007 5:10 PM

I have made two CS modules and one Control to aid with sending a private message to all new users and to mark all your posts as read.  I've seen various people on the forums also looking for this functionality so I've posted them to my website.  You can read more about the controls at http://askcrome.co.uk/archive/2007/09/22/two-cs-modules-and-one-control.aspx and you can download them from http://askcrome.co.uk/files/folders/files/entry3.aspx.  Installation instructions are included in the download.

For help with these modules, either post a comment on my blog or (probably the more reliable method), reply to this post.  If people are interested, I could also post the source code for the modules.

Latest version - http://askcrome.co.uk/archive/2007/10/06/alexcrome-cs-1-2.aspx

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

Top 75 Contributor
Posts 297
Points 4,145
jay replied on Sun, Sep 23 2007 2:15 AM

Thats cool, I have been looking for a way to send new users a PM when they sign up Because some people just dont know how CS works when they sign up.

I'll grab the control in a few and let you know how it goes. Is this for CS 2.1 or 2007 Or both? Either way i'll find out in a few.

Thanks, Jay

 

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam

They're for CS2007.  I've also just posted two fixes for the ReadAllPosts control and module so that they work on subforums.  You can get them from the same download link as above.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 8:23 AM

Hello,

I've just tested the new dll. The Mark all as Read works fine now and also the Mark Threads Read on User Create.

The Registration PM has a problem. When activated, at the user create page, if the username has a digit (I used testuser2 as a username for testing), upon clicking the Join Now button I get this error: 

An error occurred while attempting to create this user.

The user gets created but with all the posts marked unread and also the PM doesn't get send.

Thaks again for this module. It's great.

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam

I've just tried and it a user with a digit in worked fine for me.  Can you goto Control Panel > Administration > Reports > Exception Reports.  Sort the exceptions by last occurence and to take unhandled exceptions.  Can find and post the exact error that is given.  If you cannot find the error, create a new user that causes the error then immediatly check the Error log.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 9:12 AM

Just tested. Seems to be doing this problem with just some usernames: testuser2, test2user, test4user doesn't work. testuser3 works.

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam

Can you post the error message generated from Administration > Reports > Exception Reports.  Sort them by date occured and tick 'show unhandled exceptions'.  If you can't work out which error it is, paste the first 4 or 5 error messages and I'll try to work out the problem.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 9:42 AM

Problem is there is no error in the report. I did set enableExceptionLogging = "true" in communityserver.config but I get no error. What else should I do? I am testing this for the last 4 hours. It's so annoying that I don't quite get the exact scenario.

OTOH, is it possible to have the PM generated at the moment of the approval of the account? We are manually validating accounts and if the PM is sending at the account creation time and that respective account it's not validated it's not exactly a great scenario. Thanks.

 

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam
Alex Crome replied on Sun, Sep 23 2007 10:10 AM

Can you confirm that you are showing all unhandled exceptions. 

You should be on page (controlpanel/Tools/Reports/ExceptionsReport.aspx) and have Exception Type as All Exceptions, That has as all, Sort By as Last occured and Include Unhandled Exceptions ticked, then press Go.

If that still doesn't show any exceptions, have you installed any other CSModules that could be taking part in the User Creation event.

 

As for sending the PM whent he account is activated, I shall have a look at doing that however I will not have a chance to do so until next weekend.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 10:21 AM

Yes, I can confirm all that. There is no exception regarding your module. I am using another CSModule, more precisely the Dan Bartel's Calendar Module here: http://communityserver.org/files/folders/csmodules/entry513095.aspx.

But I'm pretty sure the error comes from you module, because after I delete the PM module entries from the communityserver_override.config everything works fine. If you need/want to test, you cand try visit out site: www.astraforum.ro For now I have disabled the PM module but I can re-eneble it if you want to.

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam
Alex Crome replied on Sun, Sep 23 2007 10:43 AM

You say there is no exception regarding my module - does that mean that there are some exception.  Check for any excpetions that regards the path user/CreateUser.aspx.

Sorry if i'm going over things you've already done but I'm really confused as to what's causing the problem.  In it's current state, the only place an error can really occur with my module is within the Initilisation stage.  If an error occurs there, you'll get a SiteURLs.Config error page and won't be able to access any of the site (I need to fix it at some point to handle errors more gracefully but that's for next weekend).  Once the module's initialised, the only way it can throw an error is once i've passed the body and subject onto the CS API to send the private message.

One other thing - if you still can't find an exception, if you delete the users that caused errors when you created and try to recreate them, do you still get an error.  Try that with both the PM module enabled and disabled.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 11:33 AM

Just wrote a very long reply, lost because of cookie refresh. Very angry.

So, here I go again:

Tested like this:

PM Off

created user testuser2; succes; deleted user

enabled PM; updated web.config for app refresh; deleted temp files and cookies

created testuser2; succes; PM sent, posts marked read;

created test2user; failed with message An error occurred while attempting to create this user. ; user gets created but PM not sent, posts marked unread;

deleted both testuser2 and test2user accounts

created test2user; failed with message An error occurred while attempting to create this user. ; user gets created but PM not sent, posts marked unread;

created testuser; failed with message An error occurred while attempting to create this user. ; user gets created but PM not sent, posts marked unread;

So after the initial succes all other attempts failed.

You can test on my forum for the next 30 minutes. After that I will disable the PM module. No errors on the logs.

  • | Post Points: 20
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam
Alex Crome replied on Sun, Sep 23 2007 12:08 PM

I have found the problem - The private message is being flagged as a duplicate post.

If you are desperate to use this module, go to Administration > Forums > Global Forum Settings.  On the Duplicates & Flooding tab, change Allow Duplicate Posts to off.  This is not an optimal solution however it will allow you to use the module.  I didn't have this turned on on my local website and so wasn't seeing this problem.

At the moment, I'm not sure how to fix this problem.  I've had a look at the dataprovider and the AllowDuplicatePosts is inherited straight from the ForumConfiguration, without any option to override it per post.  The only way I can see how to do this is to copy teh code for inserting a post into my module but that would be dangerous if in the next service pack, Telignet make a modification to the stored procedure.

If anyone else knows of a way to override the IsDuplicate option on a per post basis, I would love to hear how.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 855
vulupe replied on Sun, Sep 23 2007 12:17 PM

Well, it's good that you finally know the root cause. Duplicate posts reffers to the PM beeing sent, right? Maybe if you introduce some variations in the PM body that are specific to the user (like user name, e-mail account, date/time of registration, etc) then the PM won't be marked as duplicate.

  • | Post Points: 5
Top 10 Contributor
Posts 3,566
Points 53,845
TelligentSupportTeam

Finally had a change to update this.  You can work around the duplicate post bug by specifing [username] somewhere in the body of your message (which wll be replaced by the users username.  There are two breaking changes with this version

  • Removed support for specifying body and subject inline in the module’s configuration section.
  • Renamed MarkAllPostsRead to MarkAllPostsReadControl

For more details, see http://askcrome.co.uk/archive/2007/10/06/alexcrome-cs-1-2.aspx.  You can download the package from http://askcrome.co.uk/files/folders/files/entry14.aspx.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • Filed under:
  • | Post Points: 20
Page 1 of 3 (38 items) 1 2 3 Next > | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com