posted by Kevin Wolff on 3 Feb 2007

There was an error that occurred when text was copied from Microsoft Word into an entry and the text contained an apostrophe.  Word uses special angled apostrophes that look more pleasing to the eye.  In fact, they do the same with quotation marks.  They use special characters for quotation marks so that they angle in towards the text they surround.

Anyway, these special characters are actually different than the plain text apostrophes and quotation marks and they really messed up the database script for inserting/editing entries.  This has now been fixed (the special characters get replaced with their plain text counterparts before they get pushed into the database).  Enjoy. 


16 comment(s)  | viewed 1828 time(s)
posted by Kevin Wolff on 26 Jan 2007

I used the triplet class for the first time today!  Yeeeeha!  The triplet class is a little known class in the System.Web.UI namespace that is predominantly used for viewstate.  Ever since I heard of it I've been dying to try it out.  It served the purpose very well.  It would be really cool if there was a typed dictionary version of the triplet but it works well enough as is so I can get by.

My purpose in using the triplet is in applying stylesheets to a page.  I store a key to make sure the stylesheet doesn't get applied twice, the path to the stylesheet and the media property for the stylesheet.

The AddStyleSheet method looks like this (:

public void AddStylesheet(string key, string path, string media)
{
    foreach (Triplet t in styleSheetList)
    {
        if (t.First.ToString().ToLower() == key) { return; }
    }
    styleSheetList.Add(new Triplet(key.ToLower(), path, media));
}

I would normally have opted to use a typed dictionary but I needed to store the media property as well.  I use a dictionary for adding javascript files to the page like so:

public void AddJavascriptFile(string key, string scriptFile)
{
    if (!javscriptFile.ContainsKey(key))
    {
        javscriptFile.Add(key, scriptFile);
    }
}

This is a much more elegant solution since I don't need to iterate through the... (click here to read the rest)


2 comment(s)  | viewed 332 time(s)
posted by Kevin Wolff on 25 Jan 2007

I wasn't going to do anything tonight so I lounged around and watched TV until around midnight.  Then I decided to poke around ye ol' internet to see if I could find a video 2 flash video converter API so that people can upload videos and have them stream via a flash player.

No luck on that.  I did however come across a sweet flash embedde MP3 player.  I decided to tinker around with it and sure enough, it seems to work.  This will be my first live test.  If you see the player in this entry then everything should be working fine.  Otherwise... you'll just have to wait longer.


83 comment(s)  | viewed 7091 time(s)
posted by Kevin Wolff on 24 Jan 2007

I took a bit of a break tonight.  I'm pretty tired so I just made a small tweak.  I've added the ability to format the style of text within an entry.  The reason I disabled this in the past is because these textual styles will override the selected theme or flavor.  If you change your entry text to red because you like the color against your background color, it may look totally nasty if you change the theme or flavor.  Plus, you get inconsistancies across entries.

That said, I can see some people's desire to have the feature enabled.  With power comes responsibility.

Use at your own risk.

Yup, that's right, I changed the font-size and color of the "use at your own risk" warning.  I did this by clicking the "AA" icon in the bottom right of the entry html format tool bars. 


0 comment(s)  | viewed 290 time(s)
posted by Kevin Wolff on 23 Jan 2007

Tonights task was one of the most brain intensive task I've done in a long time.  I reworked the way the image resizer crops images.  One of the fun features of this blog application is that you can (I should say could because the feature is disabled for now) upload and crop pictures for header graphics.  A glitch occurred when you tried to horizontally crop a vertical image.  My math was off.

Although the solution ended up not being entirely complicated I wracked my brain on it for many, many hours.  My brain is actually tired right now.  It's a strange feeling but I'm starting to get used to it.  Proportions and cross multiplication ended up saving the day.  Hopefully I'll get some time to add the headers graphics back into the application soon.


0 comment(s)  | viewed 257 time(s)
posted by Kevin Wolff on 22 Jan 2007
I always thought it looked entries looked little lame when I attached one image to them.  This is because the image gallery only has the one image in it just looks dumb with a whole bunch of space taken up by one image.  To remedy this problem I tweaked the code to put the single image inline with the text like it appears on the entry list pages.  I think it looks a little nicer.

0 comment(s)  | viewed 263 time(s)
posted by Kevin Wolff on 20 Jan 2007

Tonight I wired up some code that will send me an email any time there is an error on the site.  Now instead of that ugly error page that people used to see they'll see a nicely formatted error message without all the gory details.   Now I'll be sure to catch all the error instead of just the ones people tell me about.

I also made a couple of small formatting tweaks for comments and rss feeds.  Nothing fancy really.  Oh, and now if you post a comment it alerts you a little more noticably that your comment was successful.  And for those receiving comment email notifications the email should be formatted a little nicer as well.  Don't hold me to it though, I still need to test it out on this entry.


2 comment(s)  | viewed 288 time(s)
posted by Kevin Wolff on 18 Jan 2007

RSS stands for "Real Simple Syndication."  So.. who cares right? People use RSS readers to keep up to date on blogs.  RSS Readers check websites for updates and notify the user when blogs have been updated.  This blog application has a built in RSS feed.  To url to the feed is http://www.example.com/rss.aspx.  Replace www.example.com with the domain of the site you want to view.  The rss feed for this site is http://www.everybodyblogs.com/rss.aspx.

Firefox has a type of built-in rss reader called "Live Bookmarks."  Test it out by adding a live bookmark for this site (using the url provided above).

Internet Explorer 7 also has a built in RSS reader.  I haven't used it before so, you're on your own to figure it out. 

Happy RSS'ing. 


0 comment(s)  | viewed 730 time(s)
posted by Kevin Wolff on 18 Jan 2007

Ever wanted to embed media in the body of your entry?  Now you can with custom tags.  There are currently six custom tags available.  Below I will provide a list of currently available custom tags and an example of their usage and a description of what they do.  The custom tag needs to be surrounded by double square brackets like so [[tag:value]].  I would put the brackets in the actual example but the blog would try to replace the example, so that won't work.

  • thumbnail
    • thumbnail:filename.jpg
    • The thumbnail custom tag will embed a small version of the image that you can click on to view a larger version of the image.
  • image
    • image:filename.jpg
    • The image custom tag will basically just place a copy of the desired image in the body of your text.
  • youtube
    • youtube:uniqueid
    • The youtube custom tag is used to embed a youtube video in the body of your entry.  Just grab the id of the video from the url of the video.  Look in the url for v=(some long string of characters).  Don't put the "v=" in there.. you just want the string of characters.
  • googlevideo
    • googlevideo:uniqueid
    • The googlevideo custom tag works the same as the youtube custom tag.  Look for the id of the... (click here to read the rest)

0 comment(s)  | viewed 948 time(s)
posted by Kevin Wolff on 18 Jan 2007

Last night, while I was coming up with some clever code to allow a user to select the thumbnail for an entry, I ended up introducing a bug which made it so entries do not get assigned a thumbnail by default.  This means that when you upload some pictures to an entry the entry doesn't get a default thumbnail that gets displayed on the entry list pages (like the home page).

I fixed that tonight.  If you happened to create an entry (with photos) today and you're entry doesn't have a thumbnail you can get fix this by opening the entry in the admin tool and clicking the save button again.  All this will do is assign the entry a default thumbnail. 

The feature that I was adding can be found on the entry admin page in the "Options" section.  You can now choose a thumbnail for your entries.  The default setting is "Automatic" which means the system will automatically choose a thumbnail from the photos you've uploaded.  You can also select "No Thumbnail" which will obviously not assign a thumbnail for the entry.  If you haven't saved the entry yet then these are the only two option available.  If you have saved the... (click here to read the rest)


1 comment(s)  | viewed 476 time(s)

Tags

Code,  Bug,  Update,  Tutorial