Joomla Jumpstart

  • Increase font size
  • Default font size
  • Decrease font size
Home Professional Joomla! Hacking Joomla! Joomla Contact component Information Parser

Joomla Contact component Information Parser

E-mail Print PDF
User Rating: / 12
PoorBest 

Here is a small chunk of code added to the Administrator interface of the com_contact component that will parse raw text into separate contact fields.

 

Parse Contact Info display

Whenever I want to transfer contact data from one PIM to another, I find it frustrating to individually copy and paste each field. Particularly, I needed to transfer contact information from Goldmine software into the Joomla! contact manager. Rather than copying and pasting the separate fields, I added a small text-parsing pane to the existing interface of Contact.

ParseContactInfo is simple to use. You just copy the contact info from any source and paste it into the new raw text field. Check the boxes to indicate what data is found in the raw text. Select the field delimiter (either carriage returns or tabs) and click the Parse Text button. The individual pieces of information will be extracted from the raw text and placed in their individual fields.

I have spliced ParseContactInfo into the SVN code of the admin.contact.html.php from last night (8/1/2007) and attached the complete file here.

The additional code is delimited by comments Start ParseContactInfo and End ParseContactInfo. I have tried to fully comment the code to make it as helpful as possible to other developers. You can easily copy and paste the individual lines of code into your existing file or replace the original file at this path:

/administrator/components/com_contact/admin.contact.html.php

It seems that having this little feature as a separate component would be a little excessive. The Joomla! team is free to integrate this into the base code, if users are interested. I may add comma-delimited parsing later.

Hope you find it useful!

Download the source here

 

Who's Online

We have 18 guests online

Warning: file_get_contents(http://search.twitter.com/search.json?q=joomla hacking%20name and address parsing%20contact component) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/content/d/a/n/danr72/html/modules/mod_twitter/mod_twitter.php on line 76

Warning: shuffle() expects parameter 1 to be array, null given in /home/content/d/a/n/danr72/html/modules/mod_twitter/mod_twitter.php on line 93

Warning: Invalid argument supplied for foreach() in /home/content/d/a/n/danr72/html/modules/mod_twitter/mod_twitter.php on line 94

Google AdSense


Coffee and Cream Publishing