Archive for the 'wordpress' Category

K2 now at v1.0

Today at 20:49 CET, Michael Heilemann announced in revision 894 that the K2 theme has now reached the v1.0 mark. Hereby my congratulations to the K2 team and keep up the good work guys!! I have seen many interesting changes in the last couple of days I’m going to explore ;)

Read more on the 1.0 release here.

K2: Full Height

Imagine. You are using the K2 theme for WordPress and you want your design to be a full height design. Your first thought is probably that you only need to change some bits and pieces in the CSS and your done, right?!

Ok – it’s almost that easy but in the end it took me quite a while to find the proper solution for pages with very little content on it… So to save you the same hassle – here is a how to. I would suggest you add the CSS code to a custom style stylesheet rather than modifying the style.css to keep things easy when upgrading K2.

Step 1: footer.php
Before we start with the required CSS code we need to make a slight adjustment to the footer.php to ensure that the footer div is included in the page div which acts as the wrapper div.

Move this line:

</div> <!-- Close Page -->

Towards the bottom, right before this line:

<?php wp_footer(); ?>

Step 2: make html and body both 100% in height

html, body {
 height: 100%;
 }

Step 3: adjustments to #page

#page {
 padding-top: 0;
 border-bottom: none;
 height: auto !important;
 height: 100%;
 min-height: 100%;
 }

Step 4: adjustments to #header

#header {
 border-top:  20px solid #fff;
 }

Step 5: adjustments to .content

.content {
 padding: 0 20px 62px;
 }

Step 6: adjustments to #footer

#footer {
 padding: 10px 0 10px;
 position: absolute;
 bottom: 0;
 width: 100%;
 }

Final action

Ok, that’s basically it although you now need to check if some values need to be changed or not. I have changed the padding of the footer (see step 6) to 10px for both the top and the bottom. With these padding values I need a padding value of 62px for the bottom in the content div (see step 5).

Tip: to see how much you need for the bottom padding in step 5 is to add a background color to the footer and then make a screenshot. In, for example, Photoshop you can then easily get the height of the footer. Just a few more pixels to that as a spacing between the content and the footer and you are all set.

Tested with K2 r743 with FF3, IE6, and IE7.

Dutch translation for DB Cache plugin

I came across a nice caching plugin for WordPress that works a bit different than the other available caching plugins, it’s called DB Cache.

For whoever needs a Dutch translation file for it – here it is. Just copy the code below to a newly created file called nl_NL.php in the /wp-content/plugins/db-cache/languages/ directory and you are ready to go.

<?php

$dbc_labels['configuration'] = "Configuratie";

$dbc_labels['activate'] = "Activeren";

$dbc_labels['timeout'] = "Laat een cached query verlopen na";
$dbc_labels['timeout_desc'] = "minuten. (Verlopen bestanden worden automatisch verwijderd.)";

$dbc_labels['tablesfilter'] = "Tabellen om te cachen";

$dbc_labels['saved'] = "Instellingen opgeslagen.";
$dbc_labels['cantsave'] = "De instellingen konden niet worden opgeslagen. &lt;a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\"&gt;CHMOD 755&lt;/a&gt; bestand: &lt;u&gt;config.ini&lt;/u&gt;";
$dbc_labels['activated'] = "Caching geactiveerd.";
$dbc_labels['notactivated'] = "Caching kan niet worden geactiveerd. &lt;a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\"&gt;CHMOD 755&lt;/a&gt; de folder: &lt;u&gt;wp-content&lt;/u&gt;";
$dbc_labels['deactivated'] = "Caching uitgeschakeld. Cache bestanden verwijderd.";
$dbc_labels['cleaned'] = "Cache bestanden verwijderd.";
$dbc_labels['expiredcleaned'] = "Verlopen cache bestanden verwijderd.";

$dbc_labels['save'] = "Opslaan";
$dbc_labels['clear'] = "Leeg de cache";
$dbc_labels['clearold'] = "Leeg de verlopen cache";

?>

WordPress 2.7 released

The guys from Automatic have done an awesome job with their 2.7 release of WordPress! I really like the way the backend is going to and it’s now easier then before to create highly customized plugins.

Just have a look at the video to see the new features of 2.7 for yourself or go to:

WP Fix: what to do when visual text editor jams

In order to get the code in the previous post I installed WP-Syntax and learned pretty quickly that the plugin ruins the visual text editor functionality… arrggg!

Simply uninstalling the plugin wasn’t good enough so after some research on the WordPress Support Forum I came across the following procedure to fix the issue:

  1. Disable (and if needed remove) the plugin which causes the visual text editor of functioning normally.
  2. Clear the browsers cache (in Firefox, use the Clear Private Data menu) and restart the browser.
  3. Go to /wp-includes/js/tinymce/tiny_mce_config.php and find the following line:
    'compress' => true,

    and change the true value into false.

  4. Log on to your WordPress admin area and now the visual text editor should be functional again.
  5. If everything is working you can now undo the code change of step 3.

As you can see, the WP-Syntax plugin is still running and I can still use the visual text editor but that will take some modifications of the WP-Syntax code. I will post those changes later this week.