Tag: WordPress

WordPress

WordPress support fail: WP-Stats and JetPack

Apparently I am not the only person running in to the message “Your WordPress.com account, [account name] is not authorized to view the stats of this blog”.

There is a work-around posted at a couple places, but this did not work for me.

There seems to be no official word from WP yet, at least not that I can find. There are a lot of recommendations to “just remove WP-Stats and install JetPack” – however, that does not seem to work for me either. Instead I get “You do not have sufficient permissions to access this page.”

If WP had planned to replace WP-Stats with JetPack, shouldn’t they have let everyone know? And if they had planned to modify WP-Stats, shouldn’t they have first tested those changes to make sure it didn’t break existing installations? And if they are having unexpected issues shouldn’t they be A) working diligently to correct them and B) assigning someone to respond in the support forums?

Home

I need a break …

I don’t usually talk much about my day-to-day life here, but that doesn’t mean I never do. This is one of those times. If you just want more tech talk check out the end of this post. The rest is all me whinging anyway. ;)

I need a break. A real break. I mean, I am technically on a break right now from school but it doesn’t really feel that way. I finished out my first year of school a couple weeks ago (26 years after graduating from high school, no less) and I thought “wow, I have an entire month that I can use to rest, catch up on some personal stuff, maybe clean out the garage ….” Unfortunately it is not turning out that way.

Instead I am writing this at 5:54 in the morning as this has been the first chance I have had to pay any attention at all to the blog. So what has been keeping me busy? Well, first, there is work. I did use a little of what would have been study time to modify the script I use to generate weekly work reports from Trac so that it now shows the amount of change for hours on each ticket (which is set in a “custom” field). And holy cow, I put in 58.5 hours last week. At least 8 of that doesn’t really count, though. I messed my back up and spent some time trying to work while under the influence of cyclobenzaprine which means that I wrote, scrapped and rewrote one class method at least 6 times before finally giving up. (Programming and drugs that make you stupid don’t mix!)

Aside from work I have been putting some time into a project for a non-profit that is kicking off on May 12th. I’m not allowed to say too much about it ahead of launch, but I can say that it is about raising awareness about ME/CFS and how badly it has been mismanaged and patients marginalized for the past 25 years.

Finally, I upgraded the WordPress plugin Shorten2Ping which I will continue to pimp as long as it keeps working so well. Of course I like my post tweets to have some hashtag love, so I do a little editing of the shorten2ping.php.

Here is a diff:

--- shorten2ping/shorten2ping.php       2010-04-12 10:22:34.000000000 -0700
+++ shorten2ping.mine/shorten2ping.php  2010-04-19 06:47:58.000000000 -0700
@@ -119,6 +119,15 @@
     $post_url = get_permalink($post_id);
     $post_title = strip_tags($post->post_title);

