See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

Cut the CSS Fat

Hey all. I'm relatively new to Drupal in the past six months and overall I love it. In general, the Drupal sites I've developed are relatively easy to maintain and the community built around the CMS is responsive and helpful.

However, there is one thing that keeps on tripping me up: there is all sorts of additional markup that is generated that is just plain unnecessary for the display and styling of pages. I'd like to explore the feasibility of reducing some of the markup that is output in future versions of Drupal (probably beginning with v7 since v6's core code was just frozen, right?).

Here's an example of what I'm talking about. The primary links on one of my sites:

<ul class="links primary-links">
<li class="first menu-1-1-2"><a href="favorites" class="menu-1-1-2">My Favorites</a></li>
<li class="menu-1-2-2"><a href="product" class="menu-1-2-2">Store</a></li>
<li class="menu-1-3-2"><a href="forum" class="menu-1-3-2">Message Board</a></li>
<li class="last menu-1-4-2"><a href="categories/all" class="menu-1-4-2">Browse Categories</a></li>
</ul>

There's no reason to repeat the class on the li's and the descendant a's since you can style descendant selectors via css. That is, if you wanted to style the first link based on its class, you could just use the following css markup

li.menu-1-1-2 a {
/*whatever my style is*/
}

Poll Module DOESNT WORK!

When i set to users dont view how many votes was on the POLL... IT DOESNT WORK!
Since 4.7 versions it DOESNT WORK!
I really need to set this OFF... How to do it????

<strong>How to create blog through drupal in my site</strong>

Hi,
I want to apply the google blog facility on my web site. Although i have insatalled the drupal and apply my html themes in the drupal themes, but its not coming in the proper way.
How and what i should do.

sanchit dubey

#type => file inside fieldset no-worky?

I'm trying to organize a number of fields inside of a fieldset and upload fields ('#type' => 'file') don't work. The reason is they get "subclassed" differently in the forms module. Here's my fieldset declaration

 $form['submission'] = array(
    '#type' => 'fieldset',
    '#tree' => TRUE,
  );

Now when I put my uploads like this they work fine

   $form['thumbnail'] = array(
      '#type' => 'file',
      '#title' => t('attach your thumbnail here'),
   );
   $form['design'] = array(
      '#type' => 'file',
      '#title' => t('attach your submission here'),
   );

and the rendered code comes out like this

<div class="form-item">
 <label for="edit-thumbnail">attach your thumbnail here: </label>

 <input type="file" name="files[thumbnail]"  class="form-file" id="edit-thumbnail" size="60" />

</div>
<div class="form-item">
 <label for="edit-design">attach your submission here: </label>
 <input type="file" name="files[design]"  class="form-file" id="edit-design" size="60" />

However, when I subclass them into the fieldset like so

   $form['submission']['thumbnail'] = array(
      '#type' => 'file',
      '#title' => t('attach your thumbnail here'),
   );
   $form['submission']['design'] = array(
      '#type' => 'file',
      '#title' => t('attach your submission here'),
   );

Problem with print an array using print_r

Hi guys,

I have a question on the print_r() method. I know that we can used this function to print out an array. My problem is if i got too many elements in the array, the print_r() could not return a nice look print out. For example:
print_r($array) may have result of:

How to Properly Apply Labels for Checkboxes and Radios - Solution

Disclaimer

I searched all throughout Drupal to find a solution for this problem, but failed. Therefore, I was forced to hack my own. I am very new to PHP, so if there is a better way to do this, please share. This is just what I found to work for me. Also, I hope I'm posting this in the right section. :-)

Background

A label defines a string of text that is associated with a particular form element. When a user clicks on this text, the focus is set to the associated element. Drupal automatically creates labels for each element in a form.

The Problem

The labels that Drupal generates are applied two different ways. For textfields, textareas, etc. they are set up with the label before the form element. The for attribute of the label corresponds to the id of the input element:

<label for="element-id">Field Name:</label>
<input type="text" id="element-id" />

For checkboxes and radios, the form element and the text for the label are nested within the label tag itself. No for attribute is applied to the label, and no id is created for radio buttons. (Though there is an id created for checkbox inputs, it is useless for this purpose w/out having the for attribute on the label):
<label><input type="checkbox" />Check this box!</label>

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core