Posted: March 18th, 2011 | Author: Bernhard | Filed under: Wordpress | No Comments »
WordPress 3.1 is released and comes with many new features. One of them is the extra admin bar visible at the front-end of your website when user are logged in:

Not everyone is happy with this new feature. Here is the way to disable it for project:
Open functions.php and add:
// Disable admin-bar from showing on your blog
wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_footer','wp_admin_bar_render',1000);
Posted: March 18th, 2011 | Author: Bernhard | Filed under: CSS | No Comments »
When I was building a new form for a new project today I was having some problems with the resize option for textarea’s in Chrome (update: and Firefox 4). Every form with a textarea messes up the entire website layout by resizing this field.
Example:
textarea {
resize: none;
}
I know this can be an usability thing for Chrome and Firefox users, but I think when you make your textarea large enough there should be no problem at all.
Posted: July 31st, 2009 | Author: Bernhard | Filed under: Mobile Browsers | No Comments »
I’m not a marketing specialist, but I can see a lot of things change very quickly when we talk about mobile devices. Since its invention the mobile phone became indispensable in our lives. The mobile phone is used mainly for business purposes, but this is changing day by day: The market is moving fast to consumers too. With more people using a high-end phone, the capabilities for mobile web design give developers the opportunity to focus on this group of people as well.
Many people think it’s hard to make their website suitable for mobile devices, but this isn’t the case at all. In this article I’ll introduce a couple of things you should consider before developing a mobile website. In a future article I’ll give some hands-on advice on where to start. Read the rest of this entry »
Posted: July 10th, 2009 | Author: Bernhard | Filed under: Wordpress | 2 Comments »
In wordpress it is possible to create multiple ‘sidebars’ with widgets on custom places in your template. To register a new sidebar open functions.php in your template folder (or create one), add:
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'SIDEBARNAME',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
));
Explaination of the array() :
‘name’ = name of your new sidebar
‘before_widget’ = Add a html element before you start your widget (eg. <div class=”widget”)
‘after_widget’ = close the element you started above
‘before_title’ = Add a html element before your widget title (eg. <h3>)
‘after_title’ = close the element you started above
Now al you have to do is add your new sidebar to your place in your template, add:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('SIDEBARNAME') ) : ?>
This is what shows when no widgets are added.
<?php endif; ?>
Posted: July 10th, 2009 | Author: Bernhard | Filed under: CSS, Wordpress | No Comments »
I just finished my new template and I was ready to test how it looks, great! but…oops a problem showed up and I couldn’t find what was wrong. Read the rest of this entry »
Posted: March 21st, 2009 | Author: Bernhard | Filed under: CSS | Tags: CSS, hacks, IE6, IE7 | No Comments »
As you all know there are a couple of differences in rendering your website in different browsers (Internet Explorer 6/ 7 / 8, FireFox 2 / 3, Opera and Safari).
You as front-end developer have the responsibility to make sure your webpages are supported for all browsers. Microsoft introduced “conditional commenting” as a sollution, but often you do not want to add in a whole CSS file to fix a single pixel. In these cases you need a “hack” in CSS to accomplish this.
Before I give the solution to your rendering differences in Internet Explorer, you need to understand these hacks should only be used when all other options are eliminated since they are mentioned as final solutions for tiny bugs.
Read the rest of this entry »
Posted: November 6th, 2008 | Author: Bernhard | Filed under: PHP | Tags: cookies, ie, iframe, Security | No Comments »
Session is lost when browsing in an iFrame
A very large problem with a very small solution: For security reasons Internet Explorer prevents carrying over session variables from one page to another when browsing in an iFrame. To enable this we somehow need to tell IE that the page we’re looking at is trusted and safe. This can be done by adding either a meta tag or a header (in this example sent using PHP) to the framed page:
1
| <meta http-equiv="P3P" content='CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'> |
1
| header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); |
Solution source: Sitepoint.com