Title Image

Don Xml's Grok This

The home of Don Demsak
Welcome to Don Xml's Grok This Sign in | Help
in Search

This Blog

Syndication

Site Sponsors

DonXml's All Things Techie

.Text Moderation Code

Alright, I think I got the last of the bugs out of the modifications I did to add moderations to .Text 0.95.  You can download the code here.  It only contains the source files that I updated, the DB Changes, Miguel Jimenez’s HIP-CAPTCHA Control, and the small change to the web.config file (so that the CAPTCHA control will work its magic).

So, the install step are:

  1. Unzip the file.
  2. Compare the source files to yours( and merge if you have done any of your own customizations)
  3. In the Data Folder, run the blog_ContentTableChange script and then the ModerationUpdatedSprocs.
  4. Copy the Captcha control to bin
  5. Add the CAPTHCA HttpHandler command to the web.config.
  6. Recompile .Text and test.

There are a couple items in the changed files that are part of my Aggregated Skin Change, but they should not be a problem.  I’ll publish those changes another time.

All comments (both via the site and thru the CommentAPI) should be moderated, along with all trackbacks and pingbacks.  I added sending a email to the blog owner whenever a pingback/trackback is posted (which isn’t the case in .Text 0.95), since you will need to approve the post.  At some time we really need to add CAPTCHA to the CommentAPI, but that will require a change in the spec (so both the blog engines and RSS Readers can implement it).

Published Tuesday, January 25, 2005 8:51 PM by donxml
Filed under:

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

Comments

Chris Wallace said:

Don,

I just implemented the info from this post into a custom config of .Text I'm working on to replace my dotnetjunkies blog. I noticed a couple of errors in the SQL files. In the blog_ContentTableChange file it should read blog_Content for the table instead of testtable. In the ModerationUpdatedSprocs file you need to remove change DonXML.blog_GetPageableFeedback to just blog_GetPageableFeedback. It was pretty easy to fix so not a big deal, just an FYI. Other than that everything went off without a hitch. Thanks for posting this.
January 27, 2005 9:27 PM

Don Demsak said:

Thanks for the feedback. I updated the zip file with the corrections.
January 28, 2005 10:14 AM

Chris Wallace said:

Don,

I may have found a bug. If someone posts I comment and I view the post while logged in as admin I get the remove comment link but when I click on it, it does nothing. I started debugging the code, and the event doesn't seem to be firing so I added an ispostback condition to keep from rebinding the data on the page and it skips binding and then immediately goes back through the load routine but the second time around it thinks it isn't a postback so it binds the data again. I have no clue why it would be running through the page load twice. Any ideas?
February 1, 2005 9:58 PM

Don Demsak said:

Chris, that is a bug that I caught, figured out, but couldn't fix in the time I had. It has to do with the CAPTCHA control. The CAPTCHA control should only kick in when you submit a comment, but it validates the postback to that page all the time. You didn't sumbit the code, so it didn't let the postback thru. I didn't want the CAPTCHA to be visible if you were signed in as admin, but the obvious thing of setting the control.visible to false didn't work, so I skipped it and went off to do other work. So, yes this is a bug, and I'd like to fix it (along with some other usability things) but I've got to find time.
February 2, 2005 7:08 AM

Chris Wallace said:

Ok, the double postback (or at least what appeared to be a double postback) was weirding me out. Now that you've detailed the issue I'll see if I can get it fixed and keep you posted on what I come up with, if anything.
February 2, 2005 9:17 AM

Chris Wallace said:

Looks like we're SOL since the CAPTCHA control overrides the page load and doesn't load the base page until the end of it's own load. In short, it runs prior to any code we have control over and there isn't a way to disable it on the fly (as far as I can tell anyway). I'm going to suggest to Miquel that he check the Request.IsAuthenticated and Security.IsAdmin methods prior to running his validation code and if those evaluate properly, disable the control.
February 2, 2005 8:11 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About donxml

I’m an independent consultant, specializing in .Net solutions architecture, based out of New Jersey who also doubles as an evangelist for XML, Domain Driven Design, enterprise architecture and .Net. I do not work for Microsoft, the W3C or any other big company that you may know of (at least not yet). I’ve been an indie for over ten years, and although I’ve been tempted a couple times to take a job with companies like Microsoft, I’ve haven’t found something better than my current situation. I work mostly with the large pharmaceuticals that are based here in New Jersey, and usually find myself on long term contracts. Definitely not the prototypical indie consultant, but it lets me dedicate time to my non-income generating activities like the developer community stuff, plus financing open source projects like XPathmania and MVP-XML. If you would like to talk to me about doing some contract work, just contact me via the contact page. My rates vary widely, depending on lots of different variables, but mostly distance from Jersey, and type of work. Plus, I’ve been known to donate some of my code for various projects.
Powered by Community Server, by Telligent Systems