Hi and thank you for this module,

The settings work for all the CT. However, for the blog entry content type, it seems to not work. I always have the choice between different input formats although I restrict them to full HTML in the admin/settings/filterbynode ...

Thank you for your help

R

Comments

Anonymous’s picture

I too am having this problem, but from reading the other issues raised it looks as if it works ok for some. Did you manage to fix this?

Crell’s picture

Project: Filter by node type » Drupal core
Version: 5.x-1.x-dev » 6.x-dev
Component: Code » blog.module

I believe this is caused by the blog module not using the same form structure as user-defined nodes. There's no way for me to hard-code every node-making module's form structure, so I just support those that mirror the core default. That's easy to do, though, by just pulling the default node form, so refiling this over to core's blog module to fix in Drupal 6, hopefully.

Crell’s picture

Title: Blog CT » Blog module doesn't follow standard node form structure?

Changing title to be more useful...

Anonymous’s picture

OK, but do you know any other way I can achieve what I need - a different default and only import format for blogs?

I'm using TinyMCE and I need the import format to be different for that than the system standard so the user notifications are sent out with line breaks but the TinyMCE doesn't use line breaks. At the moment, the only way I could see to do that was to use this module, but it didn't work for blogs, hence my commenting on this issue...

Crell’s picture

TinyMCE doesn't play nice with the HTML filter, and a few others. That's a well-known limitation of WYSIWYG editors, and not related to this module in particular.

The issue with different form structures, however, is an issue that should be corrected if possible.

dpearcefl’s picture

Status: Active » Postponed (maintainer needs more info)

Is this still a problem in current D6?

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Active
deekayen’s picture

Version: 6.x-dev » 7.0
Status: Active » Closed (fixed)

This was fixed in D7 if I read this correctly.


 /**
- * Implementation of hook_form().
+ * Implements hook_form().
  */
-function blog_form(&$node) {
-  global $nid;
-  $iid = isset($_GET['iid']) ? (int)$_GET['iid'] : 0;
-  $type = node_get_types('type', $node);
-
-
-  if (empty($node->body)) {
-    // If the user clicked a "blog it" link, we load the data from the
-    // database and quote it in the blog.
-    if ($nid && $blog = node_load($nid)) {
-      $node->body = '<em>'. $blog->body .'</em> ['. l($blog->name, "node/$nid")
-    }
-
-    if ($iid && $item = db_fetch_object(db_query('SELECT i.*, f.title as ftitle
-      $node->title = $item->title;
-      // Note: $item->description has been validated on aggregation.
-      $node->body = '<a href="'. check_url($item->link) .'">'. check_plain($ite
-    }
-
-  }
-
-  $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type-
-  $form['body_field'] = node_body_field($node, $type->body_label, $type->min_wo
-  return $form;
+function blog_form($node, $form_state) {
+  return node_content_form($node, $form_state);
 }