23
Dec 12

Where did my Twitter feed go?

As of March 2013, Twitter say that “we will require every request to the API to be authenticated“. In practical terms, this means your old widget on your blog will most likely break. What to do? Well, there will certainly be some new WordPress widgets coming soon. If you’re building something now and don’t want to wait, it’s slightly more difficult but only slightly.

I’m now using the plugin “oAuth Twitter Feed for Developers” and an edited version of the example code to layout tweets by Emma from Red Earth Design. The example code meets Twitters new design guidelines, too, bonus! I’ve tweaked both a little – this post will tell you how and why. I’m not going to go into how to use the plugin, it has easy to follow directions.

First, the changes I wanted to make:

  • Retweets were being truncated eg:
  • Replies were being included. Mine are usually stupid. I wanted them out.
  • I wanted to use it as a shortcode in which the number of tweets was passed as a parameter
  • After I had sorted all of the above, the tweets were showing up at the top of the page instead of where they were supposed to be. This needed to be fixed.

Instead of going through the changes one by one, I’ll tell you which files I edited and why.

File 1: oauth-twitter-feed-for-developers/StormTwitter.class.php in the oAuth Twitter Feed for Developers plugin files

Towards the end of this file is this line:

$result = $connection->get('statuses/user_timeline', array('screen_name' => $screenname, 'count' => 20, 'trim_user' => true));

I’ve edited it to this:

$result = $connection->get('statuses/user_timeline', array('screen_name' => $screenname, 'count' => 100, 'trim_user' => false, 'exclude_replies' => true));

Here’s what I added / changed:

‘exclude_replies’ => true;  this should be pretty obvious. I wanted to exclude replies.

‘trim_user’ => false;  I had to change this to get the screen name (eg mine is tharsheblows) for authors of retweeted statuses

‘count’ => 100; when I had twenty, I only ended up with fourteen non-reply tweets – I guess the count is applied first, then the replies are excluded? Not sure, can’t be bothered to trawl to find out a definitive answer.

Also, for testing purposes, I changed the cache time below (currently set at one hour) which is in this file. The main thing is to remember to change it back before putting it anywhere you could hit your rate limit:

if ($cache['time'] < (time() - 3600)) 

File 2: Example code to layout tweets

edit 31 December 2012: the code below throws out some empty <a></a>’s. I don’t know why and it still works (but looks ugly and doesn’t validate if you’re into that) so it’s going to the bottom of the list to be fixed. I will update again if I do.

Using the code linked to above, the retweets were causing some problems – once I had the whole tweet, the display went a little wonky. Their information is in the retweeted_status object and needed to be found there. For some reason, I couldn’t find the original tweeter’s screen name, so had to access it like a regular tweet. Anyway.

I also added some extra divs to make it eaiser to style. You’ll end up with something like this:

<div class=”twitter_box”>
<div class=”tweet”>THE TWEET</div>
<div class=”twitter_intents”><p>LINKS TO REPLY, RETWEET AND FAVORITE</p></div>
<p class=”timestamp”>TIMESTAMP LINKED TO STATUS</p>
</div>

Looking at that, I’m not sure I like that layout. I might change it. It really should be a list, shouldn’t it.

The tweets showing up at the top of the page thing was due to the function echo-ing the output as it went along instead of returning it. I changed this.

Here is the final code (it goes in functions.php as usual) – oh, and if you use this, you will want to change “tharsheblows” to whatever your Twitter screen name is. I can’t be bothered to make this non-hard coded:


// dealing with Twitter - adapted from https://github.com/stormuk/storm-twitter-for-wordpress/wiki/Example-code-to-layout-tweets
// http://wordpress.org/extend/plugins/oauth-twitter-feed-for-developers/