+               // add some tag bits here
+               $tags = wp_get_post_tags($post_id);
+               $my_tag_list = '';
+               if (is_array($tags)) {
+                       foreach ($tags as $j=>$tag) {
+                               $my_tag_list .= '#'.$tag->slug.' ';
+                       }
+               }
+
     $short_url_exists = get_post_meta($post_id, 'short_url', true);

              if (empty($short_url_exists)) {
@@ -205,9 +214,19 @@

             //get message from settings and process title and link
             $message = $s2p_options['message'];
+                                               $message_bare_char_count = strlen(str_replace(array('[title]','[link]','[tags]'), '', $message));
+                                               $title_count = strlen($post_title);
+                                               $link_count = strlen($short_url);
+                                               $tag_count = strlen($my_tag_list);
+                                               $over = $message_bare_count + $title_count + $link_count + $tag_count - 140;
+                                               if ($over > 0 && $over <= $post_title/2) {
+                                                       // if the overage is more than half the post title then skip it and let tags get truncated
+                                                       $post_title = substr($post_title, 0, $title_count - $over);
+                                               }
             $message = str_replace('[title]', $post_title, $message);
                              $message = str_replace('[link]', $short_url, $message);
-
+                                               $message = str_replace('[tags]', $my_tag_list, $message);
+
             if ($s2p_options['ping_service'] == 'pingfm'){

                send_pingfm($pingfm_user_key,$post_id,$message);

(You can download the diff as well.)

Ooops! Draft Saved at 6:23:27 am. And it is now 8:10, and this would still be a draft if I wasn’t closing browser tabs.

WordPress

WordPress 2.7 SVN headaches

When upgrading my blog to WordPress 2.7 using my favorite method (svn sw) I ran into the same problem plenty others were seeing from standard ftp upgrades. Namely: Fatal error: Call to undefined function: wp_remote_request() in /... path to blog .../blog/wp-includes/update.php on line 58. (See more about it here: http://wordpress.org/support/topic/224102?replies=36) I tried all sorts of craziness, including deleting everything but my uploads, my images and my custom theme, and then doing an svn up. Still no good. So finally, I got desparate. I did a fresh svn checkout of the 2.7 tag, copied my config, themes, uploads, images and plugins from the old version over, and all was good.

You can imagine, I am sure, that I was not really happy about the thought of going through the whole ordeal again for my wife’s blog. As fate would have it, svn sw worked like a charm on hers. Go figure.

WordPress

Time for a new look

After looking at the same design since January of 2007, I felt it was time for a new look. So, a little tweaking to the theme Hope by Fatma Hassan and here it is, Evardsson 2.0. I love the look of the theme as it is, but I have to have my reindeer or I feel like it isn’t my site.

I like having a fluid layout, and this one seems to work reliably well while still looking good. I now return you to your regularly scheduled browsing …

WordPress

WordPress as a psuedo-CMS

I just finished moving my wife’s art site completely to WordPress. She recently asked if I could add a blog to her site, and since I knew that she also wanted the ability to modify someof her content from time to time, I decided to completely move her site to WordPress. It is not as full-featured as a full Content Management System (CMS), but it is also much more light-weight and supports all the things she wants to do (with a few plugins, of course).

The plugins I chose to meet her needs are:

  • Akismet (of course): Spam Filter (now a default with WP installs)
  • Flexible Upload: Picture Uploader which auto-creates thumbnails and supports Light-box like plugins.
  • Google XML Sitemaps: if you don’t know what that is check out Google’s Web Master tools.
  • WP-PostViews Plus: Not the most straight-forward plugin, but she did want some counter tracking.
  • Lightbox 2: Provides Lightbox functionality for WordPress. And with the Flexible Upload plugin she doesn’t have to hand code any of it or write any image links with rel tags.

Technorati Tags:

Subversion

WordPress Update headaches – resolved???

I had a few headaches updating to WordPress 2.3. Not surprising since the category related tables were removed to make room for native tagging, and I have been relying on the Category Tagging plug-in. Ah well, after some hand sql work I was able to populate the tags to match the categories.

Now it can only get better, right? I have moved to using subversion to pull the latest stable release, so that takes a big chunk of time out of the equation, and now my tagging will happen at the time of posting, rather than being a pseudo-tag solution pulled from post categories. Or will it? I wonder if the tags tab in ScribeFire will do the trick?

We shall see.

The 3.0 version of the Google Sitemap generator seems to not be working, however, but I may have b0rked something there myself, and I will try again later.

Oh, and those sql statements?

If I remember correctly (I didn’t keep notes like I should have):

INSERT INTO wp_term_taxonomy (term_id, taxonomy, count) SELECT term_id, ‘post_tag’, count FROM wp_term_taxonomy WHERE taxonomy=’category’;

INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) SELECT rel.object_id, tax.term_taxonomy_id FROM wp_term_relationships AS rel, wp_term_taxonomy AS tax, wp_term_taxonomy AS ttx WHERE rel.term_taxonomy_id=ttx.term_taxonomy_id AND ttx.term_id = tax.term_id AND tax.taxonomy=’post_tag’;

I could have brought the descriptions across from the categories, too, but I didn’t think about it until just now.

Edit: I found the issue with the site-map generator. It required a tweak to the memory limits in my php.ini :/

Read More