User login

theming

You are here

Popular Themes

theming

Author:JurriaanRoelofs

Datum:30-12-'11

Respondr theme sneak preview

Working on the new Respondr theme, to be produced next week. It will be built on the awesome new Arctica+Tundra base themes.

New features that come with Respondr:

  • Flexslider with swipe support
  • Scroll to top link
  • Flawless device agnostic user experience
  • Tweet slider
  • Flickr widget

Not sure how I'll implement the flickr integration for the footer block. If there isn't a specialty module available I'll just use Feeds module.

Respondr theme Sneak Preview
.

Author:JurriaanRoelofs

Datum:8-4-'10

jQuery corner plugin = rounded corners solution?

So I just checked the jQuery Corner plugin, which I've seen used in the Acquia/TNT/Fusion themes, and its a plugin that adds rounded corners to blocks without using images.

I've just been playing around with it and now I'm thinking where were you when I started putting 28 rounded corners images in a css sprite image and control them with dozens of lines of CSS selectors.

The reason why this type of plugin is so nice with Drupal is that it works perfectly even under these common situations:

    Want your theme to be compatible with Context module? Better check your theme_blocks

    I got a bug report for the Syan theme today about problems with openpublish - all the blocks were gone.

    I hadn't tried openpublish before so I decided to check it out. Wow! A 10 megabyte Drupal distribution, including well over a hundred contrib modules. Furthermore, this distribution bypasses the Drupal block system and uses the Context module instead.

    After deleting some fix in my theme's code I discovered that theme_blocks was the culprit. I checked the Context module code and found that Context was overriding theme_blocks! It uses this to output block content through it's own system, unfortunately there appears no other way to hook into the block content other than using the theme function.

    If you want your theme to be compatible with the theme_blocks function in your theme, you're going to have to add some code, as commented by the Context developer yhahn in context.core.inc:

    // Reroute theme_blocks() through context_blocks to determine block
    // visibility by context. Only override theme_blocks() if a theme
    // has not overridden it. It is the responsibility of any themes
    // implementing theme_blocks() to take advantage of context block
    // visibility on their own.

    Thus if your theme overrides theme_blocks you're going to have something like this:

    Author:JurriaanRoelofs

    Datum:3-6-'09

    Reviewing: Drupal 6 Javascript and jQuery

    The first review copy I received from Packt was Drupal 6 Themes. I was pretty unimpressed by that title and decided not to review it, since I didn't have much good to say about it. However, the Drupal 6 jQuery book by Matt Butcher is something else!

    Author:JurriaanRoelofs

    Datum:22-1-'08

    Theming a CCK Node

    It's easy to create a custom node with CCK, but what if we want to change how the node looks by default? It's a step up from theming your submitted and your terms code, but it's not really that hard. The main difference between theming the CCK node and the regular node is that in node.tpl.php, we have several content sections within a node, so rather than just printing $content, we will print out parts of the content individually. I will use code from the wallpaper node type of this site for my examples.

    Author:JurriaanRoelofs

    Datum:4-1-'08

    Drupal Adsense Trick #2: adblocks between teasers

    This article is the sequel to my first drupal
    adsense article
    . This time we're going to put adsense blocks in between
    teasers, on for example our frontpage. Same as last time, this does not require
    any modules, nor does it depend on adsense, it works with any phptemplate-based
    theme and with all sorts of ad code.

    For starters, we're going to create a new block
    region. If there is not a template.php file in your theme folder, create one
    and open it up. See if there is a block
    regions function, if there is, add a new
    block to it: 'betwteasers' =>
    t('between teasers')

    If you didn't find a block region function copy this
    code into your template.php file (this code should be in between <?php and
    ?> tags):

    function yourtheme_regions() {
    return array(
    'right' => t('right sidebar'),
    'left' => t('left sidebar'),
    'content' => t('content'),
    'header' => t('header'),
    'footer' => t('footer'),
    'subnav' => t('subnav'),
    'betwteasers' => t('between teasers'),
    );
    }
    
    Subscribe to RSS - theming