• Whats wrong with the following serialized array? Why does it show me only 1 column named “no data” when i’m creating a table with this data?

    a:3:{i:0;a:3:{s:8:”dinotype”;s:4:”Allo”;s:9:”baselevel”;s:3:”172″;s:9:”fulllevel”;s:3:”172″;}i:1;a:3:{s:8:”dinotype”;s:4:”Allo”;s:9:”baselevel”;s:2:”41″;s:9:”fulllevel”;s:2:”49″;}i:2;a:3:{s:8:”dinotype”;s:4:”Allo”;s:9:”baselevel”;s:3:”178″;s:9:”fulllevel”;s:3:”178″;}}

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter toooni

    (@toooni)

    Can be closed. Its simply not possible to do a really dynamic table with your plugin.

    I need the following which is simply not possible:

    1. php script which generates the json output based on some user meta-data. (Done).
    2. I want to include this script for the datatable
    3. 2nd isn’t possible because the script isn’t runned in user-context when implemented in the datatable. The dynamic data based on the user-meta can’t be generated by the script when executed by datatables.

    So you can’t: Create a table dynamically based on some datas of the logged in user.

    Tryed things:
    – Adding variables dynamically to the shortcode which is implemented in a site. –> Doesn’t work…shortcode is somehow executed before the php code in the site?!

    – Creating table based on serialized array –> Doesn’t work. The script isn’t executed in the user-context.

    – Creating table based on a dynamic json output of a php script –> Doesn’t work, the script isn’t called in the user-context and therefore i can’t generate the data there.

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi there,

    It is possible, not with the lite version though.
    One option would be to use the %CURRENT_USER_ID% placeholder, another one would be to use filters and hooks that are built into the plugin.

    As for the initial question – please make sure that the file that returns serialized PHP array also returns a 200 HTTP code (it might be necessary to call header(“HTTP/1.1 200 OK”); in the file).

    Thread Starter toooni

    (@toooni)

    Thanks for your answer. Unfortunately not what im looking for.

    You can close this thread, I will create a new one with a more specific question.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why this serialized data doesn’t work?’ is closed to new replies.