Hi folks,<br><br>I&#39;m new to module building and am working on a dynamic org chart module, a node type that displays an org chart via Graphviz with data pulled dynamically from LDAP/Active Directory.<br><br>I already am using ldap_integration and profile module to pull in the data for a phone directory.<br>
<br>My questions:<br><br>1. where in the module should I place code that actually queries user profiles and converts profile data (there is a reportsTo field that defines relationships) to graphviz dot syntax? Functionally, it would need to happen when a new node is created, or an existing node is updated. Should I add a custom function in the module for pulling this data based on the &quot;top&quot; user, and then call that function in hook_insert and hook_update?<br>
<br>2. data storage - in my install file, I create a new table (orgchart) with nid, vid, top, and depth. How should I be storing the &quot;top&quot; data - username or uid?. Does there need to be some kind of index or foriegn key to relate &quot;top&quot; to the record in the users table?<br clear="all">
<br>Thanks in advance,<br><br>-- <br>Dan Katz<br><br><a href="http://dankatz.net">http://dankatz.net</a><br><a href="http://twitter.com/mtndan">http://twitter.com/mtndan</a><br><a href="http://del.icio.us/mtndan">http://del.icio.us/mtndan</a>