How can I add custom classes to form elements

I would like to be able to make more specific CSS changes to some create form elements, but there isn't much specificity in Drupal's elements.

Specifically, I am looking for how to hook into the function where the class names are written for the taxonomy SELECT element, and insert additional class names into the taxonomy elements. (

For example, instead of just this appearing in the element:
class="form-select required"

I want to output this:
class=" form-select required select-terms"

I assume I can hook some function in template.php of my theme, but I just can't find the function to hook, nor do I know just how to do it. I'm more a designer than a programmer, but i can make do, if someone could be nice enough to give me a fairly explicit example or doc reference.

Thanks in advance.

FYI. This is an example of what gets output now, for just one fieldset containing the taxonomy select elements"

Vocabularies

Topic-sections:
* Goverment

Help customizing theme_menu_item for a single menu

I've been trying to figure out how to customize a menu that is generated by the system. I currently have the menu set up as a block for the sake of simplicity, but I'd like to be able to incorporate it into the Drupal menu system.

I have set up a duplicate menu as the one I have in the block at the moment, and have been trying to configure the output of the HTML generated for the menu itself.

Rather than have the output be the default:

<li class="leaf"><a href="/page" title="Page Desc">Page title</a></li>

I'd like to have the href wrapped in a header tag, in this particular case, H2's would wrap the "a" tag. However, I DO NOT need or want this to apply to every generated menu, but only a single specific menu.

I can understand how to do this easily if I wanted to modify the theme_menu_item in my own template.php file, and apply the H2 wrapper to EVERY menu item in every menu, but I'd like to be able to reference this particular menu by ID or something similar to only theme this specific menu, and allow the normal functionality for other menus.

<?php
/**
* Generate the HTML output for a menu item and submenu.
*
* @ingroup themeable
*/
function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));

Drupal is up and running but how do I ...Get answers on this forum?

Hi there

I've now posted 2 questions to this forum (http://drupal.org/node/229017 and http://drupal.org/node/212383).

I've checked the tone of my writing and gone over and over the questions themselves to try and determine whether they're just too stupid for anyone to bother responding to - and at least I don't think they are???

Marking posts as Read

Hello,

On release of Drupal 6.1, I became a Drupal user and joined this forum.

Each day, when I select recent posts I get 9,000 pages of 20 posts each: 180,000 posts, some 6 years old.

I can't see a way to mark all those older posts as read, or ?

How do others use this forum?

Thanks,

Steve

Missing Weight select on Block Admin

Drupal 5.x has the weight selection. But it disappears from Drupal 6.x

Slashdot-style comments

All too often popular sites get flooded with useless comments which would be nice to hide by default from common visitors.
There are several comment moderation methods out there, but after careful examination it becomes apparent that Slashdot comment moderation system is superior to all: http://slashdot.org/moderation.shtml

I propose a module that implements Slashdot comment display/moderation system for Drupal.

Below is preliminary code for the module.
It does the following:
1. Transforms comment control toolbar (adds threshold field, removes date sorting, simplifies display modes)
2. Overrides default comment_render function from core because comment_render is neither a hook or a themeable function.
3. Adds moderation form to every comment. Moderation form is an exact copy of Slashdot moderation form.

What is lacking:
1. AJAX moderation of comments.
2. Displaying collapsed/expanded individual comments depending on the comment's rating and the user's threshold.

Todo:
1. Hook up with Karma.

Delf.

File slashcomments.info

; $Id: $
name = Slashcomments
description = Upgrades default comment system to Slashdot comment system
dependencies[] = comment
dependencies[] = votingapi
core = 6.x

File slashcomments.module

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x