Saturday, February 14, 2009

Blogger Hacking - Chronological Order

So, for the last 10 years, I have kept a journal. Except for the 2 years I was on my mission, I have always done it with a computer. Actually, I even did it with a computer for the 8 months I was in the mission office, to tell the truth... At first I used Wordperfect, but that got really long, and long files are a pain in the butt to open. Then I converted it to HTML files, and I would hand-edit an index I made.

Then I started learning about PHP and MySQL, and I fired up my own webserver and made what was basically a blog program. It was nothing compared to Blogger, but it kept all my journal entries all nice and neat, let me add them, search them, read them in chronological order, and jump around by date. It was wonderful, but not very easy to customize the layout, and I could only get at it from my home computer.

Blogger solved all of these problems for me - EXCEPT the chronological order part. Blogger posts things in reverse chronological order. And you can reverse the order of the archive, but not the actual posts. I searched all over the Internet for a widget or gadget or straight up template hack that would post them in the order I wanted, but I couldn't find anything except for "Just change the dates!" Yeah, that doesn't work very well for a journal, where dates matter. So, I made my own, and I'm writing about it here so that hopefully all the other frustrated people can benefit.

It turned out to be pretty simple. Go to your blog's Layout tab and click Edit HTML. Scroll all the way to the bottom, and find where it says </body>. Now, just before that, paste this code:

<!-- Start post reversal code -->
<script type='text/javascript'>
  var Blog1 = document.getElementById('Blog1');
  var postContainer = Blog1.childNodes[1];
  var first = postContainer.firstChild;
  var child = first.nextSibling;
  var childNext = null;
  var classes = '';

  var dateHeaders = false;
  while (child != null) {
    if (child.className == 'date-header') {
      dateHeaders = true;
      break;
    }
    child = child.nextSibling;
  }

  child = first.nextSibling;

  while (child != null) {
    if (child.className != null) {
      if (child.className.match('date-header') != null) {
        childNext = child.nextSibling;
        postContainer.insertBefore(child, first);
        first = child;
        child = childNext;
      } else if (child.className.match('post hentry') != null) {
        childNext = child.nextSibling;
        if (!dateHeaders) {
          postContainer.insertBefore(child, first);
          first = child;
        } else {
          postContainer.insertBefore(child, first.nextSibling);
        }
        child = childNext;
      } else {
        child = child.nextSibling;
      }
    } else {
      child = child.nextSibling;
    }
  }
</script>
<!-- End post reversal code -->

And that should do it! I'd love to get feedback from anyone who uses this; feel free to leave it in the comments section.  You can see it in action here: http://reversepostorder.blogspot.com

Saturday, February 7, 2009

More sickness!!!

So, David and I have been sick with Cedar fever for the past month. On top of that, David was sick a couple days ago with what I thought could have been the flu. I didn't worry about catching it because I got my flu shot back in November or so. Well, somehow I got sick. I don't know if I caught it from David or someone at school...couldn't have been from work since THEY NEVER PUT ME ON THE SCHEDULE ANYMORE! (sorry, had to get that off my chest...I just got off the phone with the hospital and they left me off the schedule once again for next month)

Back to my story....At first I thought it was just my allergies really flaring up. A couple days passed and I thought it had progressed into a head cold. Then this morning I woke up and had such difficulty breathing that I had to use my albuterol inhaler. It sucked. lol It's important that I know for sure that I don't have bronchitis or the flu b/c #1 it could progress into something serious, if I don't take care of it soon (since I have asthma) and #2 I can't work in the nursery on Sunday....although, it has been crazy with 20+ nusery kids and only 4 adults... it would lighten the load if they all got sick....NO! Bad thoughts! lol just kidding :P

Anyway, to keep it short we went to the doctor today and it's negative on the flu, negative for bronchitis... but I do have a virus. That means there is nothing the doc can give me to make me feel better. :( The ony thing I can count on is Mucinex and Benadryl, to treat the symptoms. I have heard from so many people how absolutely WONDERFUL Mucinex has worked for them. But after using it, I'm so disappointed! I guess it makes me feel a little better, but not great like it has worked on everyone else. Oh well. We'll see how long it takes for me to fight this crud off.
P.S.- You can click on the hearts over to the right with my valentine dog! It sounds like glass shattering :) It's pretty amusing for me, at least.

Thursday, February 5, 2009

Sick Day...

Well, I don't know whether it's the cedar or the flu, but something kicked my butt pretty good yesterday, and all the drugs in the world couldn't get me in to work.  So I took a sick day and Ashley took care of me.  :)

Ashley is so wonderful at taking care of me when I'm sick.  She makes sure I take medicine that makes me feel better even when I'm trying to "take it like a man" and do without.  She makes food for me, checks up on me, and keeps me warm and comfortable and entertained.  And even though she had an English class, she was gone for no more than 20 minutes!  See, they were editing their papers with the professor, and he asked for volunteers to go first.  Ashley wasn't scared, and instead saw it as an opportunity to leave faster and get back home to me, and so she went first.  This is exactly why Ashley is going to be so good in her nursing career: she's very good at caring for other people, and also making them feel cared for.  All of her patients (including me!) love her for that.

Isn't she great?  If you're a man and you're jealous reading this, good.  You should be.  If not, you're probably using the word "man" very loosely when applying it to yourself.

P.S.  I'm feeling much better now and I'm back at work.  Thanks again Ashley!  I love you!

Sunday, February 1, 2009

Shout out!

Shout out to my parents! I just want to say that this is such a cute pic of my parents! I love this picture of them! They took this at a football game out in the cold, and they still look fabulicious! lol :D

Monday, January 19, 2009

This Plant Is Evil!

My friends, this is Juniperus ashei, commonly known as the mountain cedar, and it is EVIL!

Allow me to explain why. Previous to moving to Texas, I had no known allergies. Nothing. I was invincible to anything nature decided to throw at me. But last year I had some itchy eyes, and was trying to figure out the cause, and the doctor told me it was probably a cedar allergy. I got some eye drops, used them once, and I was completely fine.

However, now, for the last two months, I've woken up really congested. (Ashley can tell you that the process of me becoming decongested is not pretty.) And today, I woke up with bad congestion and my eyes have itched all day, with no help from the magical eyedrops. I suppose they did expire in September, but still... Nothing. Worse, Ashley hardly slept at all and has much worse symptoms than me. She was sneezing like crazy early in the morning, and feels a lot crappier than I do.

I never pay attention to the allergy forecast on the news, but today had me curious, and so I looked. The cedar pollen level is at 18,330. To put that in perspective, cedar is considered "Very High" when it's above 1,500. So currently we're dealing with 1200% of what's considered "Very High." That sucks. I don't like it one bit. And therefore, I have a request to make of everyone.

If you see a tree like the one above, burn it. Burn it, and burn all its friends, and salt the earth so that nothing can ever grow there again.

P.S. What makes this situation even more gross is that fact that the pollen that's infesting my breathing air is basically tree sperm. That's nasty - you trees need to keep your reproductive systems to yourselves, or at least outsource to the bees instead of the entire freaking atmosphere.

P.P.S. Here's a video of the mountain cedar pollinating, so you can see what I'm talking about:

Thursday, December 18, 2008

Early Christmas



On Saturday we decided to ditch our ward Christmas party to have an early Christmas. David was just too excited about exchanging gifts... he couldn't wait until Christmas. ;P So, I said "I guess I'm up for it." hahaha I'm just kidding. It really was his idea! First, we made gingerbread houses (something I had never done before). David made a really awesome two story castle/dream house, and I made a mobile home ;) I don't know where the idea came from... It was really fun to make though.



Friday, December 12, 2008

4.0!!!

Ashley doesn't know I'm posting this, or else she would stop me.  But I'm at work, so she can't.  Mwahahaha!

So, the semester of school is finally over, and the results are in (unofficially): despite having finals right after Thanksgiving weekend, not having a lot of time to study because of travel on weekends and lots of other random stuff that happened, taking Microbiology and Human Growth and Development at the same time, and having one professor that barely speaks English and another that's very disorganized, Ashley has scored her second consecutive 4.0!

Congratulations baby!  I'm so proud of what you've done this semester, and I want everyone to know it!  I love you!

P.S.  This means that Ashley has some free time on her hands, finally.  So, if you ever wanted to bug her about something but didn't want to interrupt her studying, what are you waiting for?!