[Lancaster] Lancaster Library

Richard Robinson llug_6a at beulah.qualmograph.org.uk
Thu Nov 26 02:31:55 UTC 2009


On Wed, Nov 25, 2009 at 07:04:02PM +0000, andy baxter wrote:
> Richard Robinson wrote:
>> While I've mentioned it, Andy - do you have the hang of Drupal's system of
>> nodes ? I've not used it, or looked at it; I'm just acquiring data from
>> outside and having the php display it, but I suspect there might be
>> advantages if I reworked it to put that code inside their node callbacks (or
>> integrate it otherwise) - is that something you can comment on ?
>>   
> The basic idea is just that everything (apart from users) is a node, so  
> a module that (e.g.) allows comments on static pages will also work for  
> any other page without any messing about.

Yes, that's the sort of thing I was suspecting. Which would probably be very
useful.

> I don't know much about how nodes work internally. I think the idea is  
> that there is one database tables called nodes, which has the most basic  
> information connected with every node - e.g. node id, title, user id,  
> node type, modified date etc. Then any extra info which is relevant to  
> the specific type of node (e.g. forum post) is kept in a separate table  
> and referenced back to the nodes table with an id. It's a bit like  
> subclassing in object oriented languages. Can't help much beyond that.
>
> There is a good API reference on the drupal site, so you could start by  
> browsing around that a bit?

Oh, I have been (*grin*). I find it a bit obscure (free-software
documentation is a separate rant) but it has a lot of good stuff once you
discover it (annoyingly, often Google works better than its internal links).
Looks like the php behaviour is done via lots of hooks, I guess I have to
create node-types in some pointyclicky way for my modules to be, I wonder
what else ... ?

cheers.

-- 
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem




More information about the Lancaster mailing list