Support » Plugin: Participants Database » Loading Data without [pdb_signup]

  • I have an external plugin that have a lot information I want to include in participants database from different sources. With some PHP (and a lot of time since I am not professional programmer) I was able to collect all the data into a simple array with “field_name” and “field_data” pairs. I can easily real all the data using foreach. I also have PDb working fine, after reading the forum and your website this is working nice.
    Now I must load all this data (about 60 fields, five groups) into participants database, send the e-mail with “magic” edit-link to the user and enjoy PDb to manage the data once collected.
    How can I load this data array into PDb database, similar to “submit” button into signup shortcode? I have all the information, I have the same field names… But I don’t need forms, button, etc. and of course cannot use the shotcode directly. The source code in Signup and Shortcode class was far too complex for me to understand (all that OOP…) and I could not find any solution for this.
    Maybe you can help, maybe there is a function call, an action (?). I have to “submit” the data using PHP into your nice plugin, can you help somehow?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Oh, we are approaching christmas and I was not polite enough in my request.
    I must say you plugin is really nice and I wish the best for you in 2017.
    Merry christmas! 🙂

    • This reply was modified 1 year, 6 months ago by  celsocos.
    Plugin Author xnau webdesign

    (@xnau)

    I’ve given this some thought and I can’t come up with an easy solution to this . The plugin is set up to import data using a CSV text file. These are easily generated using a spreadsheet application, so if your data is in a spreadsheet, then you can use that to generate the CSV. All you need to do is set up your target fields in the plugin, then set up your CSV to match the field names on your export.

    If you’re starting with a PHP array, the only thing I could think of to do with that is to write a simple script that writes that data to a new CSV file, which you could then import. I don’t want to recommend that you write to the database directly as that will run into other complications that using the import will avoid.

    Hello xnau.

    I agree, direct write to database may have some unpredictable results.
    Reading your documentation I found Participants_Db::write_participant.

    After some work to build an associative array correctly, I was able to insert the data without messing with database, using code below.

    $PDb_id = Participants_Db::write_participant( $db_data );

    My initial test shows this is working, do you belive this is good enough?

    Best regards.
    Celso.

    Plugin Author xnau webdesign

    (@xnau)

    Yeah, that will work, I didn’t think of that…good one!

    Xnau, the plugin is working fine and I was able to finish the integration with my web-site. To have a better experience, I am waiting for some time a Portuguese Translation.

    I made the translation in the wordpress site and I have more than 500 strings pending approval! It’s a lot of work that I believe you cannot see yet. Can you please ask for someone to check and approve the Portuguese-Brazil translation? I can fix if something is fuzzy.

    I can translate, but cannot approve. You do not speak Portuguese, so we need someone else for this. Not sure if the plugin author must request this. (?) Will be nice to have PDb in my local language, and good for you another complete translation.

    Congratulations,
    Celso

    🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Loading Data without [pdb_signup]’ is closed to new replies.