Version 1.0
Last update: 9 Feb 2011
This is a list of bug fixes and enhancements for the blog software. The same information is listed
in the Readme file when you download the software.
Date | File | Fix |
9 Feb 2011 |
DisplayBlog.aspx AddComment.aspx |
Changed how the <title> element is filled in. Moved this logic entirely to code (used to use a data-binding expression). Added blog-entry title to the title for SEO. For DisplayBlog.aspx, this is done only in the logic for displaying a permalink. |
6 Feb 2011 | BlogEntry.aspx | Commented out ping to Technorati. |
6 Oct 09 | BlogError.aspx | Made a change so that if the page is dislayed without an error being passed via session state, it disables the ability to add a comment and a name. This is an experiment to see if it will cut down on the number of bogus errors I am sent via email, which might be spam-y. |
2 Oct 09 | App_Code/BlogDataAccess.vb | Added logic to cache results of GetDistinctCategories(). |
9 Aug 09 |
BlogAbout.aspx BlogDownload.aspx |
Disabled download. Removed the download link from About, and gutted the download page to leave only a static messsage. |
31 Mar 09 |
AddComment.aspx admin/BlogEntry.ascx App_Code/BlogFeed.vb rss/rssfeed_noxsl.xml |
In AddComment, made the title (h1) a link to home. Also added an explicit link that appears with the success message. In BlogEntry, made the link to File Upload open a new window (_blank). In BlogFeed.vb, added a little string replace that turns relative URLs for images into fully qualified URLs. Also added a flag (xslFlag) that reads the query string; if ?xsl=false, the feed reads a version of the feed skeleton (rssfeed_noxsl.xml) that does not contain a link to the XSL file. This seems to be required for Feedburner, which barfed when I updated it to point to blogfeed.rss. Giving it raw XML w/o the transform seemed to fix that. |
24 Jan 09 |
BlogContact.aspx BlogFooter.ascx |
Added a user control for contact information. The email address is created using my dynamic email control. The properties for this are in turn set at run time by getting the blog author email address from the Web.config file and parsing that. Then I added this "Web part" user control to the main page. |
18 Nov 08 | admin/BlogPurgeReferrers.aspx | Fleshed this page out a bit (I don't know when I actually added it) by adding logic to the Purge and Count buttons. So far it only works for keywords. |
13 Nov 08 | admin/BlogEntry.aspx |
Added a new blogTags table to the database. Added a Tags column to
the blogDrafts table. Added UI and logic to accommodate tags. These work much like categories (e.g., one-to-many between blog and blogTags). However, there are no constraints on the data -- it's all free-form. So no RequiredFieldValidator, no drop-down of available tags, etc. (A future enhancement is to add a deli.cio.us-type predictive-text feature for tags.) |
27 Oct 08 | admin/BlogEntry.aspx |
Added 2 UpdatePanel controls -- one for the category list and one for the Edit/Preview panes. This also resulted in adding client code to handle the
PageRequestManager.endRequest event in order to set button status appropriately. Because the Preview and Edit buttons are triggers for an async
postback but are not in the UpdatePanel control itself, their status was not affected by the post-request update. Since I added the ASP.NET AJAX
client library (via the ScriptManager control), I went ahead and started using $get shortcuts to get references to client objects. This now makes a lot of the
JavaScript dependent on having that library.
Also added client code to save and then restore the scroll position w/in the Entry text area, which (I hope) is useful when switching between Edit and Preview mode and also when adding a new category. |
02 Sep 08 |
DisplayBlog.aspx BlogUtility.vb Web.config |
Couple of small security fixes. Added <httpCookies httpOnlyCookies="true" /> to configuration. See
this blog post for more info. Added a length
check for text entered into the Search box in Display.aspx. In BlogUtility.vb, converted all the parameters that take user data
into SqlParameters and changed them to use SQL-specific data types. (Formerly they were typed as IDataParameter and used .NET-based
types.)
|
29 May 08 |
BlogQuote.ascx BlogTopHits.ascx BlogRoll.ascx |
Disabled viewstate for the controls that display the selected quote, the top hits, and the blogroll. For the
blogroll and blogtophits controls, I jiggered the code to cache the data, and then to rebind the relevant
controls on each postback. For the blogquotes, the whole quotes file (XML) is
already cached in Application state.
This is part of an overall effort to reduce the size of viewstate in the main page; no need to stick stuff into viewstate if it's just as easy to recreate it on each postback. This modest effort reduced the size of viewstate almost by half. (At the cost of server processing time, of course, and a tiny amount of server memory.) |
27 May 08 | web.config |
Chunked viewstate into 512-pieces. (Resulting in, like, 18 of them! Need to do something about that.) Did this by adding
the following line to web.config:
<pages ... maxPageStateFieldLength="512" /> |
23 May 08 | BlogEditComment..aspx |
Added the ability to also edit the name, email, and homepage of the commenter. While I was there, did some housekeeping by replacing formatting code with
a call to BlogUtility and by substituting a .js file include in place of the hand-written JavaScript for managing the button bar. (Also copied the button bar from
AddComment.aspx.)
Changed all instances of ConfigurationSettings (deprecated) to ConfigurationManager .
|
05 May 08 |
DisplayBlog.aspx web.config BlogError.aspx |
1) Tweaked the logic that accumulates hit counts to exclude hits that come from the current domain. The majority
of my hits were coming from mikepope.com, I think in some way related to the RSS feed.
2) Tweaked the logic for adding referrers to the database in the same way (ie, do not add if the referrers is the current domain). 3) Added entries to the web.config file to support this: countDomainHits and includeDomainInReferrers .
4) Changed all instances in the two .aspx pages of ConfigurationSettings (deprecated) to ConfigurationManager . I mean,
while I was there and all.
5) Changed the error handling (the calls to BlogError.aspx) to use Server.Transfer. Also added some identifying information to the individual exceptions. Within BlogError, extracted the exception from GetLastError first, in case it was getting reset due to something else in Page_Load(). Also added information from this GetLastError exception\ to what was being passed to the page explicitly. |
03 Mar 08 | Admin/BlogReferrers.aspx | Added filtering to exclude stuff like google, ASP.NET forums, etc., to cut down on the noise in this report. To implement this, changed the data sourcing from using a dataset to using a data reader that fills a List(Of Referrer) (which can then go through a second process to be filtered). Yay for generics. |
16 Jan 08 |
BlogCommentJS.js BlogUtility.vb AddComment.aspx BlogEntry.aspx |
Changed how to insert text that comes out red. Before, it used to insert a tag <red>, which was converted at some point into a <font> tag. Bah. Now it inserts a <span style='color:red'> tag. I added a new function named InsertColor to BlogCommentJS.js to handle this, and updated the toolbars in BlogEntry and AddComment to call this new function. Updated BlogUtility to update the method that does the HTML (un)encoding so that it will display properly in preview mode. |
23 Jan 08 | BlogEdit.aspx | Changed to use the text-reformatting method in BlogUtility, and removed the FormatText and UnFormatText methods from the code in the BlogEdit.aspx page. This has been done earlier in the BlogEntry.aspx page, I just hadn't gotten around to doing it in the BlogEdit.aspx page. |
09 Jan 08 |
AddComment.aspx Blogcommentjs.js |
Tweaked a bit to handle text overflow ... if the comment text is too long, I now a) turn the character counter bold + red, b) disable the Save button, and c) display an error message for good measure. (The last required adding a label/span to the display.) I did this separately in client code (to have immediate feedback) and server code (so the same changes would apply after a postback). The impetus was that I lost a (long) entry today when it didn't save but I closed the browser anyway, boo-hoo. |
08 Jan 08 | admin/BlogEnterQuotation.aspx | Added logic to handle tags, per the following: 1) display tags in the grid 2) display tags in the DetailsView control used to edit/insert 3) during insert, add tags as new child elements, 4) during update, remove any existing tags and add new (updated) tags as new child elements. |
03 Jan 08 |
quotes/quotations.xml quotes/quotes.xsl BlogDisplayAllQuotes.aspx |
Adding tagging to the quotations. In quotations.xml, added a <tags> element with child <tag> elements to each quote. In quotes.xsl, tweaked the transform to turn these potentially multiple tags into an attribute that's delimited with |. (Thanks to Phil Weber for help with this.) In BlogDisplayAllQuotes.aspx, added display of tags. Also added two drop-down lists to display codes and authors (while I was there, what the heck) and code to filter based on these. |
31 Dec 07 | BlogFooter.ascx | Removed sitemeter script; sitemeter has been silently linking to a tracking site. (Details) |
21 Oct 07 |
BlogEntry.aspx BlogCommentJS.js BlogEdit.aspx |
Added some client logic to persist the current footnote number to a hidden field and to read it from there. This fixes a small bug where switching between Edit and Preview modes reset the counter. In BlogEdit.aspx, added some logic to parse the blog entry after reading it, and if there's a footnote, to pre-set the hidden field with the current+1 footnote number. During this process, I also refactored the toolbar in the BlogEdit page to match the work done earlier for BlogEntry. |
26 Aug 07 |
AddComment.aspx Web.config |
Changed the email-send logic to have a separate email sender and recipient. Added entry in Web.config to accommodate sender. |
13 Jun 07 |
BlogError.aspx App_Code\BlogUtility.vb |
Added a test to the BlogError page to see if the comment added by the user contains a spam URL; if so, no mail is sent. Took the spam-URL-lookup logic out of BlogReferrer (well, copied it from there) and put it in BlogUtility. (Need to still change the BlogReferrer logic to simply call BlogUtility.) |
21 May 07 |
AddComment.aspx App_Code\BlogUtility.vb |
Added logic so that any string that's in the format "http://..." is turned into an actual link. This happens before save and before preview. Added a single method (MakeLinksHot) to BlogUtility that does a RegEx search and replace for http:// strings. |
19 May 07 | BlogEditComment.aspx | Changed to do some pre-formatting on the comment before it's displayed in the editor. Also fixed preview so that it looks ok now. |
08 May 07 | AddComment.aspx | Slightly changed the format (hard-coded) of the email body for comment notification. |
22 Mar 07 | DisplayBlog.aspx | Tweaked the control that displays the blog entry title. It was a label control that displayed the text statically. Now it's a hyperlink that links to the Comments page for that entry. Added an entry to the .css file for this control as well. |
24 Feb 07 | AddComment.aspx | Rearranged so that the controls that are used to enter commenter info and save the comment are visible in both the Post a Comment tab and the Preview Comment tab. |
29 Dec 06 | App_Code/BlogUtility.vb | Fixed bug in Technorati ping code -- wasn't filling the template in with info about the current blog. |
29 Dec 06 |
DisplayBlog.aspx BlogBlue.css |
Made the title (H1 element) hot by embedding an <a> element in it and setting its href attribute dynamically. This enables readers to click the blog title to go to the home page. Requested by Alan H. :-) |
22 Dec 06 |
Admin/BlogEntry.aspx App_Code/BlogUtility.vb |
Added a button (and JavaScript function) to insert a non-breaking space. |
22 Dec 06 |
DisplayBlog.aspx BlogTechnoratiInfo.ascx Web.config rss/TechnoratiPing.xml App_Code/BlogUtility.vb |
Added technorati info. I got an account (I "claimed" my blog), created the BlogTechnoratiInfo.ascx
user control, added Technorati's little .js reference to it, and then added the
user control to the DisplayBlog.aspx page. As a matter of interest, technorati seems
to require that you "claim" the complete, real (post-redirect) URL. This means that
I can't "claim" simple ol' www.mikepope.com, hence can't track links to that URL.
Oh, well. I had to add a couple of entries to the Web.config file to support this. One of the settings enables you to enable the technorati thing at all. I also added an auto-ping to the blog. When you create a new entry, you need to send them a ping to alert them. I created the technoratiping.xml file per their template. In the blogutility.vb class, I added a function to read the template and substitute appropriate info, then send the ping. I then added the ping call to BlogEntry.aspx. Whew! |
22 Nov 06 | App_Code/BlogUtility.vb | Fixed a bug in the format-fixup stuff where the closing </code> tag was being converted to </font>. Duh. |
23 Oct 06 |
AddComment.aspx App_Code/BlogUtility.vb App_Code/WordUtilities.vb App_Code/QuizControl.vb |
Created a new comments page that uses a pseudo-tab control and includes a formatting toolbar that works in both IE and Firefox. While I was there, I factored a lot of the data-access and utility methods into separate class files. Fixed a minor bug in QuizControl where it was assuming it would be initialized (hence establish property values) on page load, not postback. |
12 Oct 06 | BlogUpload.aspx | Changed the logic for validating a file name to use a whitelist set of characters. |
11 Oct 06 | BlogTrackback.aspx | Updated the logic slightly for determining whether the target blog entry has comments enabled (used IsDBNull). Removed the call to send email if a trackback is attempted against a closed entry -- turns out those were (almost?) always trackback spammers, and I don't need to know when they're hitting the blog. (They get the XML response with an error code, but the trackback isn't logged and I'm not notified.) Also fixed a tiny bug where the subject of the notification email was hard-coded but was supposed to use a subject string passed into the method. |
10 Oct 06 | BlogEntry.aspx | Changed the JavaScript used to insert a footnote ... it was not closing the <a> tag in the actual footnote. This was confusing the browser about applying styles. Note: in the mysterious ways of CSS, any links in the footnote use link style, not footnote style. (Until I figure out how to change that ...) |
17 Sep 06 |
BlogEntry.aspx BlogReviewDrafts.aspx CreateBlogDatabase.sql |
Added the ability to save blog entries as drafts. In AddComment.aspx, you can click a button to save the current entry as a draft. This is saved in a new database table, BlogDrafts. You can review existing drafts in the new page BlogReviewDrafts.aspx. When you select a draft for editing, it is read into BlogEntry.aspx and deleted from the database table. (You can save it again as a draft if you're not finished.) Added CREATE TABLE command to CreateBlogDatabase.sql for the new BlogDrafts table. |
11 Sep 06 |
AddComment.aspx DisplayBlog.aspx |
Added both a manual and an auto-discovery RSS link for the comment feed to the page. See the discussion at Comments and email. |
9 Sep 06 | AddComment.aspx | Changed the logic for sending emails so that a commenter's email is not exposed to other commenters. The feature sends two emails -- one to the blog owner, and one to all other commenters who've requested. email notification. The owner still sees all commenters' email addresses, but the commenters don't see each other's. |
11 Aug 06 | BlogEntry.aspx |
Changed the logic for getting the ID of a new blog entry, which is an identity column
in SQL Server. Finally! The old way was to run a search in DESC order by ID to get
the highest ID, assuming that was the new one. That worked, but was sub-elegant.
Instead, I now execute SELECT @@IDENTITY AS NewKey right after inserting
the new entry (this must be done on the same open connection). As a consequence,
I've excised the GetBlogID() function, thanks for all your hard work!.
|
8 Aug 06 |
DisplayBlog.aspx Web.config |
Added some logic in the InsertReferrers() method that looks for some keywords in the referrer URL and doesn't insert the referrer if there's a match. This includes words like "gambling," "poker," and other words in URLs that are obviously spam. Added this list to Web.config. Note This logic will be removed and put into an HttpModule when I can figure out the best way to respond (or better yet, not respond) to those URLs. |
5 Aug 06 | DisplayBlog.aspx | Reordered sidebar, put navigation first. Changed "Most recent entries" text to "Home". |
23 Jul 06 |
BlogEmail.aspx App_Code/Quizcontrol.vb |
Added CAPTCHA custom control to App_Code folder. Added CAPTCHA test as control to BlogEmail.aspx. |
14 Jul 06 |
rssfeed.xls rssfeed.js |
Changed the .xsl file to use an XSLT way to creating the dynamic links for Link and Comments. (Got it from a guy at work.) This obviates the need for JavaScript to walk the <a> tags and replace the href, so I removed that logic from the .js file. |
8 Jul 06 |
DisplayBlog.aspx BlogFeed.vb rssroot.xml rssfeed.xls rssfeed.js |
Brought BlogFeed.rss online, which is an HttpHandler version of the original BlogFeed.asmx rss feed. (Registered it in Web.config; the extension .rss was already registered with IIS from the BlogCommentsFeed.rss escapade.) Changed the rss category feeds in DisplayBlog.aspx to use this new class. (The main feed URL is soft-coded to a name in Web.config.) In rssroot.xml, the skeleton for the RSS feed, added a link to an XSLT (rssfeed.xls). This XLST in turn links to rssfeed.js, which contains JavaScript code to turn encoded HTML in blog entries back into real HTML. TODO: need to cache the output of BlogFeed.rss. |
24 Jun 06 | BlogCommentsFeed.vb | Changed the order in which the text placeholders are replaced -- made sure that the description (ie, the comment) was replaced last. Otherwise, if the commenter happened to include a string that matched a placeholder (e.g., %%link%%), the user's string would be swapped out. (It's pretty unlikely that this would come up in ordinary usage, but it could be a security issue that would allow people to inject something malicious.) |
18 Apr 06 | BlogUpload.aspx | Added some client script to default the name in the Save as box to the file name in the File to upload box less path and file name extension. |
2 Apr 06 |
App_Code/BlogCommentsFeed.vb Web.config DisplayBlog.aspx |
Created a version of the blog comments feed that responds to the .rss extension: BlogCommentsFeed.rss. I copied the original .ashx handler to a standalone handler class in the App_Code folder. (ASP.NET 2.0 only.) This also required mapping the .rss extension in IIS to ASP.NET, and adding a handlers section to the Web.config file to catch requests for the BlogCommentsFeed.rss resource. In DisplayBlog.aspx, changed the URL of the comment feed to the new .rss extension. |
23 Mar 06 |
BlogCommentsFeed.ashx BlogFeed.asmx rss/rssroot.xml rss/CommentRssHeader.xml rss/CommentRssDetail.xml |
Created the blog comments RSS feed, this time as a handler instead of a Web service. The handler reads XML file templates (stubs) and just does string replaces to fill in the fields. This is an experiment. In BlogFeed.asmx, I updated the feed to include several new XML elements: <slash:comment>, which provides a comment count; <wfw:commentRss>, the URL of the comment feed; and <trackback:ping>, which contains the (duh) trackback ping URL. I also updated the <wfw:commentRss> element by including the "wfw:" prefix, and added a "dc:" prefix to the <dc:language> element. All of these namespace/prefix changes required a change to the rssroot.xml stub file also. |
19 Mar 06 | AddComment.aspx | Added an anchor tag (HtmlAnchor) to each comment with the format blodid_commentid. This will be useful for an eventual comment RSS feed. |
7 Mar 06 | BlogQuotes.ascx | Finally got around to changing the quotation user control to use the quotations.xml file that I've been using for a while. Because the quotes are no longer maintained in a .txt file (how quaint), I now use a dataset to read them in from the XML file. |
6 Mar 06 | AddComment.aspx | Added a length check in the buttonSave_Click handler. Funny that that wasn't there before. Also added Exit Sub to Catch block in the buttonSave_Click handler. (The actual work is done in the InsertComment method, which simply returns a records affected value. If the comment is not saved (specifically, if affected records <> 1), the page should not create a cookie, send email, etc. Note that on failure to save the comment, the Catch block simply bounces the page back to the user with "Can't save comment." No logging or anything is done, nor do we try to display any exceptions. Perhaps someday I'll add more detailed error handling here. |
24 Feb 06 |
BlogEntry.aspx BlogEdit.aspx |
Rewrote the JavaScript for the toolbar to allow keyboard access (previously using hotkeys lost the selection). Added more buttons to expose functionality already available. Changed the hotkeys a little to make them more intuitive and to interfere less with common Windows hotkeys. Added some style info to the entry textbox and some styles in Blogblue.css file so that the entry and preview look a little more like what it looks like in the live blog. |
11 Feb 06 | BlogEntry.aspx | Changed a couple JavaScript functions for the toolbar. The Link and Indent buttons now work on selected text. |
28 Jan 06 | AddComment.aspx | Changed the contents of the email that is sent to notify people about a new comment. 1) Per request (thanks, Seth!), added the comment text into the email, so that people don't have to go to the blog to see the comment. I added some string fixups to kinda-sort convert HTML formatting in the comment to conventions of text formatting for the body text -- e.g. <b> becomes a star (*). 2) I also changed the link in the email body from DisplayBlog.aspx?permalink=xxx to AddComment.aspx?blogid=xxx -- it makes more sense to link to the list of comments than to the permalink, I think. |
20 Nov 05 |
DisplayBlog.aspx Web.config |
Added a FeedBurner link. Added an appconfig setting to set up a FeedBurner link specifically and logic that if that's blank, revert to the old .asmx-based feed. |
16 Nov 05 | BlogStatistics.asmx | Added output caching (1800 seconds). |
18 Sept 05 | BlogFed.asmx | Added an element for category, which gets the blog entry's category (or categories). I believe this info is picked up by (some) aggregators. |
03 Sept 05 | BlogReferrers.aspx | Fixed the logic that restores the dataset from Session -- apparently sorting never has worked. |
03 Sept 05 |
BlogTopHits.aspx BlogGoogleSearches.aspx BlogReferrers.aspx BlogEnterQuotation.aspx DisplayBlog.aspx |
Series of bug fixes, thanks to the efforts of
Michael B:
|
24 Aug 05 | BlogTrackback.aspx | Changed code slightly to send different Subject lines in email depending on the outcome of the trackback attempt. |
16 Aug 05 | BlogTrackback.aspx | Added code to validate that the source page has a link to the designated ID. If it does not, the source page (or source URL, anyway) is probably trackback spam. (Idea from Nikhil Kothari in a blog comment on 25 Jul 05.) |
12 Aug 05 |
BlogQuotes.ascx BlogEnterQuotation.aspx |
Created new page (BlogEnterQuotation.aspx) so I could add quotations remotely. This page is in the Admin folder. Moved quotations.txt to a new ..\quotes folder so that I could give it Write permissions without having to do that for the main blog folder. Updated BlogQuotes.ascx to read from the quotes folder instead of from the main blog folder. |
1 Aug 05 | BlogStatistics.ascx | Removed "last comment" stuff. I didn't like it. |
1 Aug 05 | DisplayBlog.aspx | Added some quick-navigation dropdowns to the blog calendar -- someone noted that scrolling through the months to go way back was a pain. (And in his case, crashed the blog, hmmm.) An enhancement would be to set a low limit of the first entry in the blog (ie, can't navigate before that). However, for now all it does is navigate back and back and no harm done, so ok. |
30 Jul 05 | AddComments.aspx | Fixed the logic for deleting a trackback (admin user only). Before, it was getting the ID of the comment, not of the trackback. |
21 Jul 05 | DisplayBlog.aspx | Added a test so that if a permalink is requested and that entry does not exist, the page quits and sends an error message to the error page. Before, the logic proceeded even without anything in the dataset, and this was causing the page to throw "index out of range" exceptions, which wasn't too helpful. |
21 Jul 05 |
BlogTrackBack.aspx DisplayBlog.aspx |
In BlogTrackBack.aspx, added a test to see if comments for the specified blog entry are disabled. If so, the entry refuses a trackback also. This is to prevent comment spam in the form of trackback spam. In DisplayBlog.aspx, added a few lines that disabled the Trackback link if comments are disabled. |
29 May 05 | AddComment.aspx | Put the call to the CreateAntiCommentSpamQuestion method inside a IsPostBack test. The page needs to create the quiz only on first viewing. This fix prevents the problem that when you click the Preview button, the quiz was regenerated, rendering your answer wrong (probably). |
20 May 05 | BlogEntry.aspx | Added logic to the trackback stuff so that it does not send a trackback to the current blog -- ie, it doesn't ping itself. |
8 May 05 | AddComment.aspx | Added code to display the hit count for the current entry, read from BlogTopHits. |
5 May 05 |
All display pages Web.config |
To support using the stylesheet link from anywhere (including pseudopaths like /blog/category/category.aspx), I changed the CSS <link> tag in DisplayBlog.aspx and all other display pages to be a server tag, used a data-binding expression to get the style sheet name from Web.config, and added a small function to resolve the stylesheet name. This means as a side benefit (?) that you can change style sheets by editing a single entry in the Web.config file. |
5 May 05 |
Global.asax DisplayBlog.aspx |
Added code to the Application_BeginRequest event to do URL redirection. In this
initial version, the following URL rewrites are supported:
/blog/category/category.aspx --> /blog/DisplayBlog.aspx?category=category /blog/id/id.aspx --> /blog/DisplayBlog.aspx?permalink=id Obviously, it would be more desirable to not have to have the .aspx extension on the "pages", but that's the only way that you can get IIS to dispatch to ASP.NET without a) routing all requests to ASP.NET, including static pages or b) setting up a folder and default.aspx for each possible value, no thanks. So this for now. |
26 Apr 05 |
BlogGoogleSearches.aspx DatePicker.aspx BlogBlue.css |
Added a page that selects records from the BlogReferrer table that contain "Google," and then parses out the q= search string. The page contains a date picker calendar implemented as a user control. Added an entry or two to the CSS stylesheet. |
26 Apr 05 | BlogEntry.aspx | Added an Indent button that inserts a div element with a left margin setting. |
15 Mar 05 | BlogStatistics.aspx | Added a "last comment" date. |
8 Mar 05 | AddComment.aspx | Added an anti-comment-spam "quiz" that poses an arithmetic problem that commenters must answer before their comment is accepted. |
3 Feb 05 | AddComment.aspx | Added a DataBinding event handler to the link for commenter's homepage. In the method, I add the rel="nofollow" attribute suggested by Google as an anti-comment spam defense. |
26 Jan 05 |
BlogFeed.asmx Web.config |
Added a switch to Web.config so the blogmaster can specify whether the RSS feed is full or truncated. (There's also a value in Web.config for the truncation size, but that's been there.) Added logic to BlogFeed.asmx to do two things. Thing 1: get the switch from Web.config and truncate or not per the setting. Thing 2: add code in the main method to check the query string for an override. If the QS value full=true is passed, the feed is always full, regardless of the Web.config setting. |
12 Nov 04 | BlogEntry.aspx | Integrated trackback auto-discovery into the default entry page. Added a checkbox (off by default -- should change?) to enable auto-trackback. This makes the page BlogEntryTBAuto.aspx unnecessary. |
12 Nov 04 |
AddComments.aspx DisplayBlog.aspx BlogEdit.aspx BlogEntry.aspx |
Added a feature to disable comments on individual entries. This is for administrators. Changes are scattered about. Added column DisableComments (type bit) to blog. (I realize that boolean should not be disabled if true, but a null value here needs to be false, so ...) Added "Disable comments" checkbox to BlogEntry.aspx and BlogEdit.aspx. Added a test to AddComments.aspx so that if comments are disabled for the entry, comment-entry fields are hidden. Added logic to the ItemDataBound handler of DisplayBlog.aspx to check for disabled comments; if so, the comment link is formatted as strikethrough. (However, it's still live, so that people can go to the comments page to view existing comments, if any.) While I was in DisplayBlog.aspx, I changed all blog queries to be blog.* instead of individual fields -- this affected only one or two queries. Still not sure that I like strikeout as the visual marker, but that's what we get right now. |
31 Oct 04 |
BlogEditComment.aspx AddComment.aspx |
Added a page that allows the admin user to edit a comment. (Got tired of not being able to correct my own comments.) Added a LinkButton to the comment display in AddComment that is displayed to the admin user (only), and that redirects to the comment editing page. |
07 Oct 04 |
AddComment.aspx Blogblue.css |
Added logic and controls to allow users to preview their comments before saving. Added a style to the .css to display a background color for the comment preview. |
04 Oct 04 | Global.asax | Added the recommended fix for the canonicalization issue with Forms auth. |
04 Oct 04 |
CreateBlogDatabase.sql DisplayBlog.aspx et al |
Fixed the CREATE TABLE statement to use the text data type for the description
(ie, the blog body text) and to add a length to the TrackBackUrl column. Fixed lots and lots of instances where cellpadding was spelled callpadding. This might have been the result of a bug in Web Matrix. Both of these bugs were pointed out by Jeff Atwood. Thanks! |
03 Oct 04 | BlogTopHits.ascx | Added some query-string switches to control display options for top hits, including adding a count and selecting how many top hits to display. |
24 Sep 04 | BlogRoll.ascx | Wrapped the display logic in an IsPostBack test. No need to re-fetch the data on each refresh. |
24 Sep 04 |
BlogTopHits.ascx DisplayBlog.aspx |
Created user control BlogTopHits.ascx that displays the top n most-requested permalinks. Added user control to DisplayBlog.aspx page. |
23 Sep 04 | DisplayBlog.aspx | Added a table blogTopHits. Added logic to the page so that when a permalink is requested in the query string, it accumulates a counter in that aforementioned table. This will, goes the theory, allow me to determine which are the most popular individual posts. We'll see. |
29 Aug 04 | BlogStatistics.ascx | Added more statistics (entries/day, comments/entry, hits/day.) |
28 Aug 04 | AddComment.aspx | Added the logic to check for unbalanced HTML tags in comments. |
18 Aug 04 | AddComment.aspx | Changed how the hard-coded ending tags are added (e.g., extra </font>). Before, for some insane reason I was adding them before saving the comment, which meant they were hard-coded into the comment in the database. Now I'm adding them dynamically in an ItemDataBound handler for the DataList control that displays comments. (This still isn't a very satisfactory way to guarantee balanced HTML tags by a long shot.) |
17 Aug 04 | BlogEntryTBAuto.aspx | Added the DHTML hacks to the page to support formatting (e.g., encoding). Also changed the logic for the categories list to add (Select) as the first option. Basically: brought this version of the entry page up to date with BlogEntry.aspx. (Apparently when I was adding the trackback stuff to BlogEntryTBAuto.aspx, I was using an old version of BlogEntry.aspx as the basis. Man, version control's a bitch. :-) ) |
11 Aug 04 | BlogEntry.aspx | Tweaked the dirty-flag logic. I had to reset the flags in these handlers: buttonSave_Click; buttonPreview_Click; listCategories_SelectedIndexChanged. The flags were being cleared during postback (see fix of 23 July), so they needed to be reset. |
5 Aug 04 | BlogEntryTBAuto.aspx | Added page, which is a variant on BlogEntryTB.aspx. This version performs auto-discovery trackback pinging. When the entry is saved, it looks through the entry for <a> tags with href attributes that don't just point to the current blog. For each such <a> tag, it a) gets the URL and sends a request; b) scrapes the result, looking for an rdf island that has a trackback ping URL in it; and c) if the trackback ping URL is found, sends it a trackback ping. Hence, auto-discovery. |
23 Jul 04 | BlogEntry.aspx | Added logic, mostly client script, to set a dirty flag when the text is edited in the blog entry box. The flag is checked when any attempt is made to leave the page, and the user is asked to confirm. There is some secondary logic (another flag) to not do this on postback for the Preview, Edit, and Save buttons and for the categories dropdown. |
22 Jul 04 |
BlogEntry.aspx BlogEdit.aspx |
Added logic to the FormatText() and UnformatText() functions to be a little smarter
about just blindly turning all <br> tags into crlf and vice versa. It now
looks for:
<pre>, <blockquote>, <ul>, <table>, <tr>, <td> tags and squeezes out extra <br> tags around those. It adds them back in when BlogEdit.aspx reads the info out of the database. |
11 Jul 04 | DisplayBlog.aspx | Redid the GetEntriesBySearchTerm() logic to accommodate AND clauses. See http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=743 for details. |
10 Jul 04 | DisplayBlog.aspx | Added logic to store the current page name (e.g. DisplayBlog.aspx) in a member variable. This is used when dynamically constructing URLs (e.g. for setting permalink URLs). I added this so I could rename the page while testing and have all the links work. Note that this is different from, although related to, storing the name in Web.config. |
1 July 04 |
DisplayBlog.aspx Blogfeed.asmx |
Added an RDF section to permalink display. This allows auto-discovery of the trackback URL by remote processes that scrape the page. Moved the rssroot.xml file to the rss folder; adjusted the code in Blogfeed.asmx to match. |
29 Jun 04 | AddComment.aspx | Added a required field validator to the comment box. I get a number of blank comments from "Anonymous"; I'm hoping this will prevent that problem. Note that this validator is server-side only. I can't make it client side because otherwise I can't click the Edit link (admin user only) to edit existing entries. |
20 Jun 04 | BlogEntryTB.aspx | Added new page that uses John Dyer's FreeTextBox control. |
20 Jun 04 |
DisplayBlog.aspx AddComment.aspx BlogTrackback.aspx |
Added logic to DisplayBlog.aspx to a) count trackbacks as part of the comment count,
b) display a trackback URL. While I was in the page, I did a fair bit of cleanup.
Examples: a) changed comment count logic to perform a SQL query for each item displayed.
(Formerly, the entire comment table was loaded into a dataset, and the page searched
that ds to count for comments. I also added similar logic to look for trackbacks
for each entry; the resulting number is added to the comment count. b) optimized
calendar lookup logic to do lookups only for the current month. c) centralized several
tasks into the datalist's ItemDataBound event rather than have them scattered around.
d) removed dead logic.
Changed AddComment.aspx to display trackbacks, if any. The logic is basically a copy of how comments are displayed. Added page BlogTrackback.aspx that "catches" trackback pings, writes trackback info to the database, and sends the XML response. I also added a new table blogTrackback to store trackback information. |
15 Jun 04 | AddComment.aspx | Added logic to allow the administrator (only) to delete blog comments. If the user is the admin, a Delete Comment button appears at the bottom of each comment. |
18 Apr 04 |
DisplayBlog.aspx BlogFooter.ascx BlogStatistics.ascx Web.config |
Created BlogStatistics user control that displays posts, comments, and hits. Added it to DisplayBlog.aspx. Changed BlogFooter.ascx to use data reader instead of dataset to get blog hits. Soft-coded cookie expiration times for blog hits (which determines how soon a reader is counted again); added a new app setting ("cookieCounterExpirationHours") to Web.config for this. Note: yeah, I know, I'm reading the hit counter twice. |
22 Feb 04 |
DisplayBlog.aspx BlogReferrers.aspx |
Changed referrers to be a database table rather than a series of text files. Added a table blogReferrers to the database. Added a subroutine InsertReferrer() to write Request.UrlReferrer + timestamp to the table. Created new version of BlogReferrers.aspx that reads database rather than reading text files. Added flags to web.config to enable referrer logging (true/false) and to set the start date for logging. (Dates earlier than the start date will not be enabled on the calendar in the referrer viewing page.) |
18 Feb 04 | DisplayBlog.aspx | Added a Calendar1_DayRender event to disable clicking on dates beyond today. |
17 Feb 04 | BlogFeed.asmx | Added a cache attribute to the GetRSS WebMethod. The cache is set to 1800 (30 minutes). This is an experiment to see if I can lighten the load on the database. |
17 Jan 04 |
DisplayBlog.aspx Web.config |
Added support to log the referrers to the blog. (IIS logs referrers for all requests, but I wanted to narrow it down to just the referrers to the blog. Four aspects: 1) set up a Referrers folder where the logs are kept as text files. 2) Create a RecordReferrer method in the page that does the work. 3) Add a call in Page_Load (!IsPostBack) to the RecordReferrer method. 4) Add a switch in the <ConfigurationManager> section of Web.config to be able to turn this feature on or off. |
30 Nov 03 | AddComment.aspx | Changed the email follow-up logic so it doesn't send an email to the person who just posted a comment. |
27 Nov 03 | AddComment.aspx | Fixed query for email follow up to use DISTINCT so that people get only one notification. I had included logic to filter out duplicates, but per Colt's suggestion, we might as well let SQL Server do that work. |
26 Nov 03 | AddComment.aspx |
Added the facility to request email follow-up to a comment -- if someone adds another
comment to the post, the user is notified. This required a series of changes:
|
26 Nov 03 | BlogEdit.aspx | Added the (Select) option to the Category drop-down list and the associated logic for excluding it as a valid selection. |
26 Nov 03 | BlogEdit.aspx | Copied the controls and logic (client script and some lines of server code) from BlogEntry.aspx to BlogEdit.aspx so the same editing facilities would be available while editing existing entries. |
25 Nov 03 | BlogEntry.aspx |
Added two more editing buttons to make it slightly easier to create a new entry.
A Footnote button calls some client script that creates an anchor tag that
points to # + condensed entry title + sequential number. It then adds a skeleton
footnote (with style set) to the bottom of the current entry and adds an anchor
tag with name to match the footnote "number."
An Encode button applies a home-grown HTML encoding (written in javascript) to the current selection. |
7 Nov 03 | BlogFeed.asmx | Changed the lines used to set the ETag and Last-Modified headers so that they now work as presumably designed. |
6 Nov 03 | BlogFeed.asmx | Added the feed optimization. Basically, the feed sends two HTTP headers; when a new request comes in, the code checks the values of the headers and if they match the headers sent out, it throws an HTTP 304 (Not Modified) error. While I was there, reorganized the logic. Mostly I broke out the original Web method (GetRSS) into a series of helper methods and shuffled things around a little bit. Now, the logic checks the most recent date first and does its comparison thing; only then does it do the full query to get the blog entries, etc. |
28 Oct 03 | DisplayBlog.aspx |
Solved the "problem" that if you type something in the Search box and hit Enter,
the wrong thing happens. What you want to happen is that it submits your search
term and displays the entries for that term. What actually happens (well, happened)
is that the form was submitted but no search occurred. This is a known and annoying
problem in ASP.NET pages running in IE when there is only one textbox on the page.
To solve the problem, I added a line to the Page_Load handler that injects a hidden
field and binds the Enter keystroke to the Search button:
Page.RegisterHiddenField("__EVENTTARGET", "buttonSearch") |
23 Oct 03 |
BlogEntry.aspx BlogEdit.aspx |
In BlogEntry, added a "(Select)" choice to the category drop-down list. Added logic to the selection handler so it does not add "(Select)" as an actual category. While I was there, I added an IndexOf test to make sure that you can't add the same category more than once. In BlogEntry, just added the dupe check. |
23 Oct 03 |
BlogFeed.asmx DisplayBlog.aspx |
To BlogFeed.asxm, added the ability to pass a category as a query string. Added
a second parameterized query (searches category on the join of blog and blogcategories)
that's used if a category is supplied.
To DisplayBlog.aspx, added an "RSS" hyperlink to the category display that points to the RSS feed with a query string for the category. |
3 Oct 03 |
DisplayBlog.aspx BlogEntry.aspx |
Changed the backslash (\) to forward slash (/) in relative paths (for images, mostly). Internet Explorer doesn't care, but it turns out that other browsers like Mozilla do. In DisplayBlog.aspx the slashes were hard-coded into the Up/Down button links and also hard-coded into the code that displays/hides the buttons. In BlogEntry.aspx, I changed the client script that inserts the img tag. |
27 Sep 03 | DisplayBlog.aspx |
Fixed SQL query used to search for terms when the "include comment" box is checked.
The query was throwing an error "ambiguous column blogid". So I made sure all references
to blogid are qualified with their table name. The affected code is:
If checkSearchComments.Checked Then aCommand.CommandText = "SELECT TOP " & pagesize & " blog.* FROM blog " & _ " LEFT OUTER JOIN blogComments ON blog.BlogID = blogComments.blogId " & _ " WHERE (blog.blogID < @hivalue) " & _ " AND ((blog.Description LIKE @searchterm) " & _ " OR (blog.title like @searchterm) " & _ " OR (blogComments.comment LIKE @searchterm)) " & _ " ORDER BY blog.EntryDateTime DESC " |
25 Sep 03 | DisplayBlog.aspx |
Added the following into the GetCalendarDates() method to fix a problem that if
there's only one date available, the Calendar won't fire its event when clicked.
If ds.tables(0).rows.count < 2 Then Dim tempDate as DateTime = Convert.ToDateTime("1/1/1") Calendar1.SelectedDates.Add(tempDate) End If |
24 Sep 03 | BlogEdit.aspx |
Fixed typo in this line:
Response.Redirect("..\Displayblog.aspx") |
22 Sep 03 | DisplayBlog.aspx | Changed formatting of data display for blog entry header (in the div) to include a day. |
Questions? Comments? Email me.
© 2003-2004 Mike Pope