files

drpkg and relations svn

The bryght repository seems to be down.

So here are the urls to the drpkg and relations svn repositories maintained at MEC by me. I will be syncing them to bryght regularly.

svn://mec0026.engi.cf.ac.uk/relations
svn://mec0026.engi.cf.ac.uk/drpkg

To checkout the relations code do:
svn co svn://mec0026.engi.cf.ac.uk/relations

To checkout the drpkg code do:
svn co svn://mec0026.engi.cf.ac.uk/drpkg

Update: It is back up, but I’ll keep both in sync.
Update: repair

read more


Relations Battle Plan II and first results

I uploaded the first version of the relations module to the Bryght svn repository. I intend to use it for easier management and brainstorming. When the module is considered alpha quality it will get into drupal’s contrib cvs, maybe earlier. I don’t want to pollute it earlier than nessesary.

current status

The bulk of the sql query generation has been done. An initial working version of the url parser, implemention a simple relation definition language parser has been done.

the critical things todo

There are a few things, which need to be done in order for the api to be properly usable. The main show-stoppers are the relation nodeapi and themeing of the output. I haven’t done anything on the nodeapi side, since I’m not sure about the UI. Needs experimenting. For the themeing, I need to think through themeing based on the field meta-data. Thes goes dangerously into the cck teritory. If anyone has any ideas, please come up and shout.

read more


Relations API - query generation and TODO

OK, I was talking, talking, writing, fuming - here is some code. Please comment. I need some feedback. I need help as well - to make this better. The file is attached to this post.

Some explanation is probably needed, or I might end up scoring even higher mad hatter points. My previous scribbles on relations give background on my thoughts on this. So I won’t be repeating them. The goal is to produce an api, which can be used to form predicates, essentially queries on various related things. One and the same relation can be used in many ways. For example in a simple triple - (subject,predicate,object) or (left,relation,right), we can have four different questions - the free variables being subject and object. Things get more complicated when you consider relation tuples with a length more than two. This is the main reason to try and create a query generator.

Now some implementation details. The RFS() function. The parameter passing is a bit awkward. It is not elegant, but I had to solve a particular problem there. Consider that the arguments can be generated using a different RFS function. Consider as well that $arg1 and $arg2 can be generated separately or as part of a single expression. There is a need to pass the arguments (signatures essentially) by name, so we can identify them properly, but the order is not guaranteed or even worse, the order and the number of arguments, as well as their shape can’t be known in advance. This leads to what I consider a not elegant, but workable solution. I would love to streamline that.

read more


Relations in drupal links

A collection of relations in rupal related links. Add more in comments.

read more


Once again relations, or the need to focus on smaller parts of the big picture. A rant.

After reading The Need for RDF Linking - Module Proposal, RDF Metadata and this comment I felt the urge to engage in writing this spewage.

The aim of the relations “system” I’m working is to capture the structure of a relation domain. Nothing more. Not to try to interpret the meaning of a relation, not to try and build ontologies, semantic networks, not to store different metadata, etc… Not at all.

You might ask why. Well the main reason is that I think that is not a consern for this particular module. I want it to be able to interpret structures well enough, that there is a way to express out of the box more complex things, that we can do now in drupal. As a side effect, we will end up having a library or API with wich we can express things like this thing is a tree. This thing is a graph. This thing is a set of things. this is an ordered set, and the distance between A and B is x. Things like that.

read more


nodes related to this one by tags

Nasty title. Never the less, the first hurdle is done. Time to wrap up the code. You can see this working on any post within this website. For example this one - you should notice the “Similar content” block. Links are ordered by number of ‘my’ tags present. As simple as that.

I had a silly problem. mysql 4.0 doesn’t support sub-selects, the way my original implementation was coded. Silly, because I spent hours debugging this, without even thinking to check the version.

end result: mysql 1 - vlado 1

I have my test cases for relations now. So things should be out in the wild soon