John Hesch

Echoing my thoughts and interests

Part 1, Part 2, Part 3

My daughter Amy is having a baby tonight or tomorrow. Her contractions are 10 minutes apart so I need to get some PIM accomplished quickly this evening. :)

The first order of business tonight is to download the IG:Syntax Hiliter for the code snippets I collect. There are many times that I need to locate some PHP or JavaScript code but can't remember where I placed it. For example, when I add an email address to a web page I forget where I keep the JavaScript code to hide email addresses from spam bots. Now I can search my PIM for "email JavaScript" and find the code quickly. The IG:Syntax Highlight plugin highlights code from 14 programming languages.

For example:

JavaScript:
  1.  
  2. <script>
  3. var contact = "John Hesch"
  4. var email = "john"
  5. var emailHost = "johnhesch.com"
  6. document.write("<a style='color:white; border-bottom:white; font-size: 8pt;' href=" + "mail" + "to:" + email + "@" + emailHost+ ">" + contact + "</a>" + ".")
  7. </script>
  8.  

I have a dedicated server where I host 4 or 5 of my own web sites plus the web sites of family and friends along with a few paying customers. I also have quite a few pages that I use to admin my radio station. I created a static page called Web Admin and this page will hold all of the links I need to administer my websites and server. I'm tempted to include usernames and passwords but even though my PIM will be password protected I don't trust the web enough to keep sensitive information online.

I created some tags this evening as I entered in some data. There have been some articles written about KZION in the past and I want to keep those even if they become unavailable from the newspaper itself. Since my PIM is for personal use and locked up I can copy the entire article to archive in my PIM without worrying about the copyright.

The last addition to my PIM for today was to create a To Do list. I created a new file called todo.php and added the following code:

PHP:
  1.  
  2. <?php
  3. /* File Name: todo.php  */
  4.  include ("wp-blog-header.php");
  5. get_header();
  6. get_sidebar();
  7. ?>
  8. <br />
  9. <div id="content">
  10.    <div class="post">
  11. <?php
  12. require_once  (ABSPATH . WPINC . '/rss-functions.php');
  13. $today = current_time('mysql', 1);
  14. if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today'") ) :
  15. ?>
  16. <div>
  17. <h3><?php _e('To Do List:') ?></h3>
  18. <ul>
  19. <?php foreach ($scheduled as $post) {
  20. if ($post->post_title == '')
  21. $post->post_title = sprintf(__('Post #%s'), $post->ID);
  22. echo "<li><a href='wp-admin/post.php?action=edit&amp;post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a> in " . human_time_diff( time(), strtotime($post->post_date_gmt) )  . "</li>";
  23. }
  24. ?>
  25. </ul>
  26. </div>
  27. <?php endif; ?>
  28.    </div>
  29. </div>
  30. <br />
  31. <?php get_footer(); ?>
  32.  

This page takes any posts that I have created which are future dated and lists them. When I want to create a new to do item, I just write it up as a post and then future date it for when it's due. I don't plan on using this as a simple to do list like take out the trash or pay a bill. I want a goal/to do list where I can list ideas or goals I want to follow up on or accomplish. When the item comes due it will become a post that will hopefully have the information or results I was looking for.

Well, my daughter is now being admitted and so I'm anxiously waiting the call to head over to the hospital. This will make me a 4 time grandpa!

  1. Joey Said,

    Wow. I was hoping my tips under part 1 would be helpful, but after reading parts 2 through 4 I’ve realized you have your bases far better covered than I do. I think I’ll start taking notes from you…

    Looks good. Keep the play-by-plays coming. :)

Graytone | Design: Tenant Report

Welcome to johnhesch.com, a blog about my life, projects, and interests. I have been blogging for over 10 years in one form or another.