sinco039
Forum Replies Created
-
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Image sortSince it is new and still in development I don’t want to post the link here just yet.
If you dont mind emailing me, I will reply with the link and login info I have setup for you.
My email is my username at gmail.
[ Reminder: please be aware that support is offered via the forum and not email ]
Thank you,
Will
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Image sortok so…it isn’t working yet :/
To clarify, Yes I want to sort by the “alt” attribute of an image.
I followed your directions exactly-
1) installed the sorting plugin
2) Added the above code to the very end of both the .js files
3) Added in the custom commands code to the appropriate table
4) Changed the [ 3 ] to the appropriate number for the column.So maybe my alt text is off. I tried adding ALT text in both wordpress’s media gallery and manually like the example below.
Maybe how I am posting code in the cell is where I am messing things up,
Here is an example of what I am putting in a cell of the table.
Ex.
<img src="https://website.net/assets/image.png" alt="sortname">
Everything still looks fine but when I click the sort button nothing happens, both the up and down arrow stay the same. If I click sort on another image column, that is not included in the custom commands, it will show an up or down arrow like it is trying to sort (but obviously cannot due to not being specified in the custom commands). This brings me to my final question and then I will leave you alone.
Is there a way to tell it to sort multiple columns? something like..
"aoColumnDefs": [ { "sType": "alt-string", "aTargets": [ 3,4,6,7 ] } ]
I don’t know js at all so that is just a shot in the dark.
Thank you so much for responding to me! I GREATLY appreciate it and will most certainly credit your plugin on my site! ??
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Image sortI tried the display:none and it works but I would like to use the alt text as well.
To what file specifically would I add the code
"alt-string-pre": function ( a ) { return a.match(/alt="(.*?)"/)[1].toLowerCase(); }, "alt-string-asc": function( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "alt-string-desc": function(a,b) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); }
I looked at wp-content>plugins>tablepress>js>jquery.datatables.min.js
and quickly realized I’m no programmer…Any help would be much appreciated! ??
THANK YOU!! Great plugin!