Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Number of searches, thinking about a solution
Vanilla's search function lacks a result total ("1-30 of 283"). I know that Mark explained that including a count slows the search function down considerably, and so he purposely left it out.
I was trying to think of a solution for this, as the lack of a count is a pet peeve of mine. What about doing the count as part of the initial query, and then passing that value along? That would still slow down the initial search, but it would only need to happen once.
The simplest method, I assume, would be to add the count to the URL, using the GET method. I realize that the GET method is limited in how much info you can add to the URL, and that might cause issues. You would probably also have to worry about the integrity of the count value, if users are manually typing the URL. I guess if you re-worked the search function a little, you could pass the value invisibly via the POST method. That would involve more programming work, but would solve the above issues.
AJAX could also be utilized to speed things up for the user, couldn't it? What about popping up the initial search results and then using an onload function to add the count? (Hmm, in my head, though, it seems more intuitive to display the count first and then use AJAX to bring up the results.) You could certainly implement an AJAX count as part of an extension, but the count thing feels like something that should be in the core.
I was trying to think of a solution for this, as the lack of a count is a pet peeve of mine. What about doing the count as part of the initial query, and then passing that value along? That would still slow down the initial search, but it would only need to happen once.
The simplest method, I assume, would be to add the count to the URL, using the GET method. I realize that the GET method is limited in how much info you can add to the URL, and that might cause issues. You would probably also have to worry about the integrity of the count value, if users are manually typing the URL. I guess if you re-worked the search function a little, you could pass the value invisibly via the POST method. That would involve more programming work, but would solve the above issues.
AJAX could also be utilized to speed things up for the user, couldn't it? What about popping up the initial search results and then using an onload function to add the count? (Hmm, in my head, though, it seems more intuitive to display the count first and then use AJAX to bring up the results.) You could certainly implement an AJAX count as part of an extension, but the count thing feels like something that should be in the core.
0
This discussion has been closed.
Comments