• Resolved cralox

    (@cralox)


    Hi there,

    I am very new to data importing from external websites, (is there a tutorial that can help me).

    I need help to add JSON code to tablepress.

    How do I add / edit the code from source to tablepress, to have each cell with its own content.

    Do I need a JSON content importer or any other plugin as such to make this work?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, you will need to write a custom JSON format converted. TablePress can only import JSON arrays of arrays, i.e.

    [["row 1, col 1","row 1, col 2","row 1, col 3","row 1, col 4"],["row 2, col 1","row 2, col 2","row 2, col 3","row 2, col 4"],["row 3, col 1","row 3, col 2","row 3, col 3","row 3, col 4"]]
    

    but not other structures (from APIs etc.)

    Regards,
    Tobias

    Thread Starter cralox

    (@cralox)

    Hi there,

    Thank you for your reply, so I am unable to use the tablepress plugin for what I would like to achieve or can I use tablepress with custom JSON format converted.

    Sorry, just a little confused.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    if you develop some sort of intermediate interface that maps from your API’s JSON format to a table structure JSON format (like above), you can use TablePress to display that data.

    Regards,
    Tobias

    Thread Starter cralox

    (@cralox)

    Hi,

    Ok, So would you suggest I could send the API to Google docs then pull the information from GD to tablepress, if this is doable will the site be slow?

    Thanks again for your help.

    Regards,

    Craig

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Craig,

    how often would you want to import from Google Docs? That’s the question. And of course the size of your table will play a role.

    It might therefore be better to directly write e.g. a PHP script on your server that regularly fetches the data from your API and displays it.

    Regards,
    Tobias

    Thread Starter cralox

    (@cralox)

    Hi,

    I would like to import at least once every 24 hour period, and there would be about 20-30 rows. I think its relatively small.

    Your plugin is neat, an very easy to use, that why I have selected your plugin.

    Could the PHP script be added to the plugin or will this need to be done separately.

    Regards

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    with a daily import of 30 rows you will not run into problems. The Google Docs solution could work then.

    The PHP script would be separate. It would be the intermediate actor that TablePress would “call” for an import, and it would then retrieve and re-format the data from the API.

    Regards,
    Tobias

    Thread Starter cralox

    (@cralox)

    Hi,

    Okay great. I will take a look at both options, thank you for your help.
    I will let you know how I go.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem! Always happy to help!

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Add JSON to tablepress’ is closed to new replies.