• Resolved JanSal

    (@jansal)


    Hi there,
    first of all, great plugin, thanks!
    I would like to add the parameter ‘order’ to the shortcut [tpsearch] to enable ordering by name.
    I was able to change the ordering of the date, but didn’t get sorting by name to work?
    Did anyone stumble on similar problems?
    Thanks for any advice!

    https://www.ads-software.com/plugins/teachpress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author winkm89

    (@winkm89)

    Hi,

    please update to teachPress 4.3.11 and try:

    [tpsearch order="title ASC"]

    Thread Starter JanSal

    (@jansal)

    Wow, Mr Winkler, it’s working like a charm ! Thank you so much !
    With a glance at your website I discovered that your working on the plugins further version… I’m already curious ??
    If you could need some suggestions to make your plugin even better:
    #1 Filter improvement: In the actual version of [tpsearch] filter is not working fine, that is to say, if you search by typing the authors “name surname” you’ll get no results. By typing “surname, name” the publications are listed.

    #2 Add “reset” button to clean search_input: When submitting a query, it would be nice to have button that shows up afterwards to clean the search input field.

    #3 Assign CSS class/id to ‘<h3>’ “Results for…” to make it stylable.

    Looking forward to the upcoming release !!!
    Thank you again for a plugin, that makes life much easier.

    Plugin Author winkm89

    (@winkm89)

    Hi,

    I’ve added #2 and #3 in version 4.3.12. ??

    #1 is more difficult. Currently it’s a simple text search. If the author names have the syntax “name surname” (I recommend this syntax. With other ones, the upcoming author filter will be not working correctly), they will found, but not in the form “surname, name”. In your case it’s inversely.

    Thread Starter JanSal

    (@jansal)

    Hi, once again ??
    I didn’t expect such a fast integration of my suggestions – never encoutered a plugin support like that.
    So, if I give you a feedback concerning the changes you made, it’s not in the aim of getting my ‘wishes’ implemented in a version 4.3.13 !
    #1 Mhm, the recommended syntax would work… but would make impossible to sort by last name, that’s what I asked for originally.
    #2 the ‘X’ clears the search input, however it doesn’t reset the list and it is permanently visble, even if the input field is empty.
    #3 working as expected.

    Plugin Author winkm89

    (@winkm89)

    #1: Such kind of sorting is in detail currently impossible, because also with your syntax, it works only with the first author. The second author is not considered. So, this needs some basic database enhancements, which will be introduced with teachPress 5.0. This version has a separate database table for author / editor names which can be sorted by last name. With that, such kind of sorting is basically possible, but not currently implemented or planned.

    #2: The current implementation is a simple reset button for the form. For a complete reset, you can change the following:

    teachpress/core/shortcodes.php, line 1026:

    $r .= '<a name="tps_reset" class="tp_search_reset" title="' . __('Reset', 'teachpress') . '" onclick="teachpress_tp_search_clean();">X</a>';

    to

    if ( $search != "" ) {
          $r .= '<a name="tps_reset" class="tp_search_reset" title="' . __('Reset', 'teachpress') . '" href="' . get_permalink() . '">X</a>';
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[tpsearch] add 'order' parameter’ is closed to new replies.