inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 3, 2013 23:30:16 GMT -8
is there a way to get the list of the currently selected threads/posts (using the checkboxes on the left of them) that enable multi-moderation? such as when you have multiple threads selected in "recent threads", and you click bookmark, it bookmarks all of them. but is there a way to get the entire list its going to bookmark BEFORE it bookmarks them?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Aug 4, 2013 5:36:16 GMT -8
$(".item.thread input.list-item-checkbox:checked") // Threads
$(".post-options-checkbox input:checked") // Posts
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 4, 2013 11:16:31 GMT -8
that would work if they were all on the same page, yes. but it wouldnt get the ones still selected after you went to the next page.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Aug 4, 2013 11:53:09 GMT -8
WormopolisTo be honest you weren't clear on that, otherwise I would have posted a better solution. It is possible, but I don't have time to look right now. If no one has replied with a solution when I get back either later or tomorrow, I'll tell you how to do it. Basically you need to look at the pagination cache.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 4, 2013 11:56:10 GMT -8
WormopolisTo be honest you weren't clear on that, otherwise I would have posted a better solution. It is possible, but I don't have time to look right now. If no one has replied with a solution when I get back either later or tomorrow, I'll tell you how to do it. Basically you need to look at the pagination cache. yeah I probably wasnt. I will search around pagination data and see if I find anything
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Aug 4, 2013 13:19:52 GMT -8
What you want to look at, is the cache in "autosearch", this is where the pages are cached too.
$(".ui-search input.search-input").data("autosearch").cache
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 4, 2013 17:28:50 GMT -8
I'm not sure if it was always this way but I can't seem to access that data on a thread listings page of a board because Proboards chose not to expose it. When a list manager is created it is usually assigned to a global variable listMan but if you view the source of the standard_board_show function you'll see they create it there but with no reference holder new listManager("threads", { total : proboards.data("lm_thread_count"), limit : proboards.data("lm_limit"), page : proboards.data("lm_page"), id : proboards.data("lm_id"), data : { board_id : proboards.data("board_id") } }); by contrast view the source of the standard_post_base function you'll see listMan = new listManager("posts", { total : proboards.data("lm_total"), limit : proboards.data("lm_limit"), page : proboards.data("lm_page"), data : proboards.data("lm_data"), id : proboards.data("lm_id") }) Where you could then use the data structure as in this thread in particular the selected_ids array and the selected_items object
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 4, 2013 20:29:45 GMT -8
well the pagination cache holds what it saw on the previous page, BUT it doesnt reflect changes. so if you click a checkbox, then change pages, then check cache data, it doesnt show that the clickbox was checked. I have been trying to trace through the bookmark function. I found b.get_selected(), but I havent figured out where b was set in order to try and use it myself. I also dont know if VS Admin is going to hit me with a broken toaster for trying to use a function in the PB source. while tracing the bookmark, b.get_selected() does show all of the selected threads from all of the different pages, but Im still not sure how b was called in the first place.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 4, 2013 21:16:28 GMT -8
b would hold a reference to what listMan would hold were it set globally on that page, you cannot however use it since it is a protected closure variable. If you go to a page with posts on it and do a console.dir(listMan) you'll see that that method and several other methods along with the properties I mentioned all reside on that object that is created through a constructor but within an inaccessible closure scope. The globally defined listMan variable is what makes it accessible but only when the coding sets it which it does but only inconsistently.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Aug 5, 2013 0:55:49 GMT -8
WormopolisCan you not just collect the ID's yourself anyway? Bind a click to either the checkboxes or to the menu, and just hold the ids in an array, it's basically what the listManager does after each click of a checkbox.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 5, 2013 6:30:14 GMT -8
well.. I guess so. for some reason I thought pagination was clearing any variables I had in global, but I just tried it again and they are keeping.
so yeah. I CAN do that.
Thank you Peter
|
|
#e61919
1
0
1
Sept 28, 2023 13:31:20 GMT -8
VS Admin
20,147
January 2000
admin
|
Post by VS Admin on Aug 5, 2013 9:35:15 GMT -8
well the pagination cache holds what it saw on the previous page, BUT it doesnt reflect changes. so if you click a checkbox, then change pages, then check cache data, it doesnt show that the clickbox was checked. I have been trying to trace through the bookmark function. I found b.get_selected(), but I havent figured out where b was set in order to try and use it myself. I also dont know if VS Admin is going to hit me with a broken toaster for trying to use a function in the PB source. while tracing the bookmark, b.get_selected() does show all of the selected threads from all of the different pages, but Im still not sure how b was called in the first place. If you try to use a function we haven't declared as 'public' then it's a use-at-your-own-risk scenario. That being said, if you need a function to get all the selected posts, I would suggest tagging some developers and let them know what you need and how you'd want it to function.
|
|
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 Aug 5, 2013 10:07:39 GMT -8
Internally we use a custom get_selection function that's provided by listManager, so I don't think it would take us more than a few minutes to expose that functionality publicly.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Aug 5, 2013 12:32:01 GMT -8
I would appreciate that very much if that could happen. it seemed like it was something that was already global but I just couldnt find since all the different actions in the moderator drop down had access to it, but I guess if the listman was part of the function that controlled all them then that is why I couldnt see it.
you want me to put a new thread in support or will this thread serve the purpose of the feature request?
|
|
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 Aug 5, 2013 12:41:45 GMT -8
I already added it for you this morning, so this thread will suffice
|
|