Blog

Family Tree

So, my mom setup a free Ancestry.com account which is good until March 22nd. After that it is really expensive to continue going. At this point to where I am in my family tree, we would have to pay for the maximum package to locate members of my family who are from Sweden. My mom’s side of the family is covered pretty well, all the way back to the 1400’s. Any Shackelford’s out there? Also found out I am related to Woody Guthrie and his son Arlo Guthrie on my mother’s side. On my father’s side I only got back to my great-grandmother until my dad told me about her sister, Gerda Ulrika Dahlberg, who unfortunately froze to death during the sinking of the Titanic. Fortunately because of that incident, it has helped me get back to my lineage in Sweden, but without shelling out $300 or so, I can’t get any further. Pretty cool that I now know the address to where my great grandmother (Signe M. Dahlberg Johnson) lived while working for Adlai Stevenson.

Now this is where you all come in. I would love to continue this and I found plenty of resources out there, but if any of you are family tree hackers, I would love input on how I should continue over the next couple of weeks. Is there software I should be using? Something I need to focus on or learn? My dad’s mother is of American Indian decent. So, ancestry.com doesn’t help much here, so if anyone knows how to proceed in possibly getting more information, let me know. I appreciate any and all help, so please, leave a comment. Thanks all!

Posted in Personal | 7 Responses

Pissing Contests – Nobody is a Winner

Here we go again with what I am calling the Linux Pissing Contest. See, years ago it was browser wars, then it was desktop wars, now it is contributor wars. All are useless, I don’t care how you break them down. Today, I read a post on Linux Journal titled, Who Contributes the Most to LibreOffice?.

The answer is simple, WHO CARES. First and foremost, I have nothing against the author. I am just tired of these pissing contests. First it was who contributes the most to the kernel. And then you had a bunch of immature people attacking this distribution and that distribution. Why write stuff like this? What does it prove? Who does it help? What are you all trying to prove? Thus far, everyone of these pissing contests have been about quantity and nothing about quality.

If you are one of those who strive to have the most commits for a project because you think it is cool, well then this is for you:

Bozo-Button

UPDATE: This is for a little clarification. The post that LJ did is exactly the type of post(s) that lead to the entire Kernel commit bullcrap that went on 2 years ago. The same thing will happen with this one, and if you follow other Linux or Open Source news things, they are already picking up on it and each one points out the same exact thing. Sure, 133 new contributors, but who are they? Do they all work for Novell or Red Hat, because that is who LJ really focused on in terms on names and the amount. Then LJ brought up Canonical, and then added the, “They contributed the Human theme and a later fix…” They don’t see what the 133 new contributors committed, or what Novell or Red Hat committed. It is just another cheap stab, and this is what kicks off the pissing contests.

I should probably also make it clear that I am not a fanboy who is enraged, I am not crazy about Canonical either. I use Kubuntu, openSUSE, Fedora, and Arch on all of my machines, so I am not sticking up for anyone here. I am just trying to point out that these pissing contests that kick off are what make us look like a joke to the “mainstream“.

Posted in Linux | 13 Responses

WordPress, Thematic, and WP-Paginate

Since changing around my website and blog this month, I have switched over to using Thematic, a WordPress theme framework. I have created my own child theme and have written plenty of PHP code to get it the way I like and of course to hopefully optimize the site as much as possible. One thing I can’t stand with a default WordPress installation is its pagination. Pagination is what the « Older posts and Newer posts » are. If you have more than a few pages of blog posts, these become a pain for most readers. I know when I come across blogs like that, and I want to hit every other page of posts, I usually just change the page number in the address bar.

I have chosen to use a plugin called WP-Paginate that creates a block of page numbers which allow the reader to select a page number instead of next or previous. The following is an example of what I am talking about:

WP-Paginate Example

First thing you will need to do is install the plugin and activate it. After doing that, you need to set it up, and of course this is something you should play with to get it the way you would like. After tweaking and testing, the settings I use that worked best for me were:

  • Pagination Label, Previous Page, Next Page, Before Markup, and After Markup I left default.
  • Markup Display and WP-Paginate CSS File are both checked.
  • Page Range I set to 4
  • Page Anchors I set to 1
  • Page Gap I set to 3

NOTE: the following is for use with WordPress 3.1 and a Thematic child-theme. Will it work on other themes or child-themes? I don’t know, that would be up to you to play around with, I just know this is working with the latest version of WordPress at this time and Thematic as well. Thematic version as of this post is 0.9.7.7.

The next step would be to add an override function for either your above-nav or your below-nav, or both. In my case, I did both, but with a twist. When I am reading the first page, I didn’t want the pagination block to be at the top of the blog page, but when viewing pages 2 and up, I wanted to see the block at the top. This way here if a reader decided when the page loaded they didn’t want anything there, they could switch to another page without having to scroll down to the bottom of the page.

Now remember, I am showing this for a Thematic child-theme, and this is tested and working on just that with WordPress 3.1. To replace the default pagination with the new pagination, I need to add the following to my child theme’s function.php file. Here is the code that I added to that file:

if (function_exists('wp_paginate')) {                                                                                                                                                                                                                                                                                                          
    function setup_navs($loc) {                                                                                                                                                                                                                                                                                                                
        echo '<div id="nav-' . $loc . '" class="navigation">';                                                                                                                                                                                                                                                                                 
        if (is_single()) {                                                                                                                                                                                                                                                                                                                     
            echo '<div class="nav-previous">' . thematic_previous_post_link() . '</div>';                                                                                                                                                                                                                                                      
            echo '<div class="nav-next">' . thematic_next_post_link() . '</div>';                                                                                                                                                                                                                                                              
        } elseif ($loc == 'above' && is_category()) {                                                                                                                                                                                                                                                                                          
            wp_paginate();                                                                                                                                                                                                                                                                                                                     
        } else {                                                                                                                                                                                                                                                                                                                               
            wp_paginate();                                                                                                                                                                                                                                                                                                                     
        }                                                                                                                                                                                                                                                                                                                                      
        echo '</div>';                                                                                                                                                                                                                                                                                                                         
    }                                                                                                                                                                                                                                                                                                                                          
    function childtheme_override_nav_above() {                                                                                                                                                                                                                                                                                                 
        setup_navs('above');                                                                                                                                                                                                                                                                                                                   
    }                                                                                                                                                                                                                                                                                                                                          
    function childtheme_override_nav_below() {                                                                                                                                                                                                                                                                                                 
        setup_navs('below');                                                                                                                                                                                                                                                                                                                   
    }                                                                                                                                                                                                                                                                                                                                          
}

Breaking the code down
The first line checks to see if the WP-Paginate plugin is in fact installed and activated. If it is, then it goes ahead and does its magic. Seeing as I wanted to change both my nav_above and nav_below functions, I created a function called setup_navs and passed it a string for either above or below. This function then steps through and checks if the page is a single page. This is a page where you have gone ahead and clicked on a blog post and are reading it. I didn’t want the new pagination in there, so the reader will be present with the Previous and Next posts just like normal. Then I wanted to check and make sure that the location for the pagination block was above and that it was a category page. This is a page of posts. The reason this works is because when you go to your blog posts page, and are using proper permalinks, it is really addressed as /blog/page/1, but it is redirected to /blog/ instead. As soon as you go to the next page of posts, or a page greater than 1, the is_category() check will now be true, therefor displaying the pagination block at the top as well. If the location, or $loc is bottom, then it just does the pagination as normal for the bottom of a page.

To see what I am talking about in use, go ahead and click around on the page block on the bottom. When you get to a page that isn’t the first page, you will be presented with the block at the top as well as at the bottom.

NOTE: I am not a PHP programmer at all, and only know enough to be dangerous, but it isn’t much different than other languages that I am better versed in logically. So if you see something I could do better, please let me know in the comments. Thanks!

Posted in Development | Tagged , | 1 Response
  • Archives


semidetached
semidetached
semidetached
semidetached