See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

Controlling of $node->title/body/teaser/... content

Currently is not possible control content of body/teaser using nodeapi. Only weak support via node_view() {node_invoke_nodeapi($node, 'view', $page)} is implemented. But it's not enough because node is not always rendered via node_view(). For example when listing nodes (/taxonomy/term), (/book), main page and more. If is rendered book.module print friendly page then is called directly book_content and no chance to change anything.

Of course, check_output() enables change everything via filter but rendered content it's cached (unless is switched off for whole filter group).

Suggest one would like to write module that will always change only small piece of content. For example:

  • prepare picture that will be displayed next to title (if exists)
  • add list of similar nodes that changes dynamically
  • append "Printed: "today's date" at the bottom line

BTW: Drawback of node_invoke_nodeapi() is that there is no control in what order are module hooks processed (in alphabet order). Maybe it worth implementing a api interface to enable forcing different order. But I have no idea how to do quickly and commonly

I think that new nodeapi hook should be implemented and invoked from node_prepare() that is called always.

function node_prepare($node, $teaser = FALSE) {
  $node->readmore = (strlen($node->teaser) < strlen($node->body));
  if ($teaser == FALSE) {
    $node->body = check_output($node->body, $node->format);
  }
  else {
    $node->teaser = check_output($node->teaser, $node->format);
  }
  node_invoke_nodeapi($node, 'prepare', $teaser);  // <------------ new hook
  return $node;
}

Tomas

Hacking into form_textfield, for good cause

Please excuse if this is the wrong forum for this, but i'm not sure where else.

I have a new module that lets users track company info. But i want to make the admin edit form look more distinct than the generic drupal form. For example, i'd like to put it all in a table and have the labels in the left cell and the form fields in the right.

The form_textfield function rocks (thanks!) but would it be smart of me to think of trying to add another parameter for having the form label to the left rather than above the form?

What path to use when deciding which blocks are active - the front page

Drupal 4.5.1., using the new i18n module.

I have a site that needs to be both in French and in English, and the anonymous user should be able to switch during a session.
The user must get a user menu, based on the language he is using at that point in time.
The i18n module makes it possible to use en/about and fr/about for the French and the English version of the about us page.
The blocks module has the possibility of having a block active based on the path for the node we're currently viewing. So, if the path starts with fr/ the French menu shows, and if it starts as en/ the english menu shows.
i18n also makes it possible to have two frontpages, differing by their language code.
Now the problem : when one goes to the page without any ?q, the standard home page,
the correct path to the frontpage is created in the $_GET[q].
But the blocks module does not use $_GET[q] , probably not to be misled by path mapping, and ( in function block_list) opts for using request_uri() in order to get back at the original URL.
The use of this function means that frontpage node rewriting and the blocks module do no go well together.
Drupal has a multi stage process in order to get to the right node, and one should have a standard way of getting at them

  1. The original URL as typed by the user, or followed as link
  2. The node as found by variable_get('front page') in common.inc, and on a per language base in i18n_init()

what's Drupal Head?

Hi,
What's the difference between 4.5 and Head?
Is Head a beta version of Drupal?
Thanks!

Most effective way to use Drupal CVS (what are the features/changes?)

Just wondering, what are some of the more important features/changes that have been implemented in Drupal CVS? I'm aware of the multisite capability, which really impressed me (nice solution, btw), but what are some of the other changes that have been implemented?

and what are the possibilities with these new changes/features?

Sharing content among drupal sites (DRUPAL CVS)

I haven't delved too far into Drupal CVS yet, but I have it installed and I'm slowly working my way into it.
Lemme just say, I'm glad you guys are working on this, because I had to come up with my own multisite solution for xoops, and being the only developer on the multisite project makes it a slow task.

For my xoops/multisites modifications, I created a Site ID variable that allowed me to modify modules and xoops itself, so that I could add content, and associate it to certain sites (or allow it to be displayed on ALL sites)

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core