-
Notifications
You must be signed in to change notification settings - Fork 20
Importing CSVImport into an existing module
xurizaemon edited this page Sep 14, 2010
·
2 revisions
Today I’m using csvimport for the purposes it’s intended, ie quickly bootstrapping an importer based on the csvimport codebase.
Some notes on importing csvimport.module to an existing module (let’s call it “logdemon”). Adding notes as I go.
- copy the entry from csvimport_menu() into logdemon_menu() and modify the paths accordingly.
- uncomment the ‘file’ value in the _menu() and modify according to filename of the .inc file you’ll use (I used logdemon.csvimport.inc).
- modify the ‘page arguments’ parameter in menu() to ’logdemon_csvimportform’
- copy remaining functions into logdemon.csvimport.inc
- bulk-replace ‘csvimport’ with ‘logdemon_csvimport’ in logdemon.csvimport.inc
- grab another coffee and a yummy treat