Drupal Theming
Your mom likes IE6!
Your mom likes IE6. It is true. Most likely, it is because it is all she knows. So, to all the mom's out there, we love you and appreciate all you have done. We would just appreciate it more if you changed your browser and upgraded to Firefox. But, we would settle for IE8, even IE7.
Testing assisting module: set configurations through site's URL
RoboConf
module
http://drupal.org/project/roboconf
commissioned by Top Notch Themes
test their themes
only way they could do this with a 2-3 person company
security nightmare, should never go anywhere near a production site
in the URL, you give it parameters - logged in, logged out, blocks
RoboConf will configure your site to the setup of the url
Printing an arbitrary menu just like primary_links and secondary_links
You can find out your menu name by going to admin/build/menu and hovering over it-- the name is a text string, separating the words in the menu title with dashes, and all lower case.
In your template.php
<?php
function agarictheme_preprocess_page(&$vars) {
$menu = menu_navigation_links("menu-name-here");
$vars['special_menu_name'] = theme('links', $menu);
}
?>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.
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
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).
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.
<?php
// here it is all together, expect normal typos:
$normal_terms = '';
$special_terms = '';
foreach ($taxonomy as $tid => $term_object) {
$term_name = $term_object->name;
if ($term_object->vid == 3) {
