Guillaume Bec's picture

France24 releases nodeselect code!

Nodeselect is a module developed by Vincent Caillerez for France24. I've "extracted it" from the france24 site source code and i'm now in charge of the module.

This module was created to improve the nodereference CCK fields.
This field only searches by title, and performs a search for each letter that the user types.

The module runs a quick search engine. The user can filter node by title, creation date, status.
Then they can drag and drop the node into a nodereference field and change the order of the field (for multiple value fields).

 nodeselect demo

This module doesn't change the database, or create a new content type. It only changes the interface.

The module needs javascript and minimum version 1.2 of Jquery. (jquery module)

 

 Installation:

  1. Place this module directory in your modules folder (this will usually be "sites/all/modules/").
  2. Enable the module.
  3. Activate the bloc "Moteur de recherche NodeSelect".
  4. Select the cck field nodereference which has to be modified by the module (in the nodeselect settings).

 

Todo:

We haven't released this module on drupal.org yet because it's not complete.

But we really want to, so we need your help.

  • Prepare the module to be released on http://drupal.org
  • Complete and translate the documentation in english.
  • Try out the drupal search engine.
  • Optimize the javascript code.
  • Give users other things that will be able to be customized in the settings.
  • ...

 

Demo

Play around with the module: http://demos.lab.france24.com

 

Download

You can download a version of the source code (see attachment).

We will soon put this code on a public svn so everybody can help us before we move the module onto http://drupal.org

AttachmentSize
nodeselect-20080716.tar_.gz22.58 KB

Status Update

What is the status on this module? Is it still going to be released to drupal.org?

Guillaume Bec's picture

Status of Nodeselect

We stoped all development on the D5 version of the module, but the good news is that we made an update for D6.

We still working on it, but i hope we can release a version soon.

Drupal 6

Wow it is a great module!
Is there any plan to update nodeselect to Drupal 6?

Comments

Uh... need rewrite all comments in english & add t( " " ) on all strings :)

Guillaume Bec's picture

Yep this is my next task.

rewrite all in english and test the module with "coder"

webastien's picture

A first quick patch...

To simplify install, just add this hook on the nodeselect.module.
This will activate the block without have to do it yourself.

No problems with the choosen region (the first found) because our block is displayed in absolute position.

"code needs work" ;)


/**
* Implementation of hook_enable.
*/
function nodeselect_enable() {
_block_rehash();

if (!($theme = variable_get('admin_theme', FALSE))) {
$theme = variable_get('theme_default', 'garland');
}

$regions = system_region_list($theme);
$region = array_shift(array_keys($regions));

// See block_admin_display_submit()
$query = "UPDATE {blocks} SET status = %d, region = '%s' "
. "WHERE module = '%s' AND delta = '%s' AND theme = '%s'";

db_query($query, 1, $region, 'nodeselect', 0, $theme);
}

JBI's picture

We are ready to package it

One of our developer is working on it from tomorrow 7AM :)

We love Drupal !

Thank-you France24.

Jean-Baptiste Ingold (for Nalis)

webastien's picture

Kewl !

Better name than "Va chercher bonheur" :)
But "nodeselect"... hum... I'm sure it will be easy to add the same functionnality to user ref.

So this name will be quickly restrictive, no?

webastien's picture

Better explain

I'll try to better explain what I had in mind...

A basic search form to retrieve users is not very usefull...
But a form like "User who have submit..."

- all / page / story / other node type
- between ... and ...
- named like ...
- ...

In fact a form which seems like current nodeselect but to get the author...
This could be very usefull to admin of sites with large users.