code removal part 2

ray007 - March 21, 2007 - 19:51
Project:Node Family
Version:5.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

always happy to remove lines, lonely nodes and pageroute integration are gone with this patch.

AttachmentSize
nodefamily-code-removal-2.patch5.29 KB

#1

ray007 - March 21, 2007 - 21:10

Btw: do you know who the users of the content-type-max stuff are?
Looking at functions like nodefamily_content_type_is_max() this doesn't really have anything to do with nodefamily ...

#2

fago - March 22, 2007 - 13:58

I know, it doesn't suit perfectly. The users are basically the users of the nodeprofile module, as the nodeprofile uses this to restrict the node population to 1.
But controlling how much nodes can be in a relation, does fit somehow - consider it as setting whether it's a 1:n, 1:1, 1:5, n:n .. relation.

#3

fago - March 22, 2007 - 14:01
Status:needs review» fixed

oh, I forgot - commited! thanks!

#4

ray007 - March 22, 2007 - 14:20

I know, it doesn't suit perfectly. The users are basically the users of the nodeprofile module, as the nodeprofile uses this to restrict the node population to 1.
But controlling how much nodes can be in a relation, does fit somehow - consider it as setting whether it's a 1:n, 1:1, 1:5, n:n .. relation.

You express it exactly right: you control the relationsships, but when you add a relation the 2 nodes already exist.
And the maximum population for a content type is independent of any relations ... as we see in nodefamily_content_type_is_max()

#5

fago - March 22, 2007 - 15:42

it is.. but not in every case.
I you have a user - node relation, it isn't ;) That is the case if the usernode module is installed.
So it would fit very well in the concept if we would also support user - node relations..

#6

ray007 - March 22, 2007 - 20:36

Yes, but those relations were anchored on the usernode and enforced by automatic type-to-type relationships.
Since we took out those, the enforcement of the lonely-nodes must move either to use usernode or to the nodesprofile module (where it imho belongs).
Or we re-introduce automatic type-to-type relationships, probably extended by a relation-name ...

#7

fago - March 22, 2007 - 21:05

yes, I initially said too we should remove that feature..

No, there won't be any automatic relations any more. However nodeprofile could add the user - node relation, but for that we would need support for users, what would mean much more changes.
I'm fine with just removing it...

#8

ray007 - March 24, 2007 - 15:57

Right now, several functions manipulate the nodefamily_relations variable, but without the nodeapi-insert and -submit hook code it seems to be of limited value.

The automatic relations always were only between the nodes of one user, and wouldn't make much sense outside that scope I think.
Or we need some extra flags to some functions ...
I can't really judge how many users rely on automatic relationships, and if it's better when they all called explicitly the relation_add and relation_remove functions.

I think there are 2 options: rip out all type-relationship stuff, or re-insert it (including the nodeapi stuff) extended by relation-name (and probably flag(s) for selecting intra-user / global and maybe more stuff).
Maybe the automatic type relationships should be an own module building on nodefamily?

Well, that were my thoughts on that topic for now, it's your call how to proceed and where you want to take your module(s).

#9

fago - March 26, 2007 - 20:15

all the automatic relation stuff has to go.. we don't need it any more :)
However we need to have a db of exisiting relations: type - type - relationname and settings. For this we still need the nodefamily_relations variable and some API functions for adding, removing of relations.

I thought about the user - node relation stuff, that's too much, we don't need that. So we can also remove the global population setting (=per user) and go with the per family populaiton settings.

#10

Anonymous - April 9, 2007 - 20:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.