Brother Wheat’s Big Push: Wheatblog 1.0 Released
Yes, after an initial two months of heavy lifting and another four or so of complete burnout, Wheat, Pete and I (call me Skeet) decided to stop pissin’ in the wind and release this monster upon the general public.
What is Wheatblog, you ask? Well, perhaps a little long-windedness is in order.
People often stop me on the street and ask "Hey, why the hell didn't you just get with the herd and use Wordpress or Movable Type for your blog? You spend an awful chunk of time reinventing the wheel with that site of yours." (play along here)
"To that, fellow pedestrian, I say two things. First, if I wanted to be like all of the other sheep out there doing things the easy way, I would probably NOT be the guy making his own network firewall out of wood. Second, Good Day to you sir!"
Okay, back to Wheatblog 1.0.
It turns out that Wheatblog is a great little blogging tool. This particular version is the basis for this site, as well as the forthcoming Writers Blog Alliance megasite and a few other sites out there. Why do I use it? Well, I spent countless hours looking at every line of code and hence I know it like Adam knows Eve; but beyond that, it is simply a great framework upon which to do your own blog thing. Why did I help develop it? Well, it's also a great way to teach yourself stuff like PHP, MySQL, and CSS.
Sure, it doesn’t have racing stripes or spinners or fuzzy dice on the rear-view, but if you get to know it, it will likewise never leave you stranded waiting for Friedl, your malcontent BMW technician.
So if you are interested in a lightweight, flexible blogging platform that has no plugins or extensions or tasseled pasties but plenty of giddyup, give Wheatblog a shot. For those of you out there who might be interested in building your own blog your way, well, it's simply the best place to start.
I said Good Day!
Making Wheatblog Your Own
Sometime within the recent blur of activity @Hb, I managed to install a web statistics program that lets me snoop on who visits my humble quarter. Suprisingly, the VAST majority of hits are coming from the wheatblog sourceforge.net site. This is interesting, because when I was reshuffling the older documentation and preparing all the addenda for the 1.0 version, I purposefully left my site where it was; more than halfway down in the "Folks Who Use Wheatblog" list. This can mean one of two things: that the people who hit the SF site are interested enough in the project to look at practically every site on that list, or perhaps they are all very, very, very bored. To save my own ego, at the risk of unrealistic hope, I will blithely adopt the former supposition. :)
Actually, I have been, umm, lets say whelmed with email asking how wB stock became Hb, so I figured I would, from here on out, make a thing of it. In the interest of helping promote the adoption of wheatblog, I am gonna be dropping a few posts here and there about how I've customized the code, tips about styling your own install, and templates in the works; the last of which will perhaps lead to a standalone section of dev.hinkybox.com. For folks dropping by to see what is in store for the wB cms, have a gander at my development branch. If you have any questions about installing, styling, et cet'ra, leave it here in a comment, and I will gladly reply. ◊
Would You Use This blog?
In the few minutes of spare time I've had in the last month, I've been working on a handful of style templates for the blogging application on which hinkybox.com is loosely based.
I think it looks okay - question is, would the average person with rudimentary HTML and PHP skills choose something that looks like this as the jump off to a personal blog? I think the idea is to provide a plain vanilla interface, and I guess this is my idea of plain.
http://www.hinkybox.com/wheatblogdev/wheatblog-05b/wheatblog/ was moved
Be honest, if you please -- I am looking for constructive criticism. :-)
Update:
I have officially become a part of the wheatblog development team, ostensibly as the Minister of Pleasing Appearances. My development branch can be found at this URL:
http://www.hinkybox.com/wheatblog/
Wheatblog .0x Quotes Issue: Solution
I am a bit of a fancypants, so I like to use a lot of XHTML in my posts. MySQL hates single quotes, and dies every time one is out of place. I was having a heck of a time figuring this one out when I first started out with wB, but I am pretty sure the fix Pete came up with does the trick. Add the below function somewhere where it is accessible by your admin pages:
<?php function DB_quote($arg) { if (get_magic_quotes_gpc()) $arg = stripslashes($arg); if ( is_numeric($arg) ) return $arg; return "'" . mysql_real_escape_string($arg) . "'"; } // Function written by Peter J. Salzman (Dirac.org) ?>
According to php.net, this is the safest way of prepping variables for insertion the database, as it avoids the possibility of injection. The problem is that some hosts turn mag_quotes_gpc() on, while others leave it off (as it should be, because it sucks). First, we wrap the necessary POST variables in our function, and we add another variable to have the post display correctly without the quotes added.
<?php // parse the passed variables $the_day $_POST['the_day']; $the_month $_POST['the_month']; $the_date $_POST['the_date']; $the_year $_POST['the_year']; $the_category $_POST['the_category']; $the_showpref $_POST['the_showpref']; $the_title DB_quote($_POST['the_title']); $the_body DB_quote($_POST['the_body']); $show_body $_POST['the_body']; ?>
Then we change the variable within the post display (in add_post.php and edit_post_002.php so our post proofs don't contain the added slashes.
<?php echo("<div class="wheatblog_indent2">n" . "$the_day, $the_month" . "." . "$the_date" . "." . "$the_year <br />" . "$the_title <br/>". $show_body ."<br />" . "[id: $last_post_id :: category: $the_category :: showpref: $the_showpref]" . "</div>n"); ?>
Happy Blogging.