function twitter_display($tweet, $status, $the_tweet){
/*
Twitter Developer Display Requirements
https://dev.twitter.com/terms/display-requirements

2.b. Tweet Entities within the Tweet text must be properly linked to their appropriate home on Twitter. For example:
i. User_mentions must link to the mentioned user's profile.
ii. Hashtags must link to a twitter.com search with the hashtag as the query.
iii. Links in Tweet text must be displayed using the display_url
field in the URL entities API response, and link to the original t.co url field.
*/

// i. User_mentions must link to the mentioned user's profile.
foreach($status['entities']['user_mentions'] as $key =&gt; $user_mention){
$the_tweet = preg_replace(
'/@'.$user_mention['screen_name'].'/i',
'&lt;a href="http://www.twitter.com/'.$user_mention['screen_name'].'" target="_blank"&gt;@'.$user_mention['screen_name'].'&lt;/a&gt;',
$the_tweet);
}

// ii. Hashtags must link to a twitter.com search with the hashtag as the query.
foreach($status['entities']['hashtags'] as $key =&gt; $hashtag){
$the_tweet = preg_replace(
'/#'.$hashtag['text'].'/i',
'&lt;a href="https://twitter.com/search?q=%23'.$hashtag['text'].'&amp;src=hash" target="_blank"&gt;#'.$hashtag['text'].'&lt;/a&gt;',
$the_tweet);
}

// iii. Links in Tweet text must be displayed using the display_url
//      field in the URL entities API response, and link to the original t.co url field.
foreach($status['entities']['urls'] as $key =&gt; $link){
$the_tweet = preg_replace(
'<code>'.$link['url'].'</code>',
'&lt;a href="'.$link['url'].'" target="_blank"&gt;'.$link['url'].'&lt;/a&gt;',
$the_tweet);
}
return $the_tweet;
}//end twitter_display

//twitter shortcode function
function twitter_shortcode($atts){

extract( shortcode_atts( array(
'number' =&gt; '5',
), $atts ) );

$tweets = getTweets($number);
if(is_array($tweets)){

// to use with intents
echo '&lt;script type="text/javascript" src="//platform.twitter.com/widgets.js"&gt;&lt;/script&gt;';
$tweet_box = '&lt;div&gt;';
foreach($tweets as $tweet){

if($tweet['text']){

if (isset($tweet['retweeted_status'])){
$the_tweet = "RT  @".$tweet['retweeted_status']['user']['screen_name'].": ".$tweet['retweeted_status']['text'];
//I had to add in this next foreach to get the tweeter's link correct - not sure why
foreach($tweet['entities']['user_mentions'] as $key =&gt; $user_mention){
$the_tweet = preg_replace(
'/@'.$user_mention['screen_name'].'/i',
'&lt;a href="http://www.twitter.com/'.$user_mention['screen_name'].'" target="_blank"&gt;@'.$user_mention['screen_name'].'&lt;/a&gt;',
$the_tweet);
}
$the_tweet = twitter_display($tweet, $tweet['retweeted_status'], $the_tweet);

}
else{
$the_tweet = $tweet['text'];
$the_tweet = twitter_display($tweet, $tweet, $the_tweet);

}

$tweet_box .= '&lt;div&gt;'.$the_tweet.'&lt;/div&gt;';

// 3. Tweet Actions
//    Reply, Retweet, and Favorite action icons must always be visible for the user to interact with the Tweet. These actions must be implemented using Web Intents or with the authenticated Twitter API.
//    No other social or 3rd party actions similar to Follow, Reply, Retweet and Favorite may be attached to a Tweet.
// get the sprite or images from twitter's developers resource and update your stylesheet
$tweet_box .= '
&lt;div&gt;
&lt;p&gt;&lt;a href="https://twitter.com/intent/tweet?in_reply_to='.$tweet['id_str'].'"&gt;Reply&lt;/a&gt; |
&lt;a href="https://twitter.com/intent/retweet?tweet_id='.$tweet['id_str'].'"&gt;Retweet&lt;/a&gt; |
&lt;a href="https://twitter.com/intent/favorite?tweet_id='.$tweet['id_str'].'"&gt;Favorite&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;';

// 4. Tweet Timestamp
//    The Tweet timestamp must always be visible and include the time and date. e.g., “3:00 PM - 31 May 12”.
// 5. Tweet Permalink
//    The Tweet timestamp must always be linked to the Tweet permalink.
$tweet_box .= '
&lt;p&gt;
&lt;a href="https://twitter.com/tharsheblows/status/'.$tweet['id_str'].'" target="_blank"&gt;posted at
'.date('g:i A \o\n d M Y',strtotime($tweet['created_at'])).'
&lt;/a&gt;
&lt;/p&gt;';
} else {
$tweet_box .= '
&lt;br /&gt;&lt;br /&gt;
&lt;a href="http://twitter.com/tharsheblows" target="_blank"&gt;Click here to for more tweets from tharsheblows&lt;/a&gt;';
}
}//foreach $tweets as $tweet
}//if is_array($tweets)

$tweet_box .= '&lt;p&gt;I\'m &lt;a href="http://twitter.com/tharsheblows" target="_blank"&gt;tharsheblows&lt;/a&gt; on Twitter.&lt;/p&gt;';

$tweet_box .= "&lt;/div&gt;&lt;!-- tweet_box --&gt;";

return $tweet_box;

}//end twitter_shortcode function

