What everyone wants

Well, it’s time to start on my MSc project. I’ve decided I want to build a very configurable CRM. In order to inform this my plan is to survey various people. I’ve not got much in the way of responses, and since this blog has very few, if any, readers, I don’t imagine I’m going to get very many more by adding this link here. However, if you do stumble across this for any reason, and you’re using, or you’re about to use, some CRM software, please consider clicking it and completing the survey.

Face off

Well, I’ve left Facebook. More or less. I’ve randomly decimated my friends list and deactivated (not deleted, mind) the account. I’ve had a lot of enjoyment out of it over the five-odd years I’ve had an account, but it’s come to an end, I think. Why? Well, following are some concerns…

1) Privacy. Look, when push comes to shove, I don’t think anything that bad is going to happen. My account is locked down and doesn’t have anything more incriminating that a few photos of me looking drunk at festivals. But Facebook HQ seem intent on rejigging the arrangements once every six months and I just can’t be bothered to check every time.

2) I hate advertising 1: I hate advertising. I particularly hate focus-group-driven, data-fed advertising where some smart boys in Shoreditch have come up with a call to action designed, on the evidence provided by however many thousand test subjects, to bypass your rational thought processes and appeal directly to your primal urge to buy. When it’s done badly I find the lowest-common-denominator cynisism stomach churning, and when it’s done well it’s even worse.

3) I hate advertising 2: I hate advertising. I think we all need to realise that an internet which is free at the point of delivery and paid for through adverts will give us a dumbed-down waste of time that provides less and less for its users in favour of more and more to its sponsors. And I think to some extent you can see that with Facebook – endless appeals to make more and more connections, provide more and more data, continually add depth to that valuable profile of yours. Conversely, an environment in which small providers are able to make money through actual transactions should provide diversity, choice and richness.

4) I’m 34. It’s a kids’ toy. We all need to grow up. Fuck gameification. Intelligent adults should have the nouse to get involved with complex structures.

Adding sidebars to your WordPress site

I’ve been doing some WordPress customisation recently. Something that always bugged me about WordPress was that it seemed very hard to manipulate the page structure, so you always ended up with this very, well, WordPress-y-looking site. Now, clearly you’ve written in in WordPress,  but really you want to make it look as though you didn’t. Well that’s what I think anyhow. I’ve just spend a few hours figuring it out, and I thought I’d share it, since there didn’t seem to be a single place online where someone talked you through it.

So, to start off with, I’m using a fairly vanilla WP install, with the rather splendid Toolbox theme. Toolbox is very stripped back and minimal, and it makes it relatively easy for a new user to find his or her way around the structure of a theme.

Creating a new template

1) Open the theme folder (wordpress/wp-content/themes/toolbox) and find page.php, which is the file WordPress uses as the standard template.

2) Save the file as something different, whatever you want to call it. Mine is called two-sidebar-page.php.

3) At the top of the page, between two php tags, there’s some text, starting “The template for displaying all pages…”. Remove that, and replace it with the following:

Note in particular the template name. I’ve called mine Two sidebar page (largely because I thought if I called it Diamonds are Forever people would confuse it with the James Bond film). WordPress needs that data to name the template – it’s what you’ll see in the Template dropdown when you add a new page.

Note also that I’ve left the get_header() function in. Without this WordPress won’t be able to get all the header information, like the location of the stylesheet, which won’t break anything but it will make your site look rubbish.

Adding sidebars in the body

Now, in the body of the original page, you’ve got a division with some functions that get the content, then you’ve got  a get_sidebar() and a get_footer(). There’s no prizes for guessing what these two functions do. However, the functions file in Toolbox provides some good dynamic sidebar features. Don’t worry too much about the functions file too much for the time being), simply know that you can use <?php dynamic_sidebar( ‘sidebar-1′ ); ?> and <?php dynamic_sidebar( ‘sidebar-2 ); ?> to put two dynamic sidebars into your page. Here’s my body (matron!):

Note that I’ve put the sidebars in their own divisions, and I’ve stripped out or renamed some of the divisions around the main content area. The latter I did for simplicity, the former because I wanted to position my three new elements. I’ve included the modifications to the CSS (style.css, in the same file as page.php) at the end of this post. There are a couple of other things you’ll probably want to do:

1) I’m using WordPress so it’s set a bit like a CMS – in the Reading settings, I’ve got the home page set to a specific page, and the post page set elsewhere. I removed the sidebar functions from the index file as I found they conflicted with my new templates. Same thing goes for single.php, which is the template for single posts.

2) The content in the dynamic sidebars is controlled in Appearance > Widgets. Have a look and decide what you want in there. Coming soon (with any luck) will be some guidance on adding content from posts and pages into sidebars.

That’s it, everyone. Below, as promised, are the new CSS classes I made to lay my screen elements out (ignore the dotted lines, they’re just their to make my life marginally easier whilst building):