Equal Mark

Mark Wilkinson is Equal Mark – WordPress Consultant and Web Developer

WordCampk UK 2010

Posted on | July 20, 2010 | 1 Comment

This weekend just gone I attended WordCamp UK in Manchester, which is the annual gathering of UK WordPress users and developers in the UK.  As was the case last year in Cardiff, I fully enjoyed the sessions and the whole weekend, and as normal I am writing  this post as a summary of what I saw and found out about on the weekend.

Travel

Last year event in Cardiff meant a long (ish) journey down to south Wales and a stay over in a Hotel.  This year I was a little more fortunate as I was able to drive their and back on both days without having to endure and overnight stop.  I am not a fan of staying in hotels, in fact I like my own bed too much!

Still a city centre location had me slightly nervous about driving through Manchester centre with all the one way roads and tricky navigation.  Thanks to several people on the WorddCamp UK mailing list, including Rachel Shillcock and Gurbir Singh about car parking facilities and directions getting their was easy.  The free parking also made the event extremely good value for money at £20 for a ticket.

Themes

WordCamp UK started off for me with a talk from Michael Kimb Jones all about the development of WordPress themes.  It really is amazing how far we have come with themes, especially over the last 12 – 18 months.  There was a time when all themes were essentially the same with just different CSS, whereas now we have all sort of themes doing different things with option pages etc.

The commercial theme market was very much at the forefront of the discussion and as to how companies such as StudioPress, Woo Themes and the like make their money.  What can certainly be said is that they make big money according to the figures that were mentioned during the session.

Later in the day, Jonny A also talked about themeing with some interesting ideas, hints and tips about best practice when creating a theme.  Particular he concentrated on some of the newer WordPress 3.0 template tags and features such as get_template_part() and custom post types.  Personally the jury is still out about Custom Post Types particularly since they are driven by the active theme which could cause problems, but I am sure they have their uses.  In fact OttoPress has stated just this rcently, indicating that they are often misunderstood.

Using custom post types right now is, for most people, a bad idea. Only specialized usages really exist for them… for now

That then brings me onto Theme Frameworks.  Don’t get me wrong I can see the benefits of using a theme frameworks, but in my limited experience of using them, they cause a lot of problems as it feels as though you don’t have full control.  It will be interesting to see first impressions of Wonderflux the new theme frameworks for designers out soon in private beta.

Plugins

I also attended the WOW plugins session, another presented by MKJones.  I found this very useful as it opened me up to a lot of plugins that would be very useful, yet I have never heard of.  There are so many plugins that you tend to just stick to the ones that you know about really, so sessions like this were people can share there experience of different plugins is a really good idea.

One that really caught my eye was Gravity Forms, even though it is paid for.  Many had been advocating this in the past on Twitter and having seen it first hand I thought it was worth buying, particularly as I negotiated a 25% for WordCamp UK after the event through a Twitter conversation with the author!

I am yet to write my first real plugin but maybe it is time to delve into that area now after having seen what can be done.  I am sure that some time in the future I will give it a go when I have some time, or have the necessity.

Enterprise

Dave Coveney is always an interesting speaker and he did not fail to deliver this year, particularly with his talk on WordPress in Enterprise. This is something that is always close to me because we run an ‘Enterprise’ environment in our school, with over 1000 users.  Dave was mentioning about some of the difficulties of integrating WordPress with an Enterprise Windows server environment, something which we seem to have overcome at the moment using a plugin called wpDirAuth.

In many ways WordPress seems like the perfect solution for so many enterprises with it licensing and open source advantages, yet we still see a slow uptake by the enterprise community. Personally I think the majority of this comes down to accountability. Since WordPress is Open Source there is no-one on the end of the phone to ring up and sue if it all goes pear shaped.

BuddyPress

BuddyPress looks like a really good tool and would seem to have all sorts of uses in all sorts of sector, particularly in my sector of education.  Paul Gibbs, a BuddyPress forum moderator gave 2 very good talks covering the basics of BuddyPress as well as how to create your own BuddyPress theme to get your sites looking as you want them.

This is something that I definitely want to have a go with in the near future and Paul’s presentations with the advice and insight he offered is certainly going to help.

WordCamp (UK?)

The weekend ended on a slightly controversial note.  The last session was intended to be a meta session with attendees discussing the future of WordCamp UK, what worked well this year and what could be improved in future years.  Jane Wells from Automattic (the company behind the WordPress project) appeared to indicate that WordCamp UK would need to become a regional event rather than having a single national event.

