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: / 9
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 44 guests online
strelin_cms Create unlimited user types and levels with STRELIN CMS. ACL which is better than Joomla. http://bit.ly/dxh2Gw
by strelin_cms. Link: API
joomla_forum General Questions/New to Joomla • Site Not Loading All Modules/Page Information… http://goo.gl/fb/YSrJU Joomla Forum
by joomla_forum. Link: Google
sigsiu_net Great #Sobi2 powered site: Profesional tour operators on the main island of St. Vincent http://sobi.it/h.fe/ #Joomla #CCK #Jos
by sigsiu_net. Link: Sigsiu.NET
joomla_forum General Questions/New to Joomla • Re: Which forum software is most compatible… http://goo.gl/fb/dAlYx Joomla Forum
by joomla_forum. Link: Google

Google AdSense