0cg0
Forum Replies Created
-
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Check existing data in tableHi,
with a little tweaking it worked.
Thank you
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Check existing data in tableOk, I think I’ll subscribe.
But I wanted to ask if I can use TablePress PHP functions to read table from code?
Tried this$table_id = '123';
$num = $_GET['table_filter’];
$table = TablePress::$model_table->load( $table_id, true, false );
if ( $num === $table[0][0] ) {
echo 'found';
}
but it does not work!
Thank you.Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Dynamic IDHi Tobias,
obviously everything works great!
Your suggestions are always valuable and professional.
Thanks again for your availability.
RegardsForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Dynamic IDHi,
thanks, kind as always!
I’ll have to do some testing.How should I transform the shortcode
[test_table_cell id = 123 column = 2 /]found on page-C?Thank you
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Dynamic IDHi Tobias,
thanks for the answer and sorry if the question was confusing, my english is not the best.
Page-Aandpage-Bhave a link topage-C(i.e.https://example.com/page0/page-C?test=3).
Inpage-Cthere is the schortcode[test_table_cell id = 123 column = 2 /]which returns theROWnumber of thetable 123contained inpage-A.
To linkpage-B(which containstable 456) topage-C, I have to create a copy ofpage-C(i.e.page-C1) where I insert the schortcode[test_table_cell id = 456 column = 2 /].
The problem is that I have to create manypage-C(i)for each table.So I already have a schortcode (
[test_table_cell id = 123 column = 2 /]) and I would like to make dynamic only the tableID, but I always need the shortcode[test_table_cell]to get theROW.Maybe I should edit
[test_table_cell]:add_shortcode ('test_table_cell', 'polywogg_tablepress_cell_test'); function polywogg_tablepress_cell_test ($ atts) { if (empty ($ _GET ['test'])) { return; } $ atts ['row'] = absint ($ _GET ['test']); return tablepress_table_cell_shortcode ($ atts); }It can be done?
Thank you- This reply was modified 4 years, 3 months ago by 0cg0.
Great Tobias,
it works very well.
It seems more solid to me than the Javascript solution.
I’ll do some in-depth testing tomorrow.
Thanks again, you are always very kind.
GreetingsHi Tobias,
the string in the cell is always the same but the generated HTML is dynamic:
=<a href="<?php echo esc_url( '/directory/' . $_GET['xyz'] . '?test={ROW}', ENT_QUOTES); ?>">READ</a>
Do you have any idea how I could do it?
Thanks for the reply.Hi Tobias,
it works thanks.
The problem is that it only works with static strings, in my case I generate the url dynamically with php, and therefore it doesn’t work.
Maybe just with a php solution it could work, but I didn’t understand if I should insert the Shortcode you suggest directly into the cell.
Thanks for the reply.Hi Tobias,
but throughcolumnDefs:is it possible to overwrite the cells?
Thanks for the reply.Hi Tobias,
the problem is not to populate the column but to avoid writing the same string thousands of times.
Is it possible to overwrite cells with custom commands or with a php function?
Thanks for the reply.Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Row numberHi,
thanks again, I replaced the string and it works perfectly.
Thanks for the reply.
RegardsForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Row numberHi,
thanks it works fine.
I would like to ask you something else.
In the formula I populate the link dynamically with$_GETand for safety I thought it better to sanitize it.
My full formula is:=<a href="https://test.com/<?php echo htmlspecialchars($_GET['abc'], ENT_QUOTES); ?>?xyz={ROW}">READ</a>In your opinion is this sanitation sufficient?
Does Tablepress perform a general sanitization on the strings present in the tables? And if so, can I delete my
htmlspecialcharssanitization?Thanks for the reply.
RegardsForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Row numberThanks Koustab.
The site is under construction and I cannot make the pages publish!
If you tell me what to look for, can I try to give you the value you need?
Let me know.Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Custom searchHi,
I wanted to update you.
The Row Filter Extension mechanism with filter_full_cell_match=true + GET works.
Only the affected record is loaded.I had to add a mechanism to prevent the table from being invoked without a valid GET, because otherwise all records are exposed in the source.
Thanks again for the tip.Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Custom searchHi,
ok, I’ll try.
Thank you