WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

Clone this wiki locally