iCagenda : une solution pour importer depuis un fichier CSV (ou autre) ?

Réduire
X
 
  • Filtrer
  • Heure
  • Afficher
Tout effacer
nouveaux messages

  • woluweb
    a répondu
    Bonne idée Christophe ;-)
    Faut juste gérer l'ID incremental.
    Tu penses qu'on pourrait aussi mettre le fichier sql par ftp dans le dossier où joomla met ses updates sql ?
    Pcq alors c'est encore plus simple pour un utilisateur lambda que de passer par phpmyadmin...

    Laisser un commentaire:


  • cavo789
    a répondu
    Bonjour Marc

    Si ce n'est qu'une et une seule table, alors un simple INSERT INTO en SQL ferait le job.

    Tu aurais un fichier en Excel avec autant de colonnes qu'il faut importer et une dernière colonne qui contiendrait une formule telle que ="insert into" où tu auras une concaténation des champs.

    Du coup tu as tes instructions sql qu'il suffirait de copier coller dans un écran phpmyadmin (faut donc que l'utilisateur ait accès).

    Cela te semble jouable ?

    Laisser un commentaire:


  • woluweb
    a répondu
    Salut lefabdu51 !

    Merci de ton intérêt

    Il y a plusieurs tables icagenda, mais je pense que tout ce qui nous intéresse (titre/alias, lien vers l'image, date, lieu, site et adresse) se trouve sur la même table, à savoir icagenda_events.
    Voici un exemple (aaargh, difficile de copier-coller un tableau dans cet éditeur visiblement...) :


    Code HTML:
         id asset_id ordering state approval site_itemid checked_out checked_out_time title alias access language hits created created_by created_by_alias created_by_email modified modified_by username catid image file displaytime weekdays daystime startdate enddate period dates next time place website email phone name city country address coordinate lat lng shortdesc desc metadesc params 13686 12273 10745 1 0 0 0 0000-00-00 00:00:00 How can Blockchain Change the Future? how-can-blockchain-change-the-future 1 * 742 2019-05-28 10:54:08 813     2019-05-28 10:54:08 813 hajarEUE2017 4 images/LOGOS/BRITISH_CHAMBER.jpg   1     2019-09-09 12:30:00 2019-09-09 14:00:00 a:1:{i:0;s:16:"2019-09-09 12:30";} a:1:{i:0;s:16:"0000-00-00 00:00";} 2019-09-09 12:30:00   British Chamber of Commerce in Belgium https://www.britishchamber.be/event/how-can-blockchain-change-future           Boulevard Bischoffsheim 11, 1000, Brussels, Belgium   0.0000000000000000 0.0000000000000000   <p style="text-align: justify;"><span style="font-size: 10pt;">We are pleased to welcome&nbsp;Mr. Pēteris Zilgalvis, Head of Unit, Digital Innovation and Blockchain, Digital Single Market, DG CONNECT   {"statutReg":"","accessReg":"","typeReg":"1","reg_deadline":"","maxReg":"","maxRlistGlobal":"","maxRlist":"","RegButtonText":"","RegButtonLink":"","RegButtonLink_Article":"","RegButtonLink_Url":"","RegButtonTarget":"0","atevent":"","first_published_and_approved":1}
    13686 12273 10745 1 0 0 0 0000-00-00 00:00:00 How can Blockchain Change the Future? how-can-blockchain-change-the-future 1 * 742 2019-05-28 10:54:08 813 2019-05-28 10:54:08 813 hajarEUE2017 4 images/LOGOS/BRITISH_CHAMBER.jpg 1 2019-09-09 12:30:00 2019-09-09 14:00:00 a:1:{i:0;s:16:"2019-09-09 12:30";} a:1:{i:0;s:16:"0000-00-00 00:00";} 2019-09-09 12:30:00 British Chamber of Commerce in Belgium https://www.britishchamber.be/event/how-can-blockchain-change-future Boulevard Bischoffsheim 11, 1000, Brussels, Belgium 0.0000000000000000 0.0000000000000000 <p style="text-align: justify;"><span style="font-size: 10pt;">We are pleased to welcome&nbsp;Mr. Pēteris Zilgalvis, Head of Unit, Digital Innovation and Blockchain, Digital Single Market, DG CONNECT {"statutReg":"","accessReg":"","typeReg":"1","r eg_ deadline":"","maxReg":"","maxRlistGlobal":"","maxR list":"","RegButtonText":"","RegButtonLink":"","Re gButtonLink_Article":"","RegButtonLink_Url":"","Re gButtonTarget":"0","atevent":"","first_published_a nd_approved":1}
    Comme toujours, mon approche est "keep it simple".
    Mieux vaut un petit script qui fait le job qu'une usine à gaz...

    A priori, les données seraient dans un fichier Excel, qui peut être exporté en csv.
    Puis il faut injecter le contenu dans le site (d'une manière aussi simple que possible pour un utilisateur lambda).

    <table class="table table-striped" id="dbr_results">
    <thead><tr>
    <td class="ghosted is_id">id</td>
    <td class="ghosted">asset_id</td>
    <td class="ghosted">ordering</td>
    <td class="ghosted">state</td>
    <td class="ghosted">approval</td>
    <td class="ghosted">site_itemid</td>
    <td class="ghosted">checked_out</td>
    <td class="ghosted">checked_out_time</td>
    <td class="">title</td>
    <td class="ghosted">alias</td>
    <td class="ghosted">access</td>
    <td class="ghosted">language</td>
    <td class="ghosted">hits</td>
    <td class="ghosted">created</td>
    <td class="ghosted">created_by</td>
    <td class="ghosted">created_by_alias</td>
    <td class="ghosted">created_by_email</td>
    <td class="ghosted">modified</td>
    <td class="ghosted">modified_by</td>
    <td class="ghosted">username</td>
    <td class="ghosted">catid</td>
    <td class="ghosted">image</td>
    <td class="ghosted">file</td>
    <td class="ghosted">displaytime</td>
    <td class="ghosted">weekdays</td>
    <td class="ghosted">daystime</td>
    <td class="ghosted">startdate</td>
    <td class="ghosted">enddate</td>
    <td class="ghosted">period</td>
    <td class="ghosted">dates</td>
    <td class="ghosted">next</td>
    <td class="ghosted">time</td>
    <td class="ghosted">place</td>
    <td class="ghosted">website</td>
    <td class="ghosted">email</td>
    <td class="ghosted">phone</td>
    <td class="ghosted">name</td>
    <td class="ghosted">city</td>
    <td class="ghosted">country</td>
    <td class="ghosted">address</td>
    <td class="ghosted">coordinate</td>
    <td class="ghosted">lat</td>
    <td class="ghosted">lng</td>
    <td class="ghosted">shortdesc</td>
    <td class="ghosted">desc</td>
    <td class="ghosted">metadesc</td>
    <td class="ghosted">params</td>
    </tr></tdead>
    <tbody>
    <tr><td class="db_value ghosted is_id"><div class="cell_content">13686</div></td><td class="db_value ghosted"><div class="cell_content">12273</div></td><td class="db_value ghosted"><div class="cell_content">10745</div></td><td class="db_value ghosted"><div class="cell_content">1</div></td><td class="db_value ghosted"><div class="cell_content">0</div></td><td class="db_value ghosted"><div class="cell_content">0</div></td><td class="db_value ghosted"><div class="cell_content">0</div></td><td class="db_value ghosted"><div class="cell_content">0000-00-00&nbsp;00:00:00</div></td><td class="db_value has_search"><div class="cell_content"><span class="search_string">How&nbsp;can&nbsp;Blockchain &nbsp;Change&nbsp;the&nbsp;Future?</span><span class="replace_string"></span></div></td><td class="db_value ghosted"><div class="cell_content">how-can-blockchain-change-the-future</div></td><td class="db_value ghosted"><div class="cell_content">1</div></td><td class="db_value ghosted"><div class="cell_content">*</div></td><td class="db_value ghosted"><div class="cell_content">742</div></td><td class="db_value ghosted"><div class="cell_content">2019-05-28&nbsp;10:54:08</div></td><td class="db_value ghosted"><div class="cell_content">813</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">2019-05-28&nbsp;10:54:08</div></td><td class="db_value ghosted"><div class="cell_content">813</div></td><td class="db_value ghosted"><div class="cell_content">hajarEUE2017</div></td><td class="db_value ghosted"><div class="cell_content">4</div></td><td class="db_value ghosted"><div class="cell_content">images/LOGOS/BRITISH_CHAMBER.jpg</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">1</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">2019-09-09&nbsp;12:30:00</div></td><td class="db_value ghosted"><div class="cell_content">2019-09-09&nbsp;14:00:00</div></td><td class="db_value ghosted"><div class="cell_content">a:1:{i:0;s:16:"2019-09-09&nbsp;12:30";}</div></td><td class="db_value ghosted"><div class="cell_content">a:1:{i:0;s:16:"0000-00-00&nbsp;00:00";}</div></td><td class="db_value ghosted"><div class="cell_content">2019-09-09&nbsp;12:30:00</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">British&nbsp;Chamber&nbsp;of& nbsp;Commerce&nbsp;in&nbsp;Belgium</div></td><td class="db_value ghosted"><div class="cell_content">https://www.britishchamber.be/event/how-can-blockchain-change-future</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content"> Boulevard&nbsp;Bischoffsheim&nbsp;11,&nbsp;1000,&n bsp;Brussels,&nbsp;Belgium</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">0.0000000000000000</div></td><td class="db_value ghosted"><div class="cell_content">0.0000000000000000</div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">&lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;span&nbsp;style="font-size: 10pt;"&gt;We&nbsp;are&nbsp;pleased&nbsp;to&nbsp;we lcome&amp;nbsp;Mr.&nbsp;Pēteris Zilgalvis,&nbsp;Head&nbsp;of&nbsp;Unit,&nbsp;Digit al&nbsp;Innovation&nbsp;and&nbsp;Blockchain, Digital&nbsp;Single&nbsp;Market,&nbsp;DG&nbsp;CONN ECT<span class="toggle-trimmed" id="trimmed-5d73aa51cfdcf-toggle"></span><span class="trimmed" id="trimmed-5d73aa51cfdcf">, and&amp;nbsp;Mrs&nbsp;Susi&nbsp;Förschler,&nbsp;As sociate&nbsp;at&nbsp;DFW&nbsp;Germany, who&nbsp;will&nbsp;take&nbsp;us&nbsp;through&nbsp; the&nbsp;current&nbsp;developments and&nbsp;what&nbsp;the&nbsp;future&nbsp;holds&nbsp ;for&nbsp;blockchain&nbsp;in&nbsp;the European&nbsp;Single&nbsp;Market.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;<br>
    &lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;span&nbsp;style="font-size: 10pt;"&gt;This&nbsp;event&nbsp;is&nbsp;exclusively &nbsp;open&nbsp;for&amp;nbsp;&lt;strong&gt;memb ers &lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;<br>
    &lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;span&nbsp;style="font-size: 10pt;"&gt;All&nbsp;publically&nbsp;available&nbsp; information&nbsp;&lt;a&nbsp;href="https://www.britishchamber.be/event/how-can-blockchain-change-future"&gt;HERE&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;<br>
    &lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;a&nbsp;href="https://www.britishchamber.be/event/inscription/1668313000012430003"&gt;&lt;span style="font-size:&nbsp;10pt;"&gt;REGISTRATION&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;<br>
    &lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;/p&gt;<br>
    &lt;p&nbsp;style="text-align:&nbsp;justify;"&gt;&lt;span&nbsp;style="font-size: 10pt;"&gt;#EUevents&lt;/span&gt;&lt;/p&gt;</span></div></td><td class="db_value ghosted"><div class="cell_content"><span class="null">&nbsp;</span></div></td><td class="db_value ghosted"><div class="cell_content">{"statutReg":"","accessReg":" ","typeReg":"1","reg_deadline":"","maxReg":"", "max RlistGlobal":"","maxRlist":"","RegButtonText":""," RegButtonLink":"","RegButtonLink_Article":"","RegB uttonLink_Url":"","Re<span class="toggle-trimmed hide-trimmed" id="trimmed-5d73aa51cfeda-toggle"></span><span class="trimmed" id="trimmed-5d73aa51cfeda" style="display: inline;">gButtonTarget":"0","atevent":"","first_pu blished_and_approved":1}</span></div></td></tr>
    </tbody>
    </table>
    Dernière édition par woluweb à 07/09/2019, 15h08

    Laisser un commentaire:


  • lefabdu51
    a répondu
    salut,
    tu sait comment sont organisés tes tables sql ?
    Un script d'import serait faisable.
    Surtout si tu maitrise le format d'entrée.....

    Laisser un commentaire:


  • iCagenda : une solution pour importer depuis un fichier CSV (ou autre) ?

    Bonjour à tous !

    Apparemment, iCagenda ne permet pas encore d'importer les événements via des fichiers CSV.

    Connaissez-vous une solution pour y arriver ?

    (n'importe quoi. Pas forcément avec une interface. Même un script)

Annonce

Réduire
Aucune annonce pour le moment.

Partenaire de l'association

Réduire

Hébergeur Web PlanetHoster
Travaille ...
X