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.
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.