Make multiple relations from one node to others using an autocomplete field. Arrange their order and limit per node type what node types should be relatable.
Exposes a panels pane for displaying related content.
Integrated with lightbox, so that users can add new related nodes in a lightbox popup, without having to browse away from their current node. The newly added node is automatically added as a reference to the parent node.

http://drupal.org/sandbox/kummel/1107656

Comments

joachim’s picture

This looks like it's for D7.

There is already work being done on this over at http://drupal.org/project/relation.

dysrama’s picture

The module is meant for drupal 6, I'm not working with drupal 7 yet.

joachim’s picture

There are several node relation modules on D6 already AFAIK.

dysrama’s picture

I agree that there are other node relation modules out there, but, as far as I can see, none that has integrated adding of new related nodes in lightbox? They might have panels integration though.
Also, the comparable modules I have found have are not maintained.

dysrama’s picture

Status: Active » Needs review
tim.plunkett’s picture

Status: Needs review » Needs work

Have you looked at either Nodereference Explorer or Modal Nodereference yet?

Please elaborate on your modules differences from those existing projects.

dysrama’s picture

Hi
Thanks for looking at the code.
I can see that nodereference explorer's functionality and my module's is quite similar, and that nodereference explorer has a more elaborate search interface, but the main difference between the two is that my module is not a CCK extension. My main reason for writing this module was that I needed the functionality for non CCK nodetypes, and I guessed that there would be other people in need of this as well.

lslinnet’s picture

Hey Kümmel,

Did a rather quick code-review of it:
- $Id$ should be removed, these are not used by Git and as your aware Drupal have moved away from CVS
- Multiple lines end in whitespace.
- line 290: would be nice if you could wrap this into multiple lines.
- Space before and after operator line 408-410.

Ideas:
- Make the size of the lightbox configurable

Will take a closer look at the functionality later today, but based on a pure code view of this project I don't see any problems with upgrading it to a full project.

dysrama’s picture

Hi lslinnet
Thanks for your remarks.

- §Id$ removed
- Sorry about the whitespaces, ran coder and got that cleaned up
- line 290 -> done
- Spaces fixed.

Nice idea about configurable lightbox size, I'll look into this.

New code is uploaded.

lslinnet’s picture

Perhaps a package name that is less implementation specific :-)

package = Egmont_digital

also...

There is a minor security hole in your code which potentially exposes all node titles both published and unpublished nodes.
Perhaps checking for some other access arguments than 'access content' on the menu callback, perhaps 'administer nodes' would be the better choice or alternatively add a new access permission specifically for this module.

joachim’s picture

> the functionality for non CCK nodetypes

Can you explain what you mean by this? Every node type is CCK-able.

> is that my module is not a CCK extension

Really, most things added to nodes nowadays ought to be a CCK field unless there's a really good reason.

lslinnet’s picture

> Can you explain what you mean by this? Every node type is CCK-able.
My guess is that this doesn't require CCK.

> Really, most things added to nodes nowadays ought to be a CCK field unless there's a really good reason.
They by no means ought to be CCK - there are several reasons for not using CCK.
- Better control of your datamodel.
- makes it easier to add optimized data indexes.
- You don't accidental delete your data when removing a field from your datamodel.
- Keeping your datamodel in a version control system.

dysrama’s picture

> Can you explain what you mean by this? Every node type is CCK-able.
As lslinnet answers, this module will work for custom node types as well as CCK node types, it just doesn't require CCK to work (as many of the other node relation modules do)

> Really, most things added to nodes nowadays ought to be a CCK field unless there's a really good reason.
Please see lslinnet's response, I couldn't have said it better myself.
I work on mainly large scale setups, where complete control of my datamodel is essential for scalability, which is why I for the most part opt for a non CCK setup.

> lslinnet, I'll of course fix the package info :) and take a look at the security issue right away, smells of a copy/paste error on my part :D

joachim’s picture

> this module will work for custom node types as well as CCK node types

Yes but my point is that these terms don't make sense. There are two types of nodes:

- defined by modules in hook_node_info
- defined by the admin in the node admin UI.

You don't need CCK for either of these things, and once you have CCK, you can add fields to either of them.

So -- I don't get what the OP means by 'non CCK nodetypes'.

dysrama’s picture

Hi Joachim
Sorry for the misunderstanding, I just mean that this is a way of referencing nodes without use of CCK. The modules that are being referred to as the equivalent of this one, expose a CCK field for node referencing. This module does not.

dysrama’s picture

New version committed, I removed the package info, and changed my access argument to "administer nodes" as suggested, so that the autocomplete function doesn't expose unpublished node titles.

lslinnet’s picture

Status: Needs work » Reviewed & tested by the community

I have no further comments, this module seems ready for a promotion.

joachim’s picture

> changed my access argument to "administer nodes" as suggested, so that the autocomplete function doesn't expose unpublished node titles.

Does that mean you only get the use the autocomplete with that permission? That's a bit draconian... ;) The better way would be use http://api.drupal.org/api/drupal/includes--database.inc/function/db_rewr....

dysrama’s picture

Hmm, I can see your point. And I have no wish to be draconian! :)
I'll implement db_rewrite_sql instead.

dysrama’s picture

Fixed and commited.

rfay’s picture

Status: Reviewed & tested by the community » Fixed

OK, Git vetted user role granted. Thanks for your present and future contributions!

Please review other applications in this queue so we can get the queue down.

Thanks for your patience in this process.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.