This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

latout collapse

hi i find difficulty in adding images to my article...when i do so the layout becomes nasty.. is there any fix..?

Saving Form Fields

I'm new to module development and I'm wondering where I would save data inputted from the user for my custom field. I have my own databases table structure so I'll be doing my own sql queries, but I'm really unsure how and where I can actually get the input information when the user hits the submit button. Is it in the hook_widget for the submit operation? If that's the case, when I save something and print out the contents of $field and $items, I don't get anything returned from those arrays so I don't know how to access the data being submitted. Is there an existing module I can refer to as an example?

This is what I have for my code so far. Basically I'm building a custom field for adding rows of ingredients, with 3 columns.


<?php

function ingredients_field_settings($op, $field) {

switch ($op) {

case 'form':
return form;

case 'callbacks':
return array(
'view' => CONTENT_CALLBACK_DEFAULT
);
}
}

function ingredients_field($op, &$node, $field, &$items, $teaser, $page) {

}

function ingredients_widget_info() {
$info = array(
'ingredients' => array(
'label' => t('Ingredients'),
'field types' => array('ingredients'),
),
);

return $info;
}

function ingredients_widget_settings($op, $widget) {

Block that knows what node[s] are displayed?

I am writing a module to define a new type of block
I am trying to create a block that displays additional information about the currently displayed node (if in single node view) or nodes (if on front page/term view).
How do I get a list of currently visible nodes from within my module?

Content Type-Specific functions in Print.module

Can anyone point me to the code within comment.module in which content type-specific settings are set and/or evaluated? I'd like to give a shot at enabling the same kind of content type-specific functionality for the print.module.

Help Needed-I am new To Drupal

HI I am New To drupal...(I got two problems clarified earlier here thatnks for that)..

*** I need To add Some code below header And above Footer Where to add..Which file to be modified..

*** I Need To attach My Adsense Code With all the articles...........
Can this be done ..please help waiting for your reply..

Module .info files should not define "version" in CVS

Greetings, Drupal developers who maintain modules in the Drupal contributions CVS repository...

As per the thread on the development mailing list about this topic, there's no longer any reason for module maintainers to ever define the version attribute in the .info files they commit to CVS. The packaging script on drupal.org adds the correct, human-readable version string to all downloadable tarball packages automatically. The only reason to define version attributes in the .info files commited to CVS was to help the power-users who deploy Drupal sites from CVS, but those people now have the CVS deploy module to use, instead. See also the handbook page on writing .info files for modules for more. Many maintainers and users have been confused about this, and lots of maintainers are currently doing it wrong.

After various discussions with the other CVS administrators, we've decided it would be better and cleaner to simply remove the version = * lines from all the .info files in all of contrib, all at once, instead of waiting for module maintainers to slowly clean this up. This forum post is just here as another FYI about this decision.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions