Updates from November, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Vanberge 10:07 am on November 18, 2011 Permalink | Reply
    Tags: , lyrics,   

    “Better Come Much Bigger Than This” 

    “Oh, ok… Thanks for the email. Let me sign right up”

    Newp!

     
    • FLO 4:02 pm on November 18, 2011 Permalink

      What a pathetic email.

    • Burgetta 9:20 pm on December 28, 2011 Permalink

      “I’d like to come back”

    • Vanberge 1:56 pm on December 29, 2011 Permalink

      FYI netflix has sent me 2 more of these emails.

  • Vanberge 11:19 am on November 15, 2011 Permalink | Reply
    Tags: awesome, php,   

    PHP Site Tweaks 

    Recently I’ve made a couple of subtle tweaks to my theme to fix minor issues that have bugged me for some time.

    1: The Completion of Twitter De-integration
    First on my list was to button up the exclusion of my Twitter category.  For some time, I’ve been using the Twitter Tools plugin to create weekly digest posts of all my Twitter activity.  I appreciate this functionality quite a lot.  I like being able to search a subject and find my WordPress blog entries AND tweets on the subject.  However, I didn’t like spamming readers via RSS or pushing down the real content of my site with what I’d consider “archival” content.  Ultimately I wanted to exclude the Twitter category from every possible area except if you actually click on the Twitter header link to get to that category.

    Using a couple custom tweaks to my theme’s functions.php file, I was able to mostly implement this back in 2010.  The Twitter category primarily only shows up if you go the category page.  But, recently I also happened to notice that the single posts have links to the previous post and next post; and unfortunately this loop didn’t read the standard WordPress query.  The previous/next post links embrace their own functions completely.  As such, these were showing the posts from my Twitter category.  🙁

    With a little research on the functions specific to post navigation, I found it was pretty easy to ditch the Twitter category here as well.

    Original code for the previous/next links:
    <?php previous_post_link( '%link', '<span>'
    . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?>

    Updated code for the previous/next links to exclude my Twitter category:
    <?php previous_post_link( '%link', '<span>'
    . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title', FALSE, '28'  ); ?>

    The FALSE indicates that the next/previous don’t have to be from the same category, and then the ’28’ is the last variable which is “excluded_categories”.

    So, the Twitter category now will really only show up if you’re searching or if you’re clicking on the Twitter link in the header nav bar.  I love WordPress.

    2: Double Sentence Spacing
    Next up is the effect of my typing style that I cannot break.  When I’m done typing a sentence, I hit the spacebar twice.  This is certainly a debated point as to whether single or double sentence spacing is correct – especially on the internet.  It creates “rivers” of white space at times that can be a distraction, and can be a waste of page space and characters in database tables.  Even worse, my theme would display a quirky structure at times by moving that 2nd space onto the leading edge of a new line, hence starting the new line one space indented from the rest of my site.  It looked terrible.

    Example of bad spacing, note the clear indent on the 2nd line:
    Note the clear space indenting the 2nd line

    In my opinion, it’s better to single space.  I just can’t seem to do it.  I can’t manage to break that habit.  So, I scoured the internet for ways to make WordPress do it for me.  It didn’t take long for me to find a simple and easy function to handle this.

    function remove_spaces($the_content) {
    return preg_replace( '/[\p{Z}\s]{2,}/u', ' ', $the_content );
    }
    add_filter('the_content', 'remove_spaces');

    I added that code to my theme’s custom function.php file (the same place where I exclude the Twitter category), and all is well!  Wordpress adjusts my double spaced content into single space and displays it beautifully:

    I love WordPress

     
    • vanlandw 1:29 pm on November 16, 2011 Permalink

      looks great vanberge gg on the Twitter stuff you did it perfectly

    • Jeffrey 8:38 am on November 17, 2011 Permalink

      Thank for your twitter de-integration. And, where on earth did you pick up the double sentence space habit? People actually taught you to do that?

    • Jeffrey 8:43 am on November 17, 2011 Permalink

      By the way, you might want to move your double space filter to the save hook, so you are only doing it when the post is saved, instead of every single instance of the_content. Running that many regular expressions is just asking for trouble, performancewise

    • chouse 10:52 am on November 17, 2011 Permalink

      I learned it when I learned how to type on a typewriter. I quickly forgot it though when I moved to PC typing. Single-space FTW.

  • Vanberge 11:26 am on November 7, 2011 Permalink | Reply  

    The Death of Google Reader 

    A few weeks ago, Google announced some big changes to Google Reader.

    The overall strategy by Google to unify its services drew them to the conclusion that they have to force all Google Reader users to begin using Google+ to fulfill the social aspect of Reader.  Friending, following others, and commenting on shared items within Reader would now be discontinued…

    I don’t think this really hit me until it actually happened.

    As I was greeted with the “Welcome to the new Reader” message last week, I finally got a feel for how big this change truly was.  Usually, my first click is to “People you follow” when I log into Google Reader.  Well, that’s now gone.  There’s no longer a simple way to see shared items, to comment on them, or to get a quick overview of what items my friends are reading.  Instead, I’m stuck muddling through Google+ posts trying to find a way to make this social world work again.

    I just feel completely lost in the new Reader.  The extra clicks/page views necessary to get the same functionality in Google+ make it difficult and inefficient.  I don’t like the look of the new Reader.  I don’t like having to go back and forth between 2 different sites to see and comment on shared items.  It’s just a sad state of affairs.  I’m sick of companies trying to force customers/users into a model that they obviously don’t support.

    As of yet, there isn’t a very solid alternative to Google Reader.  I’ve researched and tested a few, but the social aspect is a key that is missing in nearly every contender.  I’m looking forward to trying out hivemined, which seems to be getting alot of e-buzz as a true Google Reader alternative.  Until then, I’m struggling to adapt to a new way of doing this.  A significant portion of my friends and my own internet activity was spent inside Google Reader, and at this point we’re all trying to re-group as the table cloth was pulled out from under us.

     
    • Jeffrey 5:06 pm on November 7, 2011 Permalink

      As with all things google these days, its a step backwards.

    • chouse 6:20 pm on November 7, 2011 Permalink

      If anything, it will get commenting back on to the blogs themselves, or folks just need to specifically share reader items in G+ and the audience has to encircle them. PITA, more work, etc. But G+ usage will increase so that place might be a little more interesting. We need vanlandw to get on board though.

    • Vanberge 11:04 am on November 10, 2011 Permalink

      I am typically a Google fanboy, but yeah I am really feeling lost without Google Reader as it was. I’m banking on Hivemined being a drop in replacement.

      I can’t seem to get all in with Google+ yet, but I’m making an effort.

    • vanlandw 1:33 pm on November 16, 2011 Permalink

      chouse nailed it nice to see people commenting on blogs again

      still trying to find the best way to share links hopefully I’ll figure it out soon

      hivemined looks good eating for that to open then I’ll prob champion it

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel