Posts tagged ‘Blackberry’

Using Wordpress with WPTouch and WP-HashCash

If you use Wordpress you should definitely install the WPTouch plugin and give your readers a great experience for their mobile device (iPhone, Blackberry, Android, etc.) Additionally, I am fond of the WP-Hashcash anti-spam plugin since it works well and does not require posters to read one of those CAPTHA images.

Unfortunately, out of the box, things do not play well together. The symptom is that comments that come through the WPTouch experience, will be flagged by WP-Hashcash as potential spam because it did not get a value generated key. There are a lot of background that is not important. There are two ways to make things play well. One has minimal changes but does not support AJAX comments. The other is more invasive but retains all the functions of both plugins.

 

Minimalist Solution:

WP_Hashcash requires two things in the theme – some JavaScript to be inserted in the header and a hidden field inserted into the comment form. The plugin uses hooks for each of these so the theme only needs to conform to the following.

WP Hashcash relies on the presence of two hooks in your theme, wp_head and comment_form. If your theme doesn’t include these actions, you will need to add them immediately before the </head> and </form> tags respectively.

source: Elliot Back, author of WP-Hashcash

Things are a bit spread out. If you have already enabled your normal theme for WP-Hashcash, then the wp_head() change is already done since WPTouch adds to your normal header. However, WPTouch provides its own comments page so you will need to edit that. It’s location is:

  /public_html/blog/wp-content/plugins/wptouch/themes/default/comments.php 

Just add the following before the closing </form> tag:

  <?php do_action('comment_form', $post->ID); ?> 

There is one more thing. In the plugin settings page for WPTouch, you will need to turn off AJAX comments.

 

Full Function Solution:

You make the changes described above but you do not need to turn off AJAX comments. You then need to make some code changes to both WPTouch and WP-Hashcash.

Back in the same directory as WPTouch’s "comments.php" there is the partner file called "comments-ajax.php". Edit this file in two places – adding one line (seen below in bold green) and appending to another (seen below in bold blue).

  $comment_author = trim($_GET['author']); 
  $comment_author_email = trim($_GET['email']);  
  $comment_author_url = trim($_GET['url']); 
  $comment_content = trim($_GET['comment']); 
  $wphc_value = trim($_GET['wphc_value']); 
  ... 
  $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID', 'wphc_value'); 

Now edit the "wp-hashcash.php" file which should be in the root of your plugins directory. Near the very bottom of the file, there is a comment, "Check the wphc values against the last five keys". There are actually two instances of this comment and you will make changes for the one in the "wphc_check_hidden_tag()" function. The code only looks for the "wphc_value" field in the _POSTS data. If you are using WPTouch AJAX comments, the changes above have added this field to the compacted "comment data". Now you need to check both locations as follows:</P?

  $hash_value = $_POST["wphc_value"]; 
  if (!$hash_value) 
    $hash_value = $comment['wphc_value']; 
  $spam = !in_array($hash_value, $options['key']); 
   
  if($options['logging'] && $spam) 
    $comment['comment_content'] .= "\n\n[WORDPRESS HASHCASH] The poster sent us '".($hash_value)."' which is not a hashcash value."; 

Mobile-fy the web

IMG_0161

I’ve become one of those "smoker bigots" – you know the kind … they quit smoking and *THEN* start preaching all the bad things that smoking does. My conversion was not that I was a smoker; it was the "mobile browser".

I am blogger and user of the web but until about 6 months ago I was mostly on my computer. I now read blogs, feeds, news, and more using my iPod and/or my Blackberry. I use if for Facebook, the weather, Twitter (a little), and most of my personal email. I realized my blog was not as friendly to these mobile devices as it could / should / and eventually would be.

So, I set about to add support for mobile devices and mobile users. It was easy for my blog since it uses Wordpress and there is the WPTouch plug-in that makes it nearly automatic. It added support for the devcies I use most often and I even added support for the Androids of the world. (If you have a mobile device and it is not working with my blog, add a comment and I’ll do my best).

So, now I grumble whenever I hit a website that *does not* have special support for mobile devices. I realize I am being zealous but that has not stopped me from small internal unseen spurts of frustration. Oh well. I guess I could seek counseling.

theSalmonFarm blog adds iPhone, Android, and Blackberry support

Just a quit note to those readers with mobile devices. I’ve added the WPtouch plugin for iPhone support. Ive tested with an iPod Touch and a Blackberry Bold.

If you have issues with the mobile experience, please let me know.

What is the best smartphone for work ?

Is the iPhone, Blackberry, or [an]Driod better for work ? The answer is easy. "What every your corporate policies supports."

blackberry-vs-iphone[1] You were expecting a discussion on features? Sorry. Features are irrelevant if you can’t get to them. So, unless you company puts in the effort to support your favorite device, you are going to have a much better experience with what ever device they DO support. Here is an example.

I work for a company that has had the Blackberry Enterprise Server connected up to our mail files and calendaring and corporate directory for years. I grab my Blackberry and go. I get my email. I have my calendar always up to date. I have my contacts and I can search the corporate directory. I even get access to company internal web sites. It all just works. The only effort on my part is the password protection screen on the device.

Compare that with my iPhone experience. I have a similar strong password requirement on the iPhone but the on-screen keyboard means a lot of mode changing to get to the numbers and special characters. Next, I have to setup a VPN on the device with it’s own ID and password. (Fortunately this only needs to be messed with every 90 days). Next, there is the ActiveSync setup with yet another ID and password (again, good for 90 days). There is also the issue of profiles and certificates. I should add that the VPN is non-persistent. You have to turn it on anytime the device sits idle for more 30 minutes (or something like that) in order to get a connection to the corporate servers so "push" isn’t really "push".

Yes, I like the iPhone better than the Blackberry because of the screen and the apps and lots of other stuff. Ask me to use the iPhone for work and give up my Blackberry ?! Not likely.

image: geardiary.com

Google Voice app for Blackberry kills GVDialer

Google Voice is "one number to rule them all". I’ve known all along that Google would create "clients" for the Blackberry and the iPhone eventually. In the mean time, I wanted to do everything I could to make GV as usable as possible. I tried the free version of GV Mobile for the iPhone (iPod Touch) and liked it so much, I paid for the full version, knowing that at some point, Google would give me something for free. Still, at $2.99, the iPhone app was worth it.

The Blackberry has the GV Dialer app. I gave the 30 day trial a test run and was so underwhelmed, there was no way I would pay $7.99 for the real app. Thankfully, Google saved me.

Google Voice for Blackberry is free and quite usable. It does what it needs to; doesn’t try to do too much, and doesn’t get all wrapped around the axle when it comes to integrating into the Blackberry. My one complaint from initial testing is that it needs to do more caching and reduce the amount of effort and bandwidth it puts into my data connection when what I really want is to place a phone call. It needs a small amount of data to signal the servers for the call but otherwise, it should be less heavy in this department.

One complaint I’ve read but don’t echo is; "you can’t simply open your BlackBerry phonebook and dial via Google Voice". Personally, it was a pain to get my address book sync’d but I had to do that for the iPhone so now it’s a non issue. Besides, Google Voice remembers most recent dialed numbers so more often than not, I am dialing from my history and not from my address book.

So, for now it’s Google’s own app for the Blackberry and GV Mobile for the iPhone. I look forward to comparing Google’s own iPhone app when they launch it.