inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 14, 2016 4:48:05 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,855
December 2005
horace
|
Post by Chris on Jun 14, 2016 6:23:00 GMT -8
Thank you for that confirmation peter , that helped immensely to block a few escape paths in my wild goose chase. I'm starting to think this is actually related to the view count problem I see popping up every once in awhile which I was temporarily able to capture in my comparison screenshots but unfortunately can no longer reproduce.
|
|
inherit
234615
0
Mar 8, 2024 15:21:25 GMT -8
becca2000
106
July 2016
becca2000
|
Post by becca2000 on Jul 16, 2016 11:27:49 GMT -8
Hi Chris.. my forum is requesting this and I installed it but it doesn't work for me. Further, I looked at Peter's link above and that doesn't work for me either. Is there a conflict with any Chrome extensions/plugins? I did try it in an incognito window and neither his nor mine worked for me there either. When I say "didn't work" I mean I could click on it but it did not change the sort. Sometimes it would sort on mine but in a completely random way. Thanks for any light you can shed.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,779
January 2015
msg
|
Post by Lynx on Jul 16, 2016 11:39:42 GMT -8
Just a tip, becca2000: When tagging someone, be sure you use their username and not their display name. You tag above was tagged to @chris, when the person (in the post above yours) that you probably wanted to tag is @horace. You can mouse over the display name in someone's mini profile to get a small tooltip to show up with their @username tag:
|
|
inherit
234615
0
Mar 8, 2024 15:21:25 GMT -8
becca2000
106
July 2016
becca2000
|
Post by becca2000 on Jul 16, 2016 11:40:55 GMT -8
I saw that and fixed it.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,855
December 2005
horace
|
Post by Chris on Jul 16, 2016 12:48:36 GMT -8
becca2000 , it isn't working for me as well across multiple sites (including the one linked by Peter) so I'm going to assume the worse and declare it dead. The plugin uses AJAX requests that the Proboards servers probably had not seen in a couple of years and with the recent push to front-loading rather than using incremental updates via AJAX ( the changes to the edit user profile pages are a perfect example ) it might very well be that such column sorts have been disabled. A bit more optimistic view would be that the dedicated search servers are down or if I am remembering correctly have gone into a fail safe mode where they ignore all but the most basic queries necessary for forum operation at times of abnormally high traffic which is a way to mitigate DDOS attempts. In this scenario, such outages should be temporary although dataHash.search_system should reflect such health problems (which it doesn't at this moment). I'll have to check the function a bit later at off-peak hours to see if high traffic is indeed the cause. Edit Matej , Tim Camara , Martyn Dale , would you have any insight on what has changed here? The parameters being sent via AJAX or even added directly to the URL has gone unchanged so something on the backend obviously did. I see that the member list column sorting still works even if params are typed directly into the address box with no csrf token so to save myself some time here I'll ask if this (undocumented) feature was specifically disabled in a recent push?
|
|
inherit
234615
0
Mar 8, 2024 15:21:25 GMT -8
becca2000
106
July 2016
becca2000
|
Post by becca2000 on Jul 16, 2016 15:01:31 GMT -8
Thanks, Chris , for checking. That's a shame and I hope your optimistic view proves correct, because our community migrated from a platform where it was available (the host is closing down) and people really miss it. I'll keep an eye out in case you find out that it's just a temporary thing.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 18, 2016 7:47:26 GMT -8
Chris - what's the request that you're sending, and what was the response you were getting previously compared to currently?
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,855
December 2005
horace
|
Post by Chris on Jul 18, 2016 8:13:04 GMT -8
Chris - what's the request that you're sending, and what was the response you were getting previously compared to currently? Thanks for the reply Tim Camara , the request is sent by the autosearch subsystem (and I've included the pertinent section of an HAR file representation below) with params of the AJAX request including the following: board_id=6&page=1&dir=asc&sort=num_posts&q=&csrf_token=NonYaBIz when doing a sort via the replies column for example, csrf_token is added by the proboards.ajax (not me) and the board_id by the routemap. Even without AJAX, just a month ago I was able to type the following in the address bar and have the page load with the specified sort order but now nothing http://support.proboards.com/board/96/plugin-development?dir=asc&sort=num_posts With AJAX, the response text returned is simply the html for the standard sort order, no errors, all params ignored
ETA: one thing I did notice was previously if no csrf_token existed in the hash the ajax request would get sent with that equal to null with absolutely no adverse effects. I am however now seeing an unchanged csrf_token existing in the hash, doesn't that now make it predictable? The csrf_token for this support forum regardless of quick reply or full page appears to remain [removed in case it is now based on account auth] while previously it appeared generated for every form and even unique when two form existed on the page such as QR and shoutbox. ETA2: plugin source(function(){ var lmid = pb.data("lm_id"), settings = pb.plugin.get('column_sort').settings, route = pb.data('route'); //note: verbs appear to have evolved with the changes to the layout data names var verbs = { main:'subject',replies:'num_posts',latest:'last_post_id', 'created-by': 'created_by' } var ascending_image = proboards.is_valid_image_url(settings.ascending_image) ? settings.ascending_image : null; var descending_image = proboards.is_valid_image_url(settings.descending_image) ? settings.descending_image : null; if( lmid && pb.data("page").board ){ if( settings.sortable_columns.length ){ function makeSortable(){ //get list manager and direction and turn on column sorting var lm = proboards.listManagers[lmid], search = lm.search.find('input').data('autosearch') lm.settings.column = !0; //make the columns chosen in plugin settings sortable settings.sortable_columns.forEach(function(e,i,q){ $('.list .head th.'+e).each(function(ix,el){ var sort = search.getData('sort'), dir = (sort && (sort == e || verbs[e] == sort) ? search.getData('dir') : 'asc'); $(el).addClass(' sortable sortable-' + lmid + ' sortable-type-' + (e in verbs ? verbs[e] : e)); // one image means use for both if( ascending_image || descending_image ){ if($('.sort-icon',el).length == 0){ $(el).contents().wrapAll('<span class="sort-icon sort-icon-'+ dir +'"></span>') } $('.sort-icon', el).toggleClass('sort-icon-asc',dir==='asc').toggleClass('sort-icon-desc',dir==='desc') } }) },proboards.listManagers[lmid]) //call list manager's bind_columns subroutine again, to prepare the sorting lm.bind_columns(); //see if this board has a defined order if( route.name === 'board' && !search.getData('sort') ){ //var bid = parseInt(route.params.board_id,10) settings.board_view.forEach(function(e,i,q){ if(e.boards.indexOf(route.params.board_id) !== -1 ){ //inArrayLoose ? pb.window.confirm( '<div style="max-width:400px">This board is set to display threads in '+ (e.direction=='asc'?'ascending':'descending')+ ' order via the "'+ (verbs[(e.custom||e.heading)]||e.custom||e.heading) + '" criteria, would you like to continue?</div>', function(){ search.setDataLite('dir',e.direction||'asc'); search.setData('sort', verbs[(e.custom||e.heading)]||e.custom||e.heading); }, { title: 'Reorder Threads?' } ) } }) } } pb.events.on('afterSearch',makeSortable) $(makeSortable) } } //set board links to open in a specific sort order $(function(){ $.each(settings.board_view, function(j,f){ var verb = f.custom || f.heading; verb = verb in verbs ? verbs[verb] : verb; if( verb && f.boards.length){ $('.board-link.board-'+f.boards.join(',.board-link.board-')).each(function(){ this.search = (this.search.length>1 ? this.search+'&' : this.search) + 'dir='+ (f.direction||'asc') + '&sort=' + verb; }) } }) }) })()
/* NOTE: * Threads return by a search (e.g. recent threads) used to be sortable * but I think that was disabled on the backend since it was very * resource heavy, so we'll only do sorting within boards. */ /* UPDATES: * (version 0.0.2; June 13, 2016 @ 10:35 PM CDT) * - concatenating classes to element.className resulted in multiple duplicate classes so switched to tried and true addClass from jquery library * - Determined sort direction based on sort criteria returned by autosearch identifying which header icons should be individualized * - Switched to jquery toggleClass to choose icon class * - Switched back to 'afterSearch' instead of 'pageChange' to handle sorts and properly update icons. * - Handle column header hover cursor change (pointer/hand) via CSS * (version 0.0.3; 12:39 AM CDT, June 14, 2016 ) * - added ability to specify a predefined order on a per board basis * (version 0.0.4; 12:22 PM Tuesday, June 14, 2016 ) * - sorting by subject somehow got broken, the "main" reason is however known */
ETA3: Section of HAR file relating to just such a request{ "startedDateTime": "2016-07-18T18:59:15.786Z", "time": 2404.1629999992438, "request": { "method": "POST", "url": "http://ssdesigns.proboards.com/thread/list", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Pragma", "value": "no-cache" }, { "name": "Origin", "value": "http://ssdesigns.proboards.com" }, { "name": "Accept-Encoding", "value": "gzip, deflate" }, { "name": "Host", "value": "ssdesigns.proboards.com" }, { "name": "Accept-Language", "value": "en-US,en;q=0.8" }, { "name": "User-Agent", "value": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" }, { "name": "Content-Type", "value": "application/x-www-form-urlencoded; charset=UTF-8" }, { "name": "Accept", "value": "application/json, text/javascript, */*; q=0.01" }, { "name": "Cache-Control", "value": "no-cache" }, { "name": "X-Requested-With", "value": "XMLHttpRequest" }, { "name": "Cookie", "value": "__REMOVED__" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Referer", "value": "http://ssdesigns.proboards.com/board/22/chillout?dir=asc&sort=views" }, { "name": "Content-Length", "value": "56" } ], "queryString": [], "cookies": [ { "name": "__qca", "value": "__REMOVED__", "expires": null, "httpOnly": false, "secure": false }, { "name": "_ga", "value": "__REMOVED__", "expires": null, "httpOnly": false, "secure": false }, { "name": "g_session_id", "value": "__REMOVED__", "expires": null, "httpOnly": false, "secure": false }, { "name": "__cfduid", "value": "__REMOVED__", "expires": null, "httpOnly": false, "secure": false } ], "headersSize": 774, "bodySize": 56, "postData": { "mimeType": "application/x-www-form-urlencoded; charset=UTF-8", "text": "board_id=22&page=1&dir=asc&sort=views&q=&csrf_token=null", "params": [ { "name": "board_id", "value": "22" }, { "name": "page", "value": "1" }, { "name": "dir", "value": "asc" }, { "name": "sort", "value": "views" }, { "name": "q", "value": "" }, { "name": "csrf_token", "value": "null" } ] } }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Date", "value": "Mon, 18 Jul 2016 18:59:13 GMT" }, { "name": "Content-Encoding", "value": "gzip" }, { "name": "Server", "value": "cloudflare-nginx" }, { "name": "Connection", "value": "keep-alive" }, { "name": "CF-RAY", "value": "2c482b64f56241e9-MSP" }, { "name": "Transfer-Encoding", "value": "chunked" }, { "name": "Content-Type", "value": "application/json; charset=utf-8" } ], "cookies": [], "content": { "size": 57730, "mimeType": "application/json", "compression": 49776 }, "redirectURL": "", "headersSize": 235, "bodySize": 7954, "_transferSize": 8189 }, "cache": {}, "timings": { "blocked": 3.01099999342114, "dns": -1, "connect": -1, "send": 0.3790000337175998, "wait": 2341.4689999772213, "receive": 59.303999994883725, "ssl": -1 }, "serverIPAddress": "104.16.41.227", "connection": "369058" }
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 18, 2016 11:52:27 GMT -8
That functionality looks to have been removed as part of cleaning up search code in preparation for v6. I think threads are now limited to sorting by 'id' and 'reverse_order_on'.
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Jul 18, 2016 11:59:08 GMT -8
Just to add to Tim Camara, this was attempting to sort by some un-indexed columns, so that causes significant slowdowns especially on larger forums. We changed the code to specifically only allow the ones we want sorting by.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,855
December 2005
horace
|
Post by Chris on Jul 18, 2016 13:51:45 GMT -8
Thank you both for that information and also that hint about V6 supporting reverse thread order, I'm sure that will be much welcomed news for those that have been clamoring for that feature.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 18, 2016 14:13:03 GMT -8
Just a note that reverse_order_on isn't actually new functionality, as that's currently the column we use to sort posts. It can be roughly thought of as the timestamp of the last reply.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,855
December 2005
horace
|
Post by Chris on Jul 18, 2016 17:15:25 GMT -8
much appreciated as always Tim Camara , you really live up to that dreamcrusher name ... becca2000 , as you can now see if you still wish to use this plugin then the verbs would have to be modified to include only "id" and "reverse_order_on" which isn't exactly but could be roughly translated to thread start time and thread last post time respectively. All other sorting orders have been disabled except the following: example 1 (oldest started thread first) example 2 (newest started thread first) example 3 (oldest last post first) example 4 (newest last post first) [default] The plugin is editable so if you still wish to use it in its much less powerful state then those changes can be made by yourself or by me although I no longer see much benefit unless you are wanting one of the other orders to be the default when viewing a particular board.
|
|
inherit
234615
0
Mar 8, 2024 15:21:25 GMT -8
becca2000
106
July 2016
becca2000
|
Post by becca2000 on Jul 18, 2016 17:56:46 GMT -8
Thanks, Chris and Tim Camara for looking into this. Yes, I think that's a bit limited for what people really want. I'll think about it and make the change if that's the way we want to go. Thanks again.
|
|