pelloquin.com >> the web factory

data import for sobi2
Écrit par Cédric Pelloquin   
22-04-2008
Index de l'article
data import for sobi2
Aide en français
Help in english
 

 

 

 

 

 

Preamble : I'am Swiss and speak french. I dont have study english, sorry per advance for my poor english.

 

Read the first page too for more infos 

 

What is Sobi2 ?

It's a free adress index bookmark writted for joomla by Sigsiu, more infos at sigsiu.net. Many modules and plugin are avaible (free and not free).
With SOBI2 you can create and manage your own custom fields.

Why a importation script ?

At this day (04.2008), it's no way to import datas into SOBI. Sigsiu is currently developping a import/export plugin (probably not free).

[article update] SOBI provide now a import-export plugin!

The data importation is complex in SOBI, because the data base structure is complex too. That take a big time to import any data via sql queries.

Why not an official plugin ?

Because the plugin structure is most complex for this little script and too expensive.

What can this script :

 - Import data from a CSV file (spreadSheet).
 - Import data into the custom field from SOBI.
 - Each entry can be set into 5 categories
 - The programm can import any type of data (textarea, text, listbox, checkbox).
 - You can choise the owner of the entries.

Know limitations :

 - Unable to import images, logos, backgrounds...
 - Unable to import data from plugins (galery, mp3, video, ...)
 - The entries is inserted into the first corresponding category. If your category structure is like  :
       CatParent 1
          CatChild 1
          CatChild 2
          CatChild 3
       CatParent 2
          CatChild 1
          CatChild 2
          CatChild 3
       CatParent 3
          CatChild 1
          CatChild 2
          CatChild 3
and if you want to insert your entrie into the CatChild 2, the program take the first occurence : CatParent 1 > CatChild 2
 

And if the script dont work for me ?
The script was tested on many installation, with good results and has imported thousands entries. If after correction, tests and updates, the script dont work for you, I refound you 50% of your paiement.

Process

Installation

01/ Install the script like a standard module.
02/ edit the module to set it 'published'.
03/ Publish it only for the 'Special' group.
04/ Warning the module is not graphical compatible with the template

Creation of the CSV file


01/ Open your favorite spreadSheet editor (excel, openOffice, ...)
02/ goto www.votreSite.com and access in frontend to the new installed module.
03/ click on 'CSV header'
04/ the header of your file is created from your sobi installation.
05/ copy (or import) the header into your spreadSheet, you have now a title for every column
06/ fill the values
    - The TITLE column content the titles of the entries
    - The CAT_n colomnus content all the categorie where the entries was inserted
    - The field_x columns contents all values (go to your SOBI2 custom field manager to see the correspondances).
   
Sample :
    [...]TITLE;CAT_1;CAT_2;CAT_3;CAT_4;CAT_5;field_email;field_name;field_website
    [...]AutoShop;Garage;Petrol;;;; Cet e-mail est protégé contre les robots collecteurs de mails, votre navigateur doit accepter le Javascript pour le voir ;Mr. Bean;www.domain.com


Note : The data type 'list box,' and 'check box' must be imported with the option name and NOT the option value. A little sample ?
    The field 'field_type' has the following values :
        field_type_opt_1 - red
        field_type_opt_2 - green
        field_type_opt_3 - blue
       
    The CSV file must be like that for the green value : :
    [...];field_type;field_type_opt_1;field_type_opt_2;field_type_opt_3;[...]
    [...];;;field_type_opt_2;;[...]
   
    See that the field_type has no value.
   
The check box traitement is similar.

Note 2: Its VERY important that the fields typ list box and check box are NOT placed at the end column of the CSV file. Otherwise this rules, the order of the columns is not important.

 

Importation


01/ Make a backup of your SOBI data base.
02/ goto www.votreSite.com and access in frontend to the new installed module.
03/ Copy the content of the CVS file in the textarea.
04/ Choice an owner for the new entries.
05/ Choice the separator
06/ Clique on 'Test' (the data base is not affected).
07/ After you have solved the messages (if necessary) the programm write it's ready.
08/ Click on 'import'. Warning the data base are modified. This operation is irrevocable.
09/ Goto SOBI2, empty the cache, make a recount (from SOBI 2.8.5)

Responsability

I cannot be reponsible for any problem, data lose, time lose and all other perturbation. you use this script at your own responsability. MAke allways a bakup of your data bases.
 

 

DOWNLOAD VIA THE SHOP 



Dernière mise à jour : ( 15-06-2008 )
 
Suivant >
Pelloquin Cédric © 1999-2008 | plan du site | Accueil arrow data import for sobi2 | login