User login

Drupal Theming

Taking it to that level with cufon

So you've got yourself a solid drupal theme, and now you're sitting back looking at your work and thinking that it's good, but it could still be taken to that level.

Well, replacing some titles, basically some h1s and h2s with custom rendered fonts is one way to get it there, and using cufon is the answer. Sure, you could use the Dynamic Rendering module and sifr and do pretty much the same thing, but c'mon, cufon just sounds cooler than sifr... and it'll only take you about ten minutes to do this

and we all know quick and easy is the answer...

Getting Views as Data with Drupal 6 Views 2

Is there a standard way to get views as data? (to count the rows and such) or is it expected that this will be done in the preprocess functions, and views methods always return themed output?

Kathleen worked around this by making changes directly in the theme's views-view.tpl.php.

Alternatively,

<?php
function pdtheme_preprocess_views_view__contributions(&$variables) { //...
?>

should let you see the variables. see if $rows exist, and in theory decide how to output from there.

Typography resources

Periodic Table of Typefaces. [mostly for fun]

http://drupal.org/project/austin - a Zen subtheme with the Mark Boulton touch. [I have to confess I don't get what's so much better]

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:

  <script type="text/javascript" language="javascript">llactid=14159</script>
<script type="text/javascript" language="javascript" src="http://trackalyze.example.com/trackalyze.js"></script>

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.

Syndicate content