The audience did not take too kindly to this and argued against this being the case.  Personally I think that it should stay the way it is, and if people want to get together regionally then fine.  In fact some already do, for example there is a Manchester group.  We are a small country at the end of the day and an event of nearly 200 is better in my opinion than events all over the country of 20 -30 people.  But to be honest, I don’t think I am that bothered either way, as long as WordCamps in the UK can continue, whatever they are called and wherever they are.

Google for Your Domain

Posted on | May 8, 2010 | 1 Comment

Two really important things if you set up your own domain are getting email to come from that domain and making sure that you can access that email from anywhere and any computer.  Many hosts provide email solutions that come close, but you can’t beat Gmail for the best email solution.  Trouble is that doesn’t use your own domains address, or does it?

With the launch of  Google Apps a few years back this all changed.  You can now use Gmail with address at your own domain as well as set up various devices to all access your mail from anywhere in the world with an internet connection.  In this post I intend to show you how.

From the outset it is worth mentioning that in order to be able to use this facility you must be able to access the DNS settings of your domain, usually something that is provided by a good host.  If you can’t do this then this services if not for you.

First thing is to head over to Google Apps standard edition (if you are a business requiring more than 50 users you can use the paid for business edition) and sign up inputting the domain that you want to use.  Remember here that a domain does not include the usual ‘www’ in front.

Once you have completed this step the wizard asks you some simple questions such as which account you want to setup to act as the admin account and email address for the domain.  Enter the details as required and you will then face the Google Apps dashboard, which looks something like this:

One of the differences that you will see on your screen is that the email will say inactive. The reason for this is that you need to change some of the DNS settings with your domain host to make sure that email sent to your domain goes to the new Google Apps service that you have set up so that it can be handled.

Use this page on Google in order to find out how to setup Google Apps in terms of changes the DNS settings depending on which host you have.  Once you have completed these steps within no more than 48 hours the DNS changes will have propagated and you will be all setup.

The next thing to do is to get your mail setup on the different clients that you may be using.  In this walk through I am going to concentrate on setting up Apple Mail to work.

Select preferences from the Apple Mail menu and then select accounts.  Click the plus symbol below the list of accounts in order to create a new account.  You will then see the following screen:

Enter your name in the first box and then the email address in the second followed by the password.  Apple Mail with then take a second or two to search for the account and then send you back to the following screen where you can enter more details:

From the first drop down list you need to select IMAP rather than the usual POP.  This means that mail is always stored on the server and you access mail from the server.  This is better when you are using more than 1 device to access your mail.  Actually perhaps a better way of describing it, is that it is like using webmail but with an email client instead.  Then in the boxes below that you can enter your email address which is your username and then the password for that address that you set previously.

Pressing  continue will take you to a similar screen which asks you to enter the outgoing mail server details.  Here you need to give the outgoing server a description and then for the outgoing server you need to type smtp.gmail.com.  Again enter your email address as the username and the password that you have already entered once.  If you get the option to use SSL then tick that box too.

Now it is a matter of pressing OK and Apple Mail will check the details and then if successful and you have not entered an error then you should be able to take the account online.

The next thing to do is to map some folders in Apple Mail so that it knows which folders you want to use for sent mail, drafts, trash etc.  You should now notice that on the left hand side of mail you have an area for the new account and you should see the labels that you have in Gmail when using the webmail version.  Therefore you should see that there are an All Mail, Spam, Sent, Drafts etc folders.

Click on the Sent folder in the Gmail list and then select the mailbox menu from the top of the screen and choose “Use this Mailbox for” option and select sent.  Do the same for the spam folder (Junk) an the trash (deleted items) and drafts.  This means that all your mails are stored on the server in the correct folders.

So that is it you should have a perfectly working Gmail account using your own domain working on your Apple Mail client.  Let me know how you get on!

WordPress Dynamic CSS

Posted on | April 30, 2010 | 6 Comments

Over the last 6 months or so I have been working on WordPress themes that contain theme options pages in order to allow the user to change a number of elements to their websites.  With this is mind I wanted a way to enables users to change elements of the CSS layout of their sites, without having to edit code.  This posts explains how this was done.

The first thing to do is to set up a file to use for the dynamic CSS.  This file of course needs to be a PHP file because you are going to include PHP code in order to get the dynamic CSS values from the WordPress options table.  Therefore setup a blank PHP file and save this into your themes folder calling it style-options.php.

At the top of this PHP file you need to tell your browser that it is actually a CSS file.  Therefore you need to include the following piece of code at the top of that file:

<?php header("Content-type: text/css"); ?>

We could now simply call this file in the header of the page in the hope that it will work.  It will of course, however there is one problem with this in that you cannot at the moment include any WordPress functions in this new dynamic CSS/PHP file because it is not a file that is loaded with the WordPress files.  Therefore we now need to create a function that loads this file when our pages load which will allow us to use the get_option() function in the file.

You need to add the following code to your themes functions.php file:

<?php
// this code enables the style-options.php file to use WordPress functions
add_filter('query_vars', 'add_new_var_to_wp');
function add_new_var_to_wp($public_query_vars) {
    $public_query_vars[] = 'my_theme_custom_var';
    //my_theme_custom_var is the name of the custom query variable that is created and how you reference it in the call to the file
    return $public_query_vars;
}
add_action('template_redirect', 'my_theme_css_display');
function my_theme_css_display(){
    $css = get_query_var('my_theme_custom_var');
    if ($css == 'css'){
        include_once (TEMPLATEPATH . '/style-options.php');
        exit;  //This stops WP from loading any further
    }
}
?>

This means that we can now add WordPress functions to our style-options.php file and this means that we can call items from the WordPress options table.  For example you could have a a theme options page that stores a size value for H1 headings in the options table with the ID of theme_h1size.  You would then add the following code to style-options.php in order to return this value:

h1 { font-size: <?php echo get_option('theme_h1size'); ?>;}

The final thing is to call the style-options.php file in the header.php file of you WordPress theme, so that it loads when your pages load.  To do this the function we created above allows you to add the following to the head section of header.php:

<link rel="stylesheet" href="<?php bloginfo('url'); ?>/?my_theme_custom_var=css" type="text/css" media="screen" />

To check this work correctly go to yourdomain.com/?my_theme_custom_var=css and you should see your style-options.php CSS page.

So there we have a really simple way to give WordPress users an easy way of changing the CSS of their WordPress sites without the need to changes any CSS itself.

Some code from clark-technet.com

Multi Level WordPress Menu

Posted on | February 18, 2010 | No Comments

WordPress is an excellent CMS and I have used it on most of the projects that I have worked on recently.  The one thing however that can be a little tricky is multi-level page menus, when you have got several levels of parent/sub pages.  Whilst working on a large project recently I have come across a pretty good way of getting round this problem.

I was working on a site that required a multi-level page navigation system.  This primarily meant that when viewing a page the child pages of that page would need to be displayed in the sites sidebar.   Read more

Creating an Avatar in Fireworks

Posted on | February 12, 2010 | 1 Comment

Today I spent much of the day teaching about using Vector tools in Adobe Fireworks CS3 (yes we are out of date a little!).  My aim was to create an avatar character to represent you as a person, or perhaps what you would call a caricature using Fireworks, to express the benefits of using the vector tools rather than relying on bitmap tools all the time.  This post is to tell you how I got on!

Inspriation

I started out looking for inspiration, as I am sure all designers do.  I have never been an artist and probably never will be and therefore when it comes to drawing something I need all the help I can get.   Read more

Clean Coding

Posted on | February 6, 2010 | 2 Comments

I have been coding websites now since late 2004, and I have learnt a lot in the time that I have been doing this.  In fact every day you learn things that you didn’t know, and a long the way I have learnt so much from others.  However the one thing that no one passed on to me was the importance of clean coding.  This is something that I had to learn for myself.  So what do I mean by clean coding and how does it help when creating a website?

Many beginners often use Web Editor programs such as Adobe Dreamweaver to create their websites, however as time has gone I have found it easier and easier to code the sites using a code editor rather than a WYSYWYG solution.  It is only then do you start to appreciate the need to clean code. Read more

Protect WordPress Content

Posted on | January 27, 2010 | No Comments

I have been working on a number of sites recently that require several of the pages to be protected to logged in users only.  Also I have had one site where all pages which have a particular parent page needed protecting to logged in users only.  With some very handy built in WordPress functions and a bit of PHP this post attempts to show you how this can be done.

Ribbweb ICT runs WordPress and is used as a CMS in order to provide online resources for students to use.  It was decided that the site needed a section for just teachers to be able to use, where they can post protected content such as lesson plans, notes etc that website visitors cannot see but logged in users can.   Read more

keep looking »
  • About

    Mark Wilkinson WordPress DeveloperHello there, I am Mark Wilkinson a freelance WordPress developer based in the United Kingdom.This is my blog about all things WordPress and web design. Why not also check out my WordPress business - Equal Web Creative.

  • Twitter Updates