add_shortcode('tweets', 'twitter_shortcode');
//end twitter stuff

&nbsp;

I’m using a minimum of css right now:


/*oauth twitter stuff */
.twitter_box{padding: 10px 0 0 0; border-bottom: 1px #E2E2E2 solid;}
.twitter_intents p{text-align: right; font-size: 80%; margin-bottom: 0; padding-bottom: 0;}
p.timestamp {font-size:80%; text-align: right; padding: 0; margin-bottom: 3px; }

And that’s it!

 

 


27
Nov 12

Do you see what I see? – or – Who sees what on Facebook?

Exactly who sees exactly what on your Facebook pages? It’s easy to check, once you know how and I’ll tell you below, I promise. But first, let me say that even with the best privacy settings, people still might get access to things you’d rather they not see. Mistakes can be made, anything on a screen can be grabbed and presto, you’re known. If something needs to be truly private, don’t put it on Facebook. You’d be wise to not put it on the internet at all. That having been said, Lifehacker claims to keep an Always Up-to-Date Guide to Managing Your Facebook Privacy which is worth reading and checking against your own settings. I have to admit I don’t know how up-t0-date it actually is.

Here’s the way to see your timeline as others do. As always, use at your own risk.

Step 1. Navigate to your timeline by going to Facebook and clicking on your name in the upper left corner.

Step 2. In the upper right hand corner, under your cover photo, click on the weird wheely thing.

Step 3. Choose “View As..” from the dropdown menu.

Step 4. Enter the name of the person you’d like to view your timeline as. It will auto-fill to help you out. You can also click on “public” in the text to view as a random member of the public (ie someone you have not friended on Facebook).

Step 5. You’ll now see how your timeline looks to whoever you’ve chosen or to the public.

Step 6. To get back to viewing your timeline as you, click “Back to Timeline”

And that’s it!

 


26
Nov 12

Tweetbot for Mac won’t open, unexpectedly quits (November 2012)

I love Tweetbot. You should get it. However, the first time I tried to open Tweetbot for Mac, something bad happened. I’m not sure what, but I got a dialogue box asking me… erm.. something. (I am posting this a few weeks after it happened. I should have kept the screengrab.) At any rate, I had two choices and no matter which choice I made, it hung for a minute and then quit.

They do have good support and a faq to walk you through some common problems.  It’s here: Tweetbot Help and you can email support at the bottom of that page. I tried re-downloading but that didn’t work – I think the problem was that in Tweetbot for Mac, I wasn’t getting rid of all of the corrupted settings. Here’s what the nice support person told me to do:

Try these steps to see if this fixes the issue:

1. Quit Tweetbot.
2. Open Finder. Go to your home folder.
3. Type command-shift-G (goto folder)
4. Type Library and press return (Library is a hidden folder hence needing to do this)
5. Then click on the folder ‘Containers’.
6. Find and delete the folder com.tapbots.TweetbotMac
7. Restart Tweetbot.

And that worked. If you try it after it’s been working, you’ll lose all your settings, I think, but I can’t see how that’d be a huge deal.

 

 


12
Nov 12

Keep emotional vampires at bay: How to hide your relationship status in Facebook (November 2012)

So you’ve broken up with someone and, rather than deal with questions from your Facebook friends about the sordid details because they’ve just been notified that your status has changed from “In a relationship” to “Single”, you just want to let it slip away quietly, sobbing into your drink with a few real life friends who aren’t such emotional vampires. What to do?

The answer is to hide your relationship status. You can hide it then change it (or not, if you’re into denial), so only you will see the updated status. Here’s how. Please note: these instructions come without warranty, so use at your own risk.

First step, go to Facebook. Once you’re there, go to your profile by clicking on your name on the left hand side of the page.

Once you’re there, take a minute or ten to browse around, remembering all the good times you’ve had and how you’ll be glad to lose the passive aggressive posts you’ve been leaving on each other’s pages. Then when you’re ready – not before, don’t rush it – click on “Update info” just under the photo at the top of your screen on the right hand side.

In the relationship box on the info edit page which you’re now on, click on the “Edit” in the upper right hand corner of the square labelled “Relationships”.

Now change the visibility to “Only me”. Click on the little people icon in the top right hand corner of the edit box that’s appeared. Please note the image below is before you’ve changed it. You want to end up with the tick by “Only me.”

Now click the save button in the lower right corner of the Relationship edit thing. THIS IS IMPORTANT.

At this point, it makes sense to check and see that the changes have taken. You can view your profile as someone else (instructions to follow in a future post) and make sure that your relationship, has, in fact, vanished from view.

There’s one more thing you can do, if you’d like. You can actually change your relationship status. Simply go through all the above again and change it in the drop down panel in that relationship box. You could do it at the same time as changing the visibility to “Only me” but I’m guessing you really don’t want anyone to know about it, so it might lessen the paranoia a bit to do it in two steps, checking that it’s worked by viewing as someone else in between.

And sorry about your breakup. Hope you feel better soon. xx

 


30
Jun 12

Come out, come out, wherever you are (or how to unhide friends in Facebook)

We live in the middle of a complicated one way system. When people visit, they need one set of directions to get to our house and another to leave again. It helps traffic and makes things safer. The inconvenience is worth it. Facebook is much the same. You can hide someone easily and somewhat intuitively. To unhide them requires a completely different procedure. (The analogy stops here. It’s just bad design; it doesn’t help traffic or make things safer.)

After helpfully showing my husband how to hide friends on Facebook, demonstrating on someone whose updates I enjoy reading, I went to unhide her. That’s where the trouble began. Because of the constant changes to the user interface, the vast majority of instructions were out of date. These instructions here might be correct for today only. I don’t know. I apologise if you’ve come and they’re wrong. There’s not much I can do about it though, so you’ll just have to cope.

So. On 30 June 2012 at 12.30pm GMT+1, here is how to unhide friends and other hidden things.

1 – Go to your news feed. This is the page you get when you’re logged in and at www.facebook.com.

2- On the left hand side, scroll over “News feed”. A little pencil will appear. Click it, then click on “Edit settings”.

3- A box will appear in the middle of the page listing the friends, apps and pages you’ve hidden. To unhide any of them, click on the x to the right of the name.


And that’s it. You’re done. It’s easy if you know how!

 

 


30
Jun 12

No, I don’t care what you had for lunch (or how to hide friends’ statuses in Facebook)

There’s no reason to have to read your friends’ statuses on Facebook. Hide them, hide them away. They won’t know, they’ll still be your friend (perhaps in copyrighted name only) and you’ll be spared, well.. you know what you’ll be spared. It’s hard to exaggerate stupid statuses, it’s simply not possible to be inane enough.

I have shown this to a couple of people, so thought I’d write it down.

1- Scroll over a status from the offender. Look for the downward arrow in the right hand corner of the status.

2- Click on that arrow, then click on “Unsubscribe from..” and poof! They’re gone from your timeline.

There are a few choices. Who know wtf “Most updates” and “Only important” mean. I suppose “Most updates” means you’ll get a random assortment of most updates and “Only important” is a random assortment of fewer updates. Facebook is a bastard when it comes to showing you things – you can never be sure you’re seeing everything. Eg from “What Facebook knows” on Technology Review, writing about a scientist with the Data Science Team at Facebook:

So he messed with how Facebook operated for a quarter of a billion users. Over a seven-week period, the 76 million links that those users shared with each other were logged. Then, on 219 million randomly chosen occasions, Facebook prevented someone from seeing a link shared by a friend. Hiding links this way created a control group so that Bakshy could assess how often people end up promoting the same links because they have similar information sources and interests.

(Link is via @pyker on twitter.)

If you hide someone in error or if they calm down a bit and get more of a real life, I’ve written about out how to unhide friends on Facebook too.


04
Feb 12

Importing products from Magento to WP e-commerce

If you have come to this post looking for an easy, straightforward way to get products from Magento to WordPress e-commerce, this is not for you.  If you don’t mind digging around in databases and unclear directions, then welcome, sorry for the mess, have a seat (just shoo off the cat there – oh, is that a hairball? let me get you a new cushion).

I had a tiny shop in Magento Community 1.4.1.0 (because I was too scared to update it, that’s why) but decided to move it all to WordPress using the WP e-Commerce plugin.  Even though the shop is quite small, I didn’t want to have to put in every product by hand.  So here’s what I did… (nb: as these weren’t large tables and I didn’t know what I was doing, I decided to dump the whole table and edit down to what I needed in Excel.  You might want to do it properly. You might not.  Also, I’m setting up WordPress on another server, so don’t have both of these installed on one.)

  1. In Magento: export the catalog_product_flat_1 table to a csv file
  2. Neaten up a version of csv file so you have the columns: Description, Additional Description, Product Name, Price, SKU, weight, weight unit, stock quantity, is limited quantity
  3. Save another version keeping at least the name and the relative image path intact (this is used for the images, as might be obvious)
  4. In the “import” tab of the plugin, import the file

Easy peasy, lemon squeezy.  Except, of course, where are the images?  They are nowhere.  They are not there.  Bastards.  So here’s where it gets a little dodgy and you’ll have to use these following directions as a guide.

    1. Find your images in Magento and download them.  You can figure out their path using the catalog_product_rule_flat_1 table
    2. In WordPress admin, upload them into the media library.  Have a cup of coffee.
    3. You need to know the post ids of the product posts and the post ids of the image posts (attachment paths are saved as posts when uploaded) – go into wp_posts and export those.

At this point it gets a little fuzzy, so I’m going to stop numbering the steps.  This is all step 5.

The table wp_postmeta is where the linking of the image to the post happens –

post_id is the post id of the product post and meta_value is the post id of the image post.  What you need to do is write a series of insert statements eg:

insert into wp_postmeta (post_id, meta_key, meta_value) VALUES (18,’_thumbnail_id’,29);

I think I put the post ids on my copy of the Magento table with the image paths (edited down to filenames) then used the image filename – the same(ish – enough) in both the Magento table and the WP table – to match up the image post ids to the product post ids.  That might not make a lot of sense but you should be able to look at what you have and figure out how to get everything together.  I then simply wrote my statements in Excel:

=CONCATENATE(A18, “VALUES (“,B18,”,’_thumbnail_id’,”,C18,”);”)
where: A18 = insert into wp_postmeta(  ; B18 = the product post id ; C18 = the corresponding image post id

and slapped them into the table.

Result!

 This only gives one image per product but that’s fine for me.


24
Jan 12

Show me the menu! (or How to put a vertical Superfish menu in WordPress)

edited on 28 December 2012: I have been having the worst trouble getting Superfish to work in WordPress so came back to this. There is one major edit, you need to change the wp_nav_menu parameter ‘theme_location’ to ‘menu’ – I’m now using WordPress 3.5, so this might have to do with one of the recent upgrades. Please note, that you don’t have to use the vertical menu, just take out sf-vertical in the wp_nav_menu menu_class bit.

=====

Doesn’t everyone want a vertical slidey (according to my spellchecker, “slidey” is not a word. Really? Weird.) menu?  No?  Ok then, stop here.

If you do want a slidey (I’m just going to keep using the word, that’ll teach ’em) menu and have figured out that the one you want is J Birch’s excellent jQuery plugin Superfish (it is the one you want btw) and have read Kavin’s excellent tutorial but still need a bit of help and want it vertical, then here you go.

Oh damn, I meant to add in that thing that makes code show up properly.  Hang on.  Ah – the Syntax Highlighter plugin by Alex Gorbatchev should work.  It does!  Excellent.

Here are the steps you want to take, in plain-ish English:

  1. Download the Superfish plugin.
  2. Upload the plugin to your template directory (it needs to be unzipped either before or after upload obvs) – I renamed the folder “Superfish-1.4.8” to “superfish”.
  3. In your wp_nav_menu bit (in header.php or wherever), use ‘menu_class’ => ‘sf-menu sf-vertical’ eg:
    wp_nav_menu( array( ‘sort_column’ => ‘menu_order’, ‘menu_class’ => ‘sf-menu sf-vertical’, ‘theme_location’ => ‘primary-menu’ ) );  — this is what needed to be edited. Change ‘theme_location’ to ‘menu’ to get the right menu. Below is correct sample code.

    wp_nav_menu( array( 'sort_column' => 'menu_order', 'menu_class' => 'sf-menu sf-vertical', 'menu' => 'primary-menu' ) ); 

    I’m using a custom nav menu, ‘primary-menu’ – don’t just copy and paste the above.

  4. Make a file with the following – mine is named jqsf.js (taken from this support thread) – and upload to your superfish (or whatever you’ve named it)/js directory
    $(document).ready(function(){
    $("ul.sf-menu").superfish({
    animation: {height:'show'},   // slide-down effect without fade-in
    delay:     1200               // 1.2 second delay on mouseout
    });
    });

    This initialises Superfish and is where you can change the animation options and various bits and bobs.  It’s good fun to play with these.

  5. In your template’s style.css file, disable / delete any and all styles relating to the navigation lists – you can add them back later when it’s working.  (Setting a width on the ul caused mine to break which is easy enough to fix but took a while to figure out.)
  6. Add the following to your functions.php file – this assumes you’ve named the directories and files the same as I did.  This is, in large part, taken from Kavin’s tutorial mentioned above. He goes through it more thoroughly, so have a look there if you have questions.
    //jQuery Insert From Google - via http://digwp.com/2009/06/use-google-hosted-javascript-libraries-still-the-right-way/
    if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
    function my_jquery_enqueue() {
    $scriptdir=get_bloginfo( 'template_url' );
    wp_deregister_script('jquery');
    wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);// Register the Superfish javascript file
    wp_register_script( 'superfish', $scriptdir.'/superfish/js/superfish.js', false, '1.4.8');// Register the file you made that initialises Superfish
    wp_register_script( 'jqsf', $scriptdir.'/superfish/js/jqsf.js', false);// Now the superfish CSS - you need superfish.css AND superfish-vertical for the vertical menu
    wp_register_style( 'superfish-css', $scriptdir.'/superfish/css/superfish.css', false, '1.4.8');
    wp_register_style( 'superfish-vertical-css', $scriptdir.'/superfish/css/superfish-vertical.css', false);//Put all the scripts and styles in the header where they belong
    wp_enqueue_script('jquery');
    wp_enqueue_script('superfish');
    wp_enqueue_script('jqsf');wp_enqueue_style('superfish-css');
    wp_enqueue_style('superfish-vertical-css');
    }
    

And that’s it.  You should have a working vertical menu.  You’ll need to style it – just edit the superfish.css style.  It’s well annotated, so you shouldn’t have any trouble.  The site I used this on is not yet ready for public consumption, but I will update this post when it is.


11
Jan 12

A place to play with other people’s javascript

I am not a natural coder.  Or at least, I don’t know how to code from scratch.  Well, html and css but those don’t count, do they?  There’s so much to learn, so many rules to remember and computer languages have an annoying habit of only doing what you tell them to do and only if you ask properly.  Luckily, I don’t need to be.  I am a natural adapter-of-things.

So when I needed a content slider for my site, I found one close enough with lovely clear code, nice documentation and started in on Moving Boxes.  Googling around for how to change various features, I came across this jsfiddle.  I’d never seen the site before – basically, you upload some javascript, css and html then fiddle with it on the fly.  You can fiddle with other people’s, fiddle with your own, fiddle away to your heart’s content.  Genius idea.  My fork is here – it’ll be slightly prettier on my site, I will wait to put in custom arrows, can’t be bothered now.

What I did is pretty obvious.  My goal is a slider that goes across the browser window with translucent non-current panels.  The two small problems I had that I should mention are:

  1. the current panel was not centered on the page
  2. the slider didn’t re-center after the window is resized.

For the first, adding :

#slider{margin-left: -6px !important;}

worked.  Not sure about the -6px.  Might be more on that as I actually get it all live.  It might all fall apart, in which case I’ll edit this.  (And I’ve got to do that thing that makes the code look nice – I have how to do it bookmarked somewhere.)

For the second, I had to force a page reload.  Not ideal but not disastrous.  This is how I did it – copying this (gotta love Stack Overflow):

// resizeStuff() via http://stackoverflow.com/questions/667426/javascript-resize-event-firing-multiple-times-while-dragging-the-resize-handle
function resizeStuff() {
location.reload();}
var TO = false;
$(window).resize(function(){
if(TO !== false)
clearTimeout(TO);
TO = setTimeout(resizeStuff, 200); //200 is time in milliseconds
});

All good stuff.  If you’d like a go, you can play with mine.  (It’s more fun on their site because the layout is better…)


05
Jan 12

OmniFocus clippings from Firefox

Irrationally annoyed that this was an issue.  I use OmniFocus – a brilliant program that works for me when I am working or have projects which require me to remember to do things.  Pricey but has been worth it thus far.  One of the best features is being able to clip whatever I’m looking at (in, eg, Mail) and send it to the program instead of vaguely thinking that I should remember it.  Of course, this doesn’t always work – I have just had the thought “&#*&, I owe C an email from November” – I have to remember to clip in the first place.  And it’s easy peasy – I just hit ⌘. (cmd and period at the same time – I set this particular shortcut up in the preferences) – which autopopulates the Quick Entry panel.

It doesn’t work in Firefox.  Not sure how I haven’t noticed until now but there you go.  It is not possible (that I’ve found) to set up a clipping keyboard shortcut in Firefox, but you can use a bookmarked url to do it.  So if you’re on a page and want to send it to OmniFocus, just click on the bookmark – mine’s in my bookmarks toolbar – and Bob’s your uncle (making you my cousin, hi!).  This is the OmniFocus clipping bookmark for FirefoxHere is where I found it.  Oh, it looks like it’s only for Mac, but that’s ok, OmniFocus is only for Mac.  Not sure if it works in other browsers – if you’re using Safari, you can use a shortcut, so no need. If you’re using IE, don’tJust don’t. Please. I am not sure why you would be reading this if you are on Windows – maybe it’s my stellar writing.

Or maybe it’s because you’d like to know which coffee cup I’m using today. It is the one my eldest got me for Mother’s Day a few years back.  I am holding to my resolution to use my coffee cups more equally and share the burden / joy – whichever way they feel, it just seems like a more equitable way of doing things.