This forum is for assistance with theme development.

Making Drupal Taxonomy Links Happy with rel-tag specification

I've recently been fighting to get technorati to pick up tags from my drupal site. I discovered that we're still not really confroming to the spec for the rel-tag microformat:

http://microformats.org/wiki/rel-tag

Becasue the end of all taxonomy urls is a numeric ID, the tags are read by spec-mindful web services as numbers. This can be solved on a tag-by-tab basis with path_aliases, but I need an automagic solution.

With a little investigation, it became clear that additional arguments on the url will be ignored by taxonomy.module by default, so I made an override for theme_links() that tacks on a rel-tag-friendly addition to the url.

This only works with clean_urls enabled, but if you don't have those on, you're screwed in any case:

function phptemplate_links($links, $delimiter = ' | ') {
  if (!is_array($links)) {
    return '';
  }
  if (variable_get('clean_url', FALSE)) {
    // this only works for clean urls
    $newlinks = array();
    foreach($links as $link) {
      if (strstr($link, 'rel="tag"')) {
        $result = preg_match('!\>([\w\s]*)\<!', $link, $tag);
        $link = preg_replace('!href="([\w\/]*)"!', 'href="${1}/'.drupal_urlencode($tag[1]).'"', $link);
      }
      $newlinks[] = $link;
    }
    return implode($delimiter, $newlinks);
  }
  else {
    return implode($delimiter, $links);
  }
}

HEAD has the new and shiny hook_link_alter, which will provide a much "cleaner" way to do this, but for now I think this works.

FriendsElectric and Tables don't mix - white space problem

When I add content to my site that contains table markup, it adds an endless amount of whitespace before the content. Has anyone else had this problem with this theme? As soon as I remove the table tags, problem solved.

IE Layout Question

If you view my site with IE, you will notice quite a large empty space between the logo and the top-links (contact | tag cloud | navigation).

In Firefox everything looks great and this space does not appear.

I would really appreciate any help in finding out why this is happening.

(I am using a modified version of the Chameleon theme. The only things I modified are colours, background images, width of the content and sidebar areas. This space was there even before the changes.)

Thanks.

News portal - Don't know where to begin. See the layout here.

Hi,

I'm new to Drupal and CMS'es. I am familiar with php/MySQL (not an expert in any way). Furthermore I am very good at CSS and XHTML (this isn't bragging - I just want you to put yourself in my shoes for a while..).

I have this site that I want to make using Drupal. The layout is clear, see the links below:

(note that you cannot click the links here, it's just the layout, no functionality yet..)

Can I remove the title and option to link to an inside page?

On the front page of my web site, I'm want to display a couple of content blocks. These blocks should not link to an inside page by default. Plus, I'd like to display a flexinode field without the title and allow the content creator to format the text to display.

Can this be done, if so how?

Help with CSS color problem.

I can't seem to change the background color of the grey boxes that show as the module config area, etc.

See small image of what I am talking about: here Pictures worth a 1000 words.

I did try to search here for the answer, but I was unable to find anything exactly.

Thanks,

-Eric

Pages

Subscribe with RSS Subscribe to RSS - Theme development