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

howto delete items on create content pages

I created a module to add a new "Product" content type.

but on the create Product page, i'd like to remove these items:

  • Log message block
  • Authoring Information block
  • Publishing option block
  • Preview Button

how to do that ?

Taxonomy bock - or replace

Hi people,
I´am searching for mudule that can create blocks on taxonomy or like a usual post.. This knew "taxonomy block" - but for Drupal ver. 5 is´t developed.. My quesion is : When will be taxonomy block, (provided it exist somethng else with same functionality) developed ?

Thx for reply :
Michal P.

agree to terms modul

hi...has someone a solution for following case:
i think it's very usefull to add a checkbox at the beginning of the register-process. the only thing i found is the legal-modul....but there's no update for drupal5 (yet) and the head-versiont doesn't do the job!
can you please help me?!

Login to Drupal via URL parameters

Hi,

I was wondering if someone form the community already has experience with logging in users via a couple of parameters in the url. (I didn't quite find what I was looking for yet by searching around here.)

Jeopardy Module

I have two problems, one of which is relevant minor, and one of which is critical to my module working.

I have defined a new node type, called a 'Jeopardy Game' which allows users to submit questions and then from those questions create a game of Jeopardy (themed with CSS and using Javascript to hide/unhide the questions). I've got most of the code working, but I'm having trouble with the actual saving of the information.

I've created a table in the database, and it is mostly being updated correctly except for the question/category fields. Since the number of fields is set in a settings callback, I need to be able to adjust what is inserted into the database each time. Can anyone help me with the proper syntax for this?

Also the minor problem is that the form fields aren't being presented in the order I've created them, so I need to figure out how to fix that as well.

Here is my relevant code so far:

<?php

/**
* Implementation of hook_form().
*/
function jeopardy_form(&$node) {
$rows = variable_get('number_of_questions', 5);
$cols = variable_get('number_of_categories', 5);

$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Name of game - should be unique!'),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5);
$n = 0;
for ($j=1;$j<=$rows;$j++) {
$n++;
$form['category'][$j] = array(

Selecting the first element with jQuery while avoiding errors.

I have noticed that when people write a selector and want only the first element they often write something like $('#someid')[0].somefunction(), the problem is if there are no elements returned by the selector this returns and error since the subscripting '[0]' fails. By re-writing this as $('#someid').eq(0).somefunction() the code works the same and avoids the javascript error if nothing matches the selector.

Pages

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