Northwave
Forum Replies Created
-
Hi,
ok, I’ll have to come up with some other solution then 🙂
About the sorting, I noticed that it messes it up if you use a cell value like
5<span>some text here</span>So, it seems that if you have in “numeric column” with some text also in it (though the text is hidden or not), then it will not sort the column anymore as a numeric one.
But this sorting-case is not anymore a problem for me, now that it’s not possible to use <span>’s with formulas.Uups, found a typo, the span-code that I have used is
<span>[table-cell id=1 cell=J2], [table-cell id=1 cell=K2]</span>
Hi,
I have discovered a couple of problems with this extension 🙂
If I have a cell with the value of
=J2+K2it gives me a result of -1, which is OK. But then when I put the following in the cell=J2+K2<span>[table-cell id=1 cell=J2], [table-cell id=2 cell=K2]</span>
It gives me an error of!ERROR! illegal character '<'. I assume it is the<betweenK2andspan.Using <span> works if I have a normal numeric cell value of
-1<span>[table-cell id=1 cell=J2], [table-cell id=2 cell=K2]</span>
But that is not what I really want. I would first like to calculate a result and then when I hoover the cell it will display the used values in the calculation.Another thing that I noticed, was that if I used that span, Tablepress sorting did not work from negative to positive. It sorted the values from 0…1…-1…2…-2…3 and so on. And not -2…-1…0…1…2 and so on, as before.
Any suggestions? 🙂
Hi,
yeah, that came into my mind also. Just wondered if there was a simple solution into the code 🙂
But no worries, I’ll modify my tables so that they will work, thanks a lot!
Hi,
thanks again! I’ve tested the updated Extension and it almost works 🙂
If I add two values, for example “4” and “-2”, it returns the correct value of “+2”. But, if I add the values “+4″ and “-2” it gives an error of
!ERROR! unexpected operator '+'. Any solution for this?Wow, very nice, thanx! 🙂
Sorry not to have mentioned before, but I would need that “+” sign only to apply in one specific column, not in the whole table. Is it easy to change the Extension-code to apply that functionality?
Hi,
yeah, I was wondering of something like that.
Why do you call these “problems”? I would preferably call them “enhancements” 😉About that Shortcode, it could be linked to all of the available math-functions that TablePress offers… For example, if you wanted to get the average value from a range of cell-values, you could just type something like this
[table-average tables=1-10 cell=A1 /]So, what do you think… Could this “enhancement” end up in TablePress as an Extension (or something) in the near future? 😉
Hi,
thanks a lot! I tested it to call cell values from two different tables and add them together in a third table cell and it works great! 🙂
Now, I have come up with another question 🙂 Is it possible in a table cell to create a function which goes through a listed range of tables and i.e. adds the tables cell-values together?
Using the examples above… You would now have to type the following in a table cell to get the different table cell-values added:
=[table-cell id=1 cell=A1 /]+[table-cell id=2 cell=A1 /]+[table-cell id=3 cell=A1 /]and so on…But what if you could in a cell, type a function that gets for example all “A1” cell-values from tables with id = 1 -> n. The n could be i.e. 10, but if you only have 5 tables created (with id 1 to 5), the cell-function would then disregard the values from 6-10, because they don’t sill exist and would only throw an error in the table.
This was a bit hard to explain, but hopefully you understand my question 🙂
Ok. Too bad… That feature would have been a nice one.
If you end up doing that kind of an extension, please do tell me 😉Hi,
tested and now it works like a charm 🙂
Thanks again!Great, thanks!
I tested directly modifying the code in my current wptr-alter-sorting-classes.php, but there it didn’t work.
So, I presume that I have to create a new file named i.e. “tablepress-alter-sorting-classes.php”, and save the file in “/wp-content/plugins/tablepress-alter-sorting-classes/” folder. And then after that, activate the “new” plugin “TablePress Extension: Alter sorting classes” in WordPress admin area. And then it hopefully should work as before…I also noticed that you have left out two parameters from the function, that is
$js_commandand$tablesorter_script. These aren’t needed anymore?Hi,
I got it working with the following code:
$command .= "setTimeout(function() { jQuery('.wp-table-reloaded-id-1').find('th').removeClass('sorting_asc sorting_desc').addClass('sorting').filter('.column-6').addClass('sorting_desc'); }, 400)";Using setTimeout() is a bit ugly, but in this case I think it’s the easiest way to get the wanted results.
Hi,
yes, I have set the header row on the production pages to have the same bgcolor. But just to fine tune it a bit, I would like to indicate that the default sorting (however, it is done by multiple column sort) is in fact by column-6 and by that the particular cell should only get the bgcolor.
Thanks for the timeout-tip, I’ll try that one out, if I can 🙂
Hi,
OK! Anyway, thanks for your help 🙂
I’ll try to look and see if I could manage to find some kind of solution to this (if I find one, I’ll post it also here!) or then I just have to live with this “feature”. 🙂
Hi,
sorry, I removed it because it was only a test.
But here is the testpage again. 🙂