Category Archives: Blogging

testing & expansion in code blocks

WordPress insists on changing certain characters into their & equivilants (when those characters appear within a code block) each time the article is udpated.  This wouldn’t be a problem except that the ampersand is one of the characters which gets this expansion.

If the article is always saved via the Text side this bug is circumnavigated.  This only appears to happen when clicking the Update button while viewing the Visual side in the editor.

This is how the problem increases with each subsequent save.

## 
Watch the ampersand go crazy:   "" >& 
""
&c… 
## 
## 
function func_error() {
    printf '%s\n' "[$( date +'%Y-%m-%d_%H:%M:%S%z' )]: $@" >&2
} 

if ! do_something; then
    err "Unable to do_something"
    exit "${error_did_nothing}"
fi 
## 

Just a fucking mess.

When I see that I’ve made this mistake (of click the Update button in an article with a code block while viewing the Visual side of the editor), if it’s one or two I just edit them directly and hit the update button from the Text side. If it’s a lot (I’m looking at you, “) then I pull the entire article from the Text side and paste that into VScode and make any find-and-replaces necessary.

The order is important here. First I change all amp;amp; into just amp;. Then I change all & into &. And finally I can fix each of the other expansions as required (usually <, >, and ").

Maybe this is fixed in a newer version? Could be. Have fun.

Share

The Best Place to Find e coli?

I’ve been trying to persuade my brother into starting a food blog, and as part of that I’ve been peeking into the world of available domains.  If you have ever tried to find a domain for your special desire or skill (ninjacrochet.com?), you may have encountered a Web squatter.

Basically a Web squatter is some asshole entrepreneur who buys a bunch of potentially interesting domain names, sits on them, tries to make a few dollars from some useless search engine, and waits on the Prince Charming who wants to buy that domain for a bazillion bucks.

Real fucking progressive.

At any rate, this one made me laugh for a good while and here I share it with you.

The Best Place to Find e coli?
The Best Place to Find e coli?

Now, as you can see they have thoughtfully included many of the e coli related searches you might expect to find on an e coli portal: the Mickey Mouse Clubhouse and plethora of information about lies.  I must admit Lie Maine sounds intriguing.

Now you certainly know the best place to find e coli.  Clearly they are full of shit.

Share

Spamaroony

Sometimes I just love love love the craziness of the spam I get to my blogs.  I have decided to give vent to some of that otherwise lost content here.

Enjoy!

I intended to draft you this very little word to thank you very much once again relating to the stunning things you’ve shared above. It is strangely generous of people like you to give publicly precisely what most people would have distributed as an e-book to make some bucks on their own, notably seeing that you could possibly have tried it if you ever desired. These secrets likewise acted as a fantastic way to be sure that some people have a similar keenness similar to my very own to learn a little more with respect to this issue. I believe there are numerous more pleasurable times up front for many who read carefully your site.

I beloved as much as you will obtain performed proper here. The sketch is attractive, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you wish be turning in the following. in poor health definitely come more earlier again since precisely the similar just about a lot ceaselessly inside case you shield this increase.

In case you watch often the pitch entirely after plate just like you oftentimes wanted to swing action, you recently told often the umpire you imagined the pitch has been worth swinging with (at least it was worth investigating! ).

Valuable thoughts and advices. I read your topic with great interest.

I am really thankful to the owner of this site who has shared this wonderful post at at this place….

Sparkly dark-colored elements are typically enameled far too!

With that said, exactly what golfing clothes does indeed 1 need to participate in that video game?

Hi there, yup this paragraph is truly nice and I have learned lot of things from it on the topic of blogging. thanks.

Better still, all with no really writing and also exploring just about every ,Burberry Women! Obviously you can locate every information about the online world through searching each and every niche individually. It is terrific as soon as the work have been accomplished?

every man who like yoga are fond of our lululemon

basically we probably won’t persuade you to actually utilize material all over your enamel, possessing various teeth get flossing roughly along with all of the time may help save your life.according to Robert Idsinga, an ancient external bound coach ranging from japanese Columbia, nova scotia, Who has been doing grand alpinism furthermore ice-cubes rock climbing, exactly the stability produces dental get flossing too sore during tender nicotine gums it will come nearly in easy into the forests, wild rivers. pretty an cargo area is almost certainly not up to the task handy and that is required more protection from the ice cold.

Surely that’s enough for now.  I’ll add more as I find the gems.

Share

A Little Light Boxing

There are several methods for implementing the lightbox effect in a WordPress blog.  I was using the Lightbox 2 plugin since I started my blog a couple years back.  Or maybe I started with Lightbox and upgraded.  I really don’t remember; too much time.

I recently split my technology posts into this current blog and split them off from my personal blog.  I basically just copied everything over from the old blog to the new blog.  There were some oddities which needed ironing, but essentially everything worked fine.

I realized recently that my lightbox effect on this new blog was not functioning.  (My other blog includes my photography and so I use the effect a lot; this blog rarely includes images I create and thus it went easily unnoticed.)

In my effort to fix this issue I discovered a couple other plugins (Lightbox 3 and Lightbox Plus) which offer similar functionality.  Unfortunately I could get none of these three plugins to function.  I disabled all other plugins and tested three different themes (including the default theme), and none of this changed anything.

I suppose, in perfect 20/20 hindsight, I should have seen the obvious clue when I clicked on the image tring to get it to display.  When the image was clicked the browser was directed to a different page complete with all the blog dressing all around the image.  Usually if I click on an image (and by usually I mean on my original blog which was not having this problem) with the light boxing plugin disabled, I am directed to an image (no surrounding page).

Feeling closer to the solution?

Yeah, in the image properties dialog and on the Edit Image tab you will find a “Link to Image” button.  That is the URL you really want to use.  Click!

Image Properties — Edit Image
Image Properties — Edit Image

That’s it.  No coding.  No fancy work-arounds.  Just one click of a button.  (See this article for additional information.)

In the end I switched to Lightbox Plus for no particular reason, in case you were wondering.  (Yes, all three are working.)

Also, in my other blog (the blog where light boxing was always working) both of those buttons provide the same URL so there is clearly something else happening here.  I need to figure out how to make it work by default in a newly uploaded image because I shouldn’t have to make this change every time I upload an image.

I hope that saves you some of the hours it took me to discover the answer.

Share

Migrating WordPress in Bits and Pieces (or Not)

When I created my first blog, The Ink Wells, I envisioned it as a place for me to store things that either I wanted to remember (a sort of digital Internet-powered sticky-note) or which I wanted to easily access to show others (gallery displays for my photography and poetry for example).  Over time certain aspects of that blog became, I shudder at the thought, popular.

In an effort to bring those popular posts to the public without foisting my poetry in front of their unsuspecting brains I finally chose to break my original blog into a set of new blogs.  I wanted to break these new blogs off essentially based on categories within The Ink Wells.

First let’s talk about how to make all this new blog migration happen, then we can talk a little about dealing with the categories.

I host my own blog on my own (Windows) server.  I was able to merely copy all my blog content (like uploaded images and plugins) to the new installation location.  Then it was merely a matter of, say, enabling plugins or re-linking images in wayward posts.  (There is another way of dealing with the images which you will see below.)

After getting the new blog arranged and choosing to employ the same database it came time to worry about migrating the content (vis-a-vis the posts and pages and such).  Migrating this information is made easy enough in the new versions of WordPress.

Located under the Tools panel (left-hand side of administrative pages) you will find both Import and Export links.  If you click on the Export link in your original blog you will see that you are able to export your blog content (either just pages, just posts, or both together).  This export will be a simple XML file which you will want to save somewhere convenient (like your Desktop).

Once you have saved this file (called something like theinkwells.wordpress.2011-04-12.xml ) you can hop over to your new blog and get it receiver-ready.  If you click on the Import link you will see the Import dialog:

Import Tool
Import Tool

I used the WordPress link, but as you can see there are also tools for importing from other blog types as well as some specific tools for manipulating imports.  Clicking on the WordPress link brings this dialog:

Description
Description

This suggested plugin (wordpress-importer) is designed to import the XML file you just created using the Export tool.  If your blog is arranged to allow you to update and install plugins through the site itself (which is to say, if your server permissions are set correctly to allow this) then you can simply click on the Install Now link and add this plugin.

Installation
Installation

Alternatively you can click on the Plugin Homepage link, download the plugin, and install it manually by saving it (after unzipping it) into your /wp-content/plugins/ directory on your server.

Once that is installed, importing is merely a matter of pointing the importer at your XML file and waiting for the upload to complete.

As you are importing you will be given the option of uploading all linked files (like images).  I chose not to do this because it wasn’t clear that the upload dates would be retained.  I doubt it will do this, I doubt anyone else will care that it doesn’t do this, and you may well want to make your image (and other file) migration easier by choosing this option rather than using the copy method I mentioned at the beginning.

Now a few caveats.

You cannot migrate by category.  This was a real bummer for me.  It would have made things easier.  Instead I imported everything and set about removing those posts which were not in the desired category.

If you delete a category you do not delete the posts within that category.  Instead those posts will move into your default category (assuming they were only in one category previously).  Not a big deal; just something to keep in mind as you weed through your newly imported posts.

There is a category moving tool for moving posts between categories in bulk.  I can’t say how well it works, but I came across it in my research and it may be of use to you.  You can find its homepage here and it’s called bulk-move.

That’s about it for now.  Hope you find this helpful.

Share

How Facebook Fails to Scrape

I just wrote an article on setting up Google’s new Buzz (social site) to pull data from my blog.  I wanted to follow that up with an article on how to get Facebook to do the same.  The only problem is Facebook fails to manage this simple process.

Google and Buzz manage to pull information from my blog by scraping or periodically checking my blog site for new posts.  Facebook, through Notes, claims to be able to take an RSS feed from my blog (really any RSS feed) and deliver information about new posts to anyone watching my Facebook account.  As fate would have it, there is a bug which breaks this functionality—a bug which is over a year known.

(See my comments below for the preferred method of alerting Facebook concerning your RSS feed.)

There is as yet no fix.  There is a really crappy work-around.  It is the same as adding an RSS feed, so here are those instructions (see update below for an easier update method):

  • Click on Account —> Application Settings
  • Click on Notes (this will take you to the My Friends’ Notes, and oddly this is the only way I have found to get to this particular page)
  • Click on Edit import settings » (in a box to the right)
  • If you are performing the work-around, click the Stop Importing button (it is convenient to copy your blog’s RSS URL first)
  • Enter your blog’s RSS URL into the Web URL: field (mine is jamesisin.com/a_high-tech_blech/?feed=rss2 )
  • Click the Start Importing button
  • You will then be offered posts to import; click the Confirm Import button

My RSS feed worked in Facebook for about 15 months.  Then it just stopped.  Now I have to perform this work-around anytime I create a blog post.  Fucking useless.  It’s only slightly helpful if I happen to create more than one post at a time.

Since Facebook has their own (crippled) blogging capabilities (Notes itself is a sort of blogging application) I have my doubts about Facebook feeling a strong motivation to fix the RSS problem.  However, maybe when they realize how soundly Google is kicking their ass with their ability accomplish blog-to-social-site updates (in spite of the fact that Google also has their own blogging application—at least BlogSpot and Blogger if I’m not mistaken) Facebook will suck it up and fix it.

Happy blogging.

Update:

I was pointed to another way to manually update RSS feeds.  Those instructions were not up to my annoying standards so I have re-written them.

  • Visit your Wall (which is to say go to your Facebook profile)
  • Beneath the “What’s on your mind?” Share button, click Options
  • This will reveal a Settings link; click it
  • This will reveal Stories Posted by You (and some other stuff); click Blog/RSS (which should be your blog)
  • This will reveal some settings for your blog; click Update Now

Not as painful.  I haven’t tested this yet. This will manually update your RSS activity.  Best of luck.

Share

How I Spill Ink into Google Buzz

I have a blog.  Shocking, I know.  I like to ensure that my social diseases sites are continually updated by my narcissistic ever-important posts.

It has gotten to the point where my social sites have social sites, but the latest and greatest entrant into the fold is Buzz from our overlords friends at Google.

I searched the Web and found a host of well-intentioned but either overly complex, poorly instructed, or downright misguided information about adding an RSS feed or automatic scrape from my blog to my Buzz updates.

Turns out it’s simple to get updates from my blog and I don’t have to use RSS per se.

There are two parts to setting this up.  First you need to add your blog to your Google profile.  Then you need to connect Buzz to that linked blog.  It’s a bit tricky, but with a small amount of attention to detail you should be able to do this in maybe ten minutes.

Ok, so let’s set up that profile.

Go to your Google profile and then follow these instructions:

  • (If you used my link above click View my profile)
  • Click Add more info to my profile
  • Under Links add your blog to the My Links section
  • If your blog doesn’t appear under Add Links use the Add custom links to my profile and paste in your blog address
  • (Do not use your RSS address; I used merely http://www.soundunreason.com/InkWell )
  • Locate your blog under My Links and click Edit
  • Check the box that says This is a profile page about me (This is the most important step.)

Now you can head on over to Buzz.

  • Locate and click the connected sites link (you may have to click on your name first)
  • If you did the first part correctly, your blog should appear here and you can simply click the Add button

Easy enough?

Ladies and gentlemen, spill that ink.

Share