header

Top 10 Posts/Views

Thanks to a tip from podz, I installed Top 10 Posts/Views plugin. This gave me the functionality of showing view count for each post, and showing the 10 most viewed posts. I made a few changes to make it work right on my site.

First I followed the documentation, which was just fine, no problems there. Installing was easy and quick. Only changes I made were:

  1. In show_pop_posts: before the showeach block add <ul> and after it add </ul>
  2. In show_post_count: changed echo $before.$postcount.$after; to echo $before.(($postcount)-1).$after; (I was getting off-by-one)
  3. In show_pop_posts: changed $post_title = substr($post->post_title, 0, 20); to $post_title = $post->post_title; (I thought the first 20 chars of a post was rather ugly)

I also noticed an error when displaying with the default post numbers instead of permalinks, but I don’t use it, so I’m worried.

Other than that, it works exactly how I wanted. The number of queries can probably be reduced from 2*num posts shown + 1 for top10. I won’t worry about that because it doesn’t really slow me down.

Edit 6/24:
Added functionality so that if the user has already seen a post, it will only be logged (and incremented) the first time. I did this with the $_SESSION superglobal, using the following code. In add_count:

        $tmp = explode("&", $_SESSION["p"]);
        if(!in_array($p_number, $tmp)){
.
.
.
                $_SESSION["p"] .= “$p_number&”;
        }

IMO this is better than only logging if is_single() is set… i.e. if the user is only viewing that post, but it can be used in conjunction with that method for best results.

Comments (13)

Of Spokane, I am not a fan.

Well, Pat and I traveled back to Spokane this past Memorial Day weekend.

It was a rough weekend for me, I’ve never had allergies as bad as I did on that trip. But nevertheless, we acheived a lot during the weekend, including paint 4 rooms and 2 doors, lay cement, move lots of branches, etc.

We have some pictures of the first house visit which was shortly after it was purchased, and this past visit, the fourth house visit. If you look closely enough, you might be able to see some changes :P

Comments (3)

Paypal’s Fees

I had some interesting amounts withheld from my account due to transfers this last week.

I received a payment of $4.99 and they deducted $0.44 which is 8.8%. Then I received a payment of $42.00 and they deducted $1.52 which is 3.6%. That’s quite a difference, so it sparked my interest.

I stumbled upon Gallery’s donation page which claimed that it was $0.30 + 2.2%, but that’s not correct… my first transaction was $0.30 +2.8% and my second transaction was $0.30 +2.9%. After searching through Paypal’s FAQ, I finally found their fee chart: 1.9% + $0.30 USD to 2.9% + $0.30 USD. The percentage is actually based on the Merchant’s Monthly Received Payment.

Since I have $0-$3,000 monthly,

Your account is enabled for Standard Rate. Based on your sales volume, you are currently being charged 2.9%.

In order for Gallery’s statement to be accurate, they must be receiving $10,000.01 USD-$100,000.00 USD each month. I find that quite hard to believe to be honest.

Paypal has quite a few problems, but there just aren’t very many good alternatives out there currently. And who wants to send money orders or checks for all online non-CC-accepting orders?

Comments (2)

Wordpress and Gallery2 Plugin

I installed the Wordpress and Gallery2 plugin.

I’m still trying to work out some of the kinks

Comments (2)

To Spokane We Will Go

Well, my fiancee’s parents bought a house in Spokane, Washington. It’s a real fixer-upper as far as I understand it. So we’re going leaving tonight after work to work on it. It’s a 6 hour drive with no traffic, so approximately 7 hours for us.

We will probably stop in The Dalles, OR for some food. As previously posted, Google will be coming to The Dalles sometime soon, so we will have to check out the area. We also might look into some housing there.

The best part is that Monday is Memorial Day, so it’s a paid holiday for me!

Comments (6)


blogtimes