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

Free the Books module!

I'm just wondering if anyone else feels the same way:

1) I prefer books to taxonomy as *most* of my site is hierarchical.

2) That makes books more logical for viewers and non-techie users of the site.

3) The 'Outline' feature ROCKS!

4) But it would be great to be able to have two parents.

I know that kinda veers into taxonomy territory, but even if it was something like a distant parent, or step-parent (with breadcrumbs still honouring the primary parent), I think it would be a big improvement to the books module.

A killfile module for Drupal

A few weeks ago I had some inspiration and decided to make a killfile module (4.7 RC1). Today I thought it was time to get it finished: http://pctips.ustilago.org/plonk

The only thing the module does, is keep a user list, mark what comments* shouldn't be displayed and display a block. The provided template.php (& comment-folded.tpl.php) does the rest.

Comments marked 'hidden' by kill_file can be styled by comment-ignored.tpl.php. Folded comments can be optionally styled by comment-folded-ignored.tpl.php.

hook_user, logout question

I've been developing a module that interfaces with a third party application. When a Drupal user logs in, the hook_user catches the login and sets the appropriate cookies/makes the appropriate database queries so the user is also logged into the other application. I would like to remove those cookies when the user logs out but there seems to be a problem.

Maximum execution time of 30 seconds exceeded in ODBC related

I am getting the famous

"Maximum execution time of 30 seconds exceeded in "

error message in my customized module which makes ODBC connections to a DB. The error points to the line where the ODBC connections is actually doing "while( odbc_fetch_row( $result ) )" any suggestions on what the cause of the error might be? is it a slow ODBC connection or something I might be doing wrong in Drupal.

thnx!

Q: making function date_header work

Could someone help me understand better how this function can be put into Drupal's default node listings, or into one of the common listing snippets ?

function date_header($timestamp, $format = 'F j, Y') {
  static $last;
  $date = format_date($timestamp, 'custom', $format);
  if ($date != $last) {
    $last = $date;
    return $date;
  }
}

I'm having a hard time getting my head around it.

Thanks, Case.

(apologies for the cross post, if anyone picked this up in post-installation questions)

Possible Date Preview Bug - help to confirm?

Good morning,

I think I've found a bug in 4.7, but since I'm relatively new to drupal, I hoping someone else can confirm it before I post a bug report.

I believe the bug is related to this post.

When creating a form element of type "date" when using the new forms API, it looks like the date that the user sets isn't displayed correctly when previewing the content. I've created a tiny module to demonstrate:

<?php
function DatePreviewBug_node_info() {
  return array('DatePreviewBug' => 
   array('name' => t('DatePreviewBug'), 
         'base' => 'datepreviewbug'));
}

function DatePreviewBug_form(&$node) {
  $form['title'] = array(
    '#type'=> 'date',
    '#title' => t('Test Date'),
    '#required' => TRUE,
  ); 
  return $form;
}

function DatePreviewBug_view(&$node, $teaser, $page) {
	$node->body .= theme('DatePreviewBug_view', $node);
}

function theme_DatePreviewBug_view($node) {	
  $output = 'Test Date: ' . date('l, F d, Y', $node->title);
  return $output;
}
?>

Once installed, go to: node/add/DatePreviewBug, change the "Test Date" to a different date, then hit the "preview" button. You'll (hopefully!) see that the entered date is ignored in the preview.

If someone can confirm that my test module is set up correctly and this really is a bug, then I'll go ahead and submit a bug report.

Pages

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