Twitter Facebook

Having issues with jQuery not working in WordPress admin whilst working locally?

Well I have. Previously I have never had an issue with this, but while working on a local version of a WordPress website, a lot of error were cropping up in WordPress admin.

To fix this annoying bug, drop the following in your wp-config.php file…

define('SCRIPT_DEBUG', TRUE);

To whom it may concern

I found this out the other day when sorting through my office.

Recommendation

At fifteen years old I found contact details of a local web development company in the yellow pages (old school) and asked them if they would take me on as part of my two weeks work experience.

Gladly for me, they said ‘hells yeah’ (they probably just said yes). I can’t say I learn anything from being there but I remember it being a really fun time. Back then everyone was learning Flash.

I have no idea if these guys are still going or anyone who worked there is still in the industry or even alive for that matter.

Still made me chuckle though, 2002 seems to long ago…

Sack whoever is developing on the live Sky News website

Screen Shot 2013-04-05 at 14.33.45

Attaining the perfect blood/alcohol level for developers

Nathan Roberts forwarded this funnie over to me last week, so I thought I’d share it.

XcbUu

Bootstrap’s Official Web Showcase

Not too long ago now Bootstrap split from Twitter to create it’s own organisation. Some may have been slightly skeptical of this, but when I heard the news I was quite excited.

Now that Bootstrap is a separate entity to Twitter it has considerably more control over the direction of the project. First of all, version three is being planned very soon with some exciting new features.

One of the changes or new features that they have added is an Expo – or a showcase of websites built with the framework.

Bootstrap's Official Expo

 

Despite not being online long, the expo already showcases a decent amount of websites built with Bootstrap.

You can also check out the unofficial tumblr blog which has been going for some time, Built with Bootstrap.

Another alternative is Love Bootstrap which is another showcase website, it is quite small compared to Built with Bootstrap, but if you are a hardcore Bootstrap fan it is definitely worth a check out.

You have no excuse now not to go and look at the epic websites built with Bootstrap, and start using this framework to build awesome websites.

slideToggle function making you scroll to the top of the page

I recently have been working on a project for a designer and as part of the design I am hiding disqus comments in wordpress and showing them on a click of a button.

So added display:none in the CSS for the disqus comments div and then in jQuery I used the slideToggle() function to make the div show and hide on click of the button.

The only issue was every time I clicked the button, the page automatically scrolled to the top. I noticed quite a few others had the same issue too when using the function. After a bit of research on google, I came across a solution on stackoverflow which was extremely simple.

All you have to do is remove your hash tag link in html (href="#") and replace it with href="javascript:void(0);"

10% off Freeagent

Do you use Freeagent to do your books, accounts and invoicing online?

If not, you definately should!

If you use the following promotional code, you can get 10% off!

Promo Code: 4204kytt

Adding Placeholders to the Contact 7 WordPress Plugin

For a recent project I was working on with a very low budget, I had to use a free plugin for WordPress which would allow me to create a custom contact form to be used on both the contact page and also in a widget.

The plugin I opted for was Contact Form 7, an excellent, free plugin by Takayuki Miyoshi.

The only one issue I had was in the design I was working from, no labels were being used, only placeholders in the inputs and textareas.

Now, Contact Form 7 as standard does not have this feature, but pryley from the WordPress support forums came up with an excellent solution to the problem.

The solution does unfortunately mean editing plugin files, which I don’t like doing, but it is a quick and easy solution for those like me looking for one.

First of all copy the following code:

// Edited Code

$ph_att = '';

if ( $value && preg_grep( '%^placeholder$%', $options ) ) {

$ph_att .= sprintf( ' %s', $value );
$value = '';
	
}

if ( $ph_att )
	$atts .= sprintf( ' placeholder="%s"', trim( esc_attr( $ph_att ) ) );

if ( wpcf7_script_is() && preg_grep( '%^watermark$%', $options ) ) {
	$class_att .= ' wpcf7-use-title-as-watermark';
	$title_att .= sprintf( ' %s', $value );
	$value = '';
}

You now want to take that code and paste it into line 61 of text.php and textarea.php.

Now in your WordPress admin, specifically in the Contact Form 7 admin page, you can now use the following code to add a placeholder:

[text* your-name placeholder "Your Name"]

I would also recommend using the following code to make sure the placeholders work on old browsers, otherwise it will no end leave some old man in China thoroughly confused…

Make the background of a div full width using CSS3

After working on a project which required me to use a background image on some WordPress widgets, I came unstuck as I realised the background images were one or two pixels smaller than the width of the widget.

Now, I could have resized them using Photoshop or another image editing package, but instead I decided the trawl the internet, looking for a responsive. A lot of the information I got back was that was nay on impossible, or that it would eventually become a property in CSS.

However I came across a nifty solution using CSS3 at cssplay.co.uk.

.back {
background-image: url(back.jpg);
background-repeat:no-repeat;
background-position:center center;
-o-background-size: 100% 100%, auto;
-moz-background-size: 100% 100%, auto;
-webkit-background-size: 100% 100%, auto;
background-size: 100% 100%, auto;
}

I’ve tested the code and it works fine, and as you can see there are several browser pre-fixes there in the CSS, so I am assuming it is cross-browser compatible too!

It was acceptable in the 80s – iOS from 1986

I bet you are pretty happy with the interface on your iPhone or iPad, right?

Well, if you like me were born in the 1980s then you always have a little soft spot for anything nostalgic or retro.

While looking for some inspiration for a project I came across an awesome designer called Anton Repponen, who has taken some time to give the iOS we know now an 80s twist.

Below are just some of the images from his website

iPhone_RetroOS_Preview_680

iPhone_RetroOS_PopUp_680iPhone_RetroOS_HomeScreen_7_680iPhone_RetroOS_Photo4_680iPhone_RetroOS_LockScreen_680iPhone_RetroOS_Photo3_680I assume this was just a technical exercise to show how he awesome he is, but if this was an actual iOS I would definitely use it!

What do you think? Go back to the 80s? Or stay in the present?