User login

Drupal Theming

Switch to a working theme via the database after deleting a theme leads to WSOD

OK, maybe there are other situations where this can come up but in this case my esteemed colleague deleted the only enabled theme. This resulted in a White Screen Of Death (WSOD). A database fix was about as fast and more what was wanted (the deletion was intentional, just not the WSOD) than rolling back to a version with that theme (called mydeadtheme here to protect the innocent).

From the command line on your test server or local development environment:

Using jQuery to auto select text in a field

So you've custom themed a search bar into your brand spanking new custom theme using my handy tutorial covering that topic (http://www.agaricdesign.com/note/theme-search-form-drupal-6)

Displaying taxonomy terms differently according to their vocabulary

This is how one would embed it in a node.tpl.php, but this should all be done in a pre-process function instead.

Adding tracking code via template.php

Adding custom tracking Javascript confused me on doing it the Drupal way.

When the goal was adding:

Drupal's collapsed fieldset labels disappeared in Firefox due to unclosed tag

If you have problems with collapsible fieldsets staying permanently collapsed because you cannot click on their titles (because the titles do not show), I frankly have no idea what the odds are that your problem is the same as mine.

But here is what my problem was:

Theme the Search Form in Drupal 6

So it's 1am and you want to theme the search form output of your brand new drupal 6 theme, here's the quick and easy one step guide that will get you though it. Yep, that's right, 1 step, because that's how we do it the agaric way...

Resolution

STEP 1 of 1
Paste the code below into into your trusty template.php file and customize to your heart's desire... (leave out the php open and closing tags, we use em to make the output look nice, with pretty colors and stuff...)

Use h1 for front page site name and strong for interior pages' site name display

For semantic correctness (your site's code saying what it means) and search engine optimization, your site's title should be in level one header (h1) tags on the front page and something else, such as strong tags, on all other (interior) pages.

Remove "Add comment" links from teasers

See and report to:

How to disable "Add new comment" at teaser part, but "Read more" remains
http://drupal.org/node/151648

Hi Brian,

So the Drupal user interface wasn't enough? You had to make a custom node template? It took us a few months to notice the new options for displaying fields, but now we use it a lot instead of node-TYPE.tpl.php files. And I'd be interested what in that post needed updating for Drupal 6!

Be sure to register templates moved to module layer, and moving functions from template.php to module

Using FileMerge to compare (Mac OS X graphical diff), no differences between the page.tpl.php in the scf_base theme and the page.tpl.php I have in scf.module.

But the site doesn't look the same at all. That means the reason moving template files to the theme layer failed is because I am not calling them right.

Had to put them in hook_theme_registry, of course.

Once that was done, progress began in earnest. Breaking the site, of course.

Syndicate content