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

Update disknode files

I use disknode in 4.7. To update the files I tried to install an FTP-Process this process
copy the new files (only the size is changing) but after this the downloades files using the disknode-link are corrupted.

Is there no other way then updating these files manually each time they change?

cant Add CCK field by modules

hi,

guys i want to implement a module for one of my project tht should add new CCK fields to existing drupal installation.

should this be achieved by module.install or is there any code that i can write in my module to do that.

plz suggest me the right way to achieve this functionality

Sharad

Using _POST in a CALLBACK to filter out some things

Hello,

I am developing a really cool Karma module (if I say so! :-D ).
I am having a bit of a problem with a (hopefully minor) issue.
I would like to show a page with the top ranking users. So, I have:

     $items[] = array(
       'path' => 'karma_users',
       'title' => t('Users by karma'),
       'description' => t('Users by karma'),
       'callback' => 'simple_karma_view_users',
       'access' => user_access('view users by karma'),
       'type' => MENU_NORMAL_ITEM)

And then a simple:

function simple_karma_view_users(){
  $result=pager_query(

    db_rewrite_sql('SELECT recipient_uid,sum(karma) as k from {simple_karma} WHERE  '.simple_karma_sql_duration('created') .' AND  recipient_uid <> 0 GROUP BY recipient_uid ORDER BY k DESC')
    , 100  );
  $data_row=array();
  while ($data = db_fetch_object($result)) {
    #drupal_set_message("R: ".$data->recipient_uid);
    #drupal_set_message("K: ".$data->k);

    $data_row[]=  array(
        theme('username', user_load(array('uid' => $data->recipient_uid ))),
        $data->k
     );
  }

  return "".theme_table(array(), $data_row, array(), NULL).theme('pager', NULL, 10, 0);

NOW, what I want to do is give the ability to filter by date. So, the user can select a FROM and a TO date.

How to hook into the _submit and _validate functions of existing form

Hi,

I'm trying to customize the privatemsg module by creating my own privatemsg_ext module that hooks into it. By using form_alter I added some form fields to the privatemsg_new_form.

Now I would like to overwrite the privatemsg_new_form_valdate and privatemsg_new_form_submit functions with my customized functions in my module. But I don't know how to do that. It seems that $form['#base'] only works if the functions corresponding to the form id do not exist (and they do exist in privatemsg).

How do I insert two nodes at once?

Here's the scoop...

I need to have the user create a 'contact' node. Within the 'contact' node, the user has the option to associate the 'contact' with a 'company'. The 'company' field auto-completes for 'company' nodes that already exist, however, if the entered 'company' doesn't exist, I need to have it automatically create a new 'company' node, both in the node table and in the associated 'company' table.

Linkpoint API for Drupal 5

I am in the process of reworking the Linkpoint API for Drupal 5. Im new to drupal and have run into a problem with the module. I keep coming up with Invalid XML. Here is the code:

Pages

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