Google
 
Web life.currenttoday.com
currenttoday.com

Archive for April, 2006

Very Easy Javascript in a WordPress Post

Tuesday, April 11th, 2006

The other day I wanted to enter a bit of javascript on one of my posts. I was making a BMI calculator page.

Well, I followed my first stupid inclination, and started typing javascript tags with code and form tags directly into the post editor in WordPress. You guessed it. That didn’t work.

After snooping around a bit, I started to rework the javascript code I already had in PHP. PHP is much easier to integrate with WordPress.

Well, I’m the kind of programmer who cuts and pastes everything I can. I haven’t mastered any given language. So, anytime I need to do something, I search for examples to get me started. If you can program in one language, all you need is a good example to get you going in another language [usually].

Many of you WordPress and Javascript gurus may think this is a stupid simplification or just plain unnecessary. But I’m a rather lazy person with a natural tendency to find the path of least resistance.

Forgive me if this is common knowledge in WordPress using javascript. But, I hadn’t gotten very far when it hit me that there was another really easy, very lazy, yet rather exotic way to put javascript into a WordPress post that would allow site wide editing. So I’m sharing it even if you gurus already know it.

If you have used WordPress at all, you likely are familiar with comments that look like this:

<!—adsense—>

Well, look at this one:

<!—adsense#Clock—>

Now look what it does:

That’s right! It hit me that the common plugin, Adsense-Deluxe, was already allowing the Google ads to use javascript anywhere you placed them in WordPress.

He he. The lazy man is a superior man.

Again, forgive me if using Adsense-Deluxe to get javascript into WordPress posts easily is old news.

If you want to go just a little further all you have to do to include javascript in the traditional way is to save a file with your javascript in it and place it in your post like this:

<script type=“text/javascript” src=“/scripts/myscript.js”></script>
<script type=“text/javascript”>
<!–
myfunctioninthescript();
//–></script>
 

If the script just runs as a whole, then you don’t need to call the function.

Now, there is a third way to get javascript into a WordPress post easily. It can have some issues if you aren’t careful, though.

Simply echo your script where you want it using PHP.

But, we were looking for an easy way to do it. Weren’t we?

One other way is an iframe tag. You can see my sudoku page doing that by Clicking Here.

Regards.

First Love, One Week after Death, Lost Love

Sunday, April 9th, 2006

Today marks one week since I watched my dad die.

I called mom again yesterday. We talked about how she was feeling and how the family back home was doing. She said she was going to clear out dad’s stuff. She just couldn’t bear it being around anymore. I told her she might want to give it a little time first. It would seem a shame to get rid of everything and then wish you had it back.

Then we chatted about her hobbies and things she could do now. I told her she should take the time to do things she had always wanted to do. I told her not to even give the slightest thought to expense. It didn’t matter to my brother or me if there was even one penny left. My brother and I both live just fine. She should take some time with a friend and travel the world–enjoy the things she always wanted to see and do.

I started naming places to visit and friends she could ask along for the trip. She had a reason not to consider each friend. She had a reason not to see each place. After a bit, when I had just about narrowed in on the perfect place, and the perfect friend, she started crying. She couldn’t speak for a moment. Then she sobbed over the phone.

She sobbed, “I don’t want to go anywhere anymore. I don’t want to do anything. We always went everywhere together. I can’t imagine going anywhere without him.”

Well, now I had done it. What I wanted to be a consoling call from her son had turned into a painful reminder of lost love.

All the wonderful stories of puppy love, of first love, of happy ever after had lived out between my mom and dad. They would have completed fifty wonderful years together within just a year and a half. Now, suddenly, it was all over. We were at the fairy tale’s end. We had discovered the ‘after’ that follows ‘happily ever after.’

This wasn’t a romance gone sour. This wasn’t a wanton dream of forbidden fruit that had faded from hope. This wasn’t an ideal dreamed and forever out of reach. This was the romance. This was the dream. This was the fruit fully enjoyed. And now that it was lost, this was the greatest kind of lost love. This was a thing to savor, now gone, now stolen. What was left was the deepest emptiness one could fathom. A hole in the soul.

Mom’s soul mate was gone.

This last week has brought some things home to me. I have looked at my daughter with a new look. I have considered priorities with a new born arrangement. I have genuinely examined my wife from this new vantage and found that I love her all the more.

Let me challenge you to make every effort to bask in the relationships you have, while you have them. You are living each moment for the last time. Taste it. Smell it. Relish it with all the desperation of the deepest breath drawn at the surface of the water from a dive to the furthest reaches your consciousness would allow.

Know the time. Know the riches of this moment’s passing. Heap up the pleasure of being and of being known. Love one another.

Regards.

I Just Watched my Dad Die

Friday, April 7th, 2006

On Thursday, one week ago, I received a phone call at work from my daughter. She was crying. Her cousin had just got off the phone with her.

“They’ve taken Paw Paw to the hospital,” my daughter sobbed.
“He’s had a stroke. They don’t think he will make it.”

Now, that was a phone call I had dreaded getting my entire adult life. I thought I had received that phone call over eight years ago. Mom had called crying. Dad had cancer. That was part of what made this phone call all the more sudden and surprising. How? My dad had come through cancer surgery, chemotherapy, and all the years of follow up without ever having been sick or losing his hair. The doctors were in constant disbelief at his stamina, strength, and lack of side effects through the whole ordeal.

My dad had continued working. He didn’t work, look, or act like an older man. He didn’t work because he had to. He worked because he loved it.

Two years ago, Dad had worked circles around me helping me roof my house. To the day he went to the hospital he was working with a friend installing gas lines and furnaces. He did the crawling under the houses and the digging. He was really in great shape.

Everyone believed he would live to be a hundred or more. He was the picture of health. He still looked like he was in his mid 50’s. I knew he would see my grand children marry.

So, I called my wife and told her the bad news. My dad and mom live almost 1200 miles to the east. We discussed it for a moment and decided to drop everything and get there as fast as we could.

At different times along the trip, someone would break down. We would all cry for a bit. When we arrived, early the next morning, I realized it was the first time in my life I wasn’t glad to see my home town. In fact, I hated it.

We went straight to the hospital.

My father was elevated in CCU with nothing attached except a heart and respiration monitor. My parents had long decided not to use anything to prolong the life and death struggle. But, you could see the new world we live in when the nurse promptly called for the neurosurgeon after I arrived. I’m sure they were needing to make sure I was on board with the decision to allow things to take their course. I comforted them with an affirmation of “whatever Dad and Mom wanted.”

Dad was so strong, as he lay there. I feared this could last months–even years. Evidently, the right side of his brain had suffered massive damage, but the left side was ok. He was able to squeeze my daughter’s hand when she asked, but he was basically comatose in every other way.

It was very tough seeing Dad that way. I’m very glad he suffered no pain throughout the whole thing.

The morning before his death, Dad ate breakfast with mom. He started slurring his words and losing control of his right side. He never even knew anything was happening when mom asked him. They took him to the hospital where he continued to lose cognitive levels, but never experienced any pain. A blood vessel had burst deep inside the right side of his brain. The neurosurgeon didn’t expect him to recover.

I asked them what would kill him. They said that pneumonia was most likely to end his life. There was a possibility he would begin to bleed again in his brain. This could cause him to lose respiration and heart beat.

The next day was a repeat of the first day. Many visitors and relatives dropped by. There was a small family clan that went in and out all day.

That evening, mom, I and my wife were returning to his room after the nurse had turned him and taken his temperature. The nurse wouldn’t tell us she knew he was dying. She said, “things are changing quickly now.”

I looked at the gages and instrument displays that had become easy to read the last two days. Dad’s respiration was 15 per minute. That was very low. It had been high in the 30’s and 40’s all day. Yes, 15 was very low.

As I watched, in the course of 2 minutes, Dad’s respiration rate kept going down. 15 per minute, 10 per minute, 8 per minute, 3 per minute, and finally, no respiration. I was surprised that his heart rate held steady at 49 beats per minute.

When he quit breathing, then his heart rate started to slow. 42 beats per minute, 30 beats per minute, and in less than two minutes, it started to lose its healthy pattern. It slowed to less then 20 beats per minute, and then just rippled where it had been beating. Finally, that stopped too.

I had just watched my dad die. It was one of the toughest things I have ever had to do. My mom laid across him sobbing, “What will I do. What will I do without him.” We all cried again.

That very night, at home, mom had to answer the donor survey when they called. It made me a little angry as she spent 20 minutes telling them Dad wasn’t ever in prison, Dad had no sex diseases. . . Couldn’t they find that out earlier? Maybe not. Things can change. Still, I hated that part of it.

Well, I’m back home now. I just called my mom again tonight. She is as well as can be expected. Life goes on.

We were planning to visit for two weeks this summer. To see Dad and Mom. It’s hard to think I’ll never see my dad again. Life goes on.

Regards.