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. ◊
6 Missives So Far
01 Lars said on Sun May 15 21:56:24 EDT
Hello, I was looking at the code for Wheatblog .6b and I am having problems with backslashes when posting. I have checked my phpinfo and have magic_quotes_gpc is set off. How do I fix this?
02 josh said on Sun May 15 22:18:01 EDT
Hello Lars;
This is a known issue with older versions of wB, and it has been ostensibly fixed in the forthcoming release of wB 1.0.
Within the add_post.php script, there is a block of $_POST variables , which serve to define the input from the post form on admin/index.php. In your case, you first want to modify these lines in the current block:
$the_title = $_POST['the_title'];
$the_body = $_POST['the_body'];
change them to:
$the_title = addslashes( $_POST['the_title']);
$the_body = addslashes( $_POST['the_body']);
This solves the MySQL error, but to correctly generate the post preview, you need to add these lines:
$clean_title = $_POST['the_title'];
$clean_body = $_POST['the_body'];
Now within the Post Preview output, to avoid all the slashes showing up, you need to change $the_title and $the_body to $clean_title and $clean_body.
Hope this helps. If this does not remedy the issue, email me and I will take a peek at your code.
03 Lars said on Mon May 16 2:58:40 EDT
Thank you that worked.
04 josh said on Mon May 16 3:44:07 EDT
Alright, who's the Joker visiting my site with NT4.0 and IE 5.0 ? Seriously, sheesh make my life difficult why don't ya?
05 Mad said on Mon May 16 4:36:30 EDT
Hey Josh,
Just a little note to say that I'm watching developments here with interest and I'm luvin' the new shiny standards compliant look.

Comments are currently off for this entry.