• Hi, complete newbie here.
    Cool plugin – the only one that can do what I need for my web site.

    I have three quick questions:

    – Is it possible for the plugin tree to appear semi-expanded as opposed to completely expanded or completely collapsed?
    If yes, how do I do it?

    – Is it possible to remove some of the main categories from the plugin tree while still keeping them alive and present in the site hierarchy?
    If yes, how do I do it?

    – Is it possible to make the names of the main categories/subcategories in the plugn tree appear in BOLD while the lowest level subcategories – in regular?
    If yes, how do I do it?

    Thanks!

    http://wordpress.org/extend/plugins/faceted-search/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Blahtor

    (@blahtor)

    OK, make it five quick questions. 🙂
    I’m just adding two more.

    – I noticed that the Faceted Search widget returns results starting with the oldest blog/site posts first.
    How do you change this around and make it show the newly added entries first?

    – Let’s say that a visitor does a search using the Faceted Search widget. And let’s say that there are 2000 results that match his search.
    How do you make the results appear on several separate pages as opposed as all the 2000 results being shown in a long column on the same page?

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Ok, let’s start with the last question and work upward:
    -To modify your search result display, you simply modify the current wordpress template’s search.php template. In other words, it’s the same way you do it with any search.

    -This was a mistake on my part, sorry about that. It’s an easy fix: In faceted-search.php, where it says:
    $querywhere .= ‘) ORDER BY post_date’;
    Change that to:
    $querywhere .= ‘) ORDER BY post_date DESC’;

    -to make parents appear bold, you would modify lines 553 and 557 to include an if statement which would add a style tag if the statement in true, like so (this would replace line 553):
    if(is_array($element[‘children’]) && count($element[‘children’]))
    {
    $returnstring .= ‘<li class=”facetedsearch_li”><label for=”searchterm[]” style=”font-weight:bold” class=”facetedsearch_collapsed” id=”facetedsearch_label_’.$element[‘term_id’].'” onclick=”facetedsearch_expand(‘.$element[‘term_id’].’)”>’.$element[‘name’];
    }
    else
    {
    $returnstring .= ‘<li class=”facetedsearch_li”><label for=”searchterm[]” class=”facetedsearch_collapsed” id=”facetedsearch_label_’.$element[‘term_id’].'” onclick=”facetedsearch_expand(‘.$element[‘term_id’].’)”>’.$element[‘name’];
    }
    For line 557 do something similar.

    -Yes, it’s possible to remove main categories. You would have to do an if statement in the same place as above in order to take out the .$element[‘name’] from those lines:
    if($element[‘parent’] == 0)
    {
    $returnstring .= ‘<li class=”facetedsearch_li”><label for=”searchterm[]” style=”font-weight:bold” class=”facetedsearch_collapsed” id=”facetedsearch_label_’.$element[‘term_id’].'” onclick=”facetedsearch_expand(‘.$element[‘term_id’].’)”>’;
    }
    else
    {
    $returnstring .= ‘<li class=”facetedsearch_li”><label for=”searchterm[]” style=”font-weight:bold” class=”facetedsearch_collapsed” id=”facetedsearch_label_’.$element[‘term_id’].'” onclick=”facetedsearch_expand(‘.$element[‘term_id’].’)”>’.$element[‘name’];
    }
    And you would have to have a similar if statement replace lines 566 and 570 to take out the checkbox html tag.

    -Semi-expanded has a similar solution, where you would replace lines 535-544 with whatever if condition you want them to be expanded by.

    Due to time constraints, that’s about as detailed as I can get right now.

    Thread Starter Blahtor

    (@blahtor)

    OMG man, you are THE BEST! Thanks, I will try all of this.
    This must be the best help/support I have ever gotten for a softare. And it’s for free.
    Seriously, you rock.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    No problem :). Also, I’ve just uploaded version 3.1, which fixes the problem with showing the oldest posts first instead of the most recent, along with another minor bugfix. It should be available through the wordpress site in the next 20 minutes or so.

    *Edit*: If you download version 3.1, you’ll need to add 8 to all the line numbers mentioned above.

    Thread Starter Blahtor

    (@blahtor)

    Interesting.
    I’m still using the older version of the plugin and I have it added to the Sidebar.
    I noticed the following “glitches” (could be due to the theme that I am using or something like that):

    – When I do a Faceted Search from the sidebar on one of the main pages, the plugin works OK. But when I do a search from the sidebar on a Post page, it does not return any results, just refreshes the Post page.

    – In addition to the Faceted Search I am also using a standard Search widget in the sidebar – one that searches for words. If there are many results, it returns 8 results per page, then you have to go to another page to see the rest of the results .
    On the other hand the Faceted Search plugin returns unlimited number of results on the same page. If there are 1000 matching results, it shows them all on one single page.

    Thread Starter Blahtor

    (@blahtor)

    Correction regarding the first glitch: actually, it doesn’t just reload the single post page. it does return results but in the form of just one single post that loads in place of the post from which sidebar the user was doing the search from.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Glitch #1 is resolved in version 3.2.1.

    Glitch #2 requires I switch to using $_GET instead of $_POST in my form method, which requires some major changes under the hood. This may be what version 3.3 will be.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Faceted Search] Three quick questions’ is closed to new replies.