I am trying to put together a module that would use Plaxo api and import contacts from Plaxo into drupal database as a table and then display it in different ways. I am new to writing modules and might need a push or two in the right direction.
So as of now, I have a custom table with data called {plaxo} that is as of now independent of other drupal tables, I have been trying to figure out what is the best way to display data from the table but was not able to find any info on how to do it the drupal style. I am reading Pro Drupal Development, but it is going slowly.
It would be nice if people could suggest some things or point me in the right direction.
Say I select a bunch of rows from a table, what is the best way to display them on a page ?
Thanks in advance.
Comments
In general terms to display the data
In general terms to display the data it helps to have a module. In which case you would need a callback function so your module would need to implement hook_menu and the callback function at a minimum. You function can then use db_query() to do a SQL SELECT, looping through the data and formatting in some way.
You could also write a views definition for your table and use the views module.
Import into User & Profile tables, or into CCK tables
One way to handle it is to import into tables that Drupal already uses, such as the 'user', 'profile_fields', and 'profile_values', if appropriate. Drupal will display those and you can also theme them. If not appropriate, you can create tables using the CCK module, import the data into those tables, display the data using the Views module, and you can theme that as well. You can set your module to be dependant on CCK and Views in the .info file and create the required tables in your .install module once you use CCK to design them corrrectly.
BTW, will you be contributing this module to the community? I'm very interested in any modules that work with Plaxo, Facebook, LinkedIn, and Meetup.com, in reverse order of importance. I will be writing any for which there are none available to the community, and I will contribute mine to the community.
what exactly is a views
what exactly is a views definition
i have a diamond database filter i want to import into drupal (i currently use Joomla)
however i don't see how to incorporate it