Forum Replies Created

Viewing 15 replies - 46 through 60 (of 80 total)
  • Plugin Author AndrewUlrich

    (@andrewulrich)

    I’ve just committed Version 3.2, which adds this functionality to the widget options. It should be available for download soon.

    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.

    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.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Ok, for version 2.3:
    in faceted-search.php:
    1. uncomment lines 253-256 (take out the //). Don’t uncomment line 257 which has the word “die” in it.
    2. after line 340 (that’s the line that says $query = $query.$queryfrom.$querywhere;), add this line: die(“
    Executed the following query: $query”);
    3. run the search
    4. copy and paste what appears on the screen into an email and send it to me
    5. undo the above changes so your site doesn’t remain broken

    For version 3.0:
    in faceted-search.php:
    1. uncomment lines 253-256 (take out the //). Don’t uncomment line 257 which has the word “die” in it.
    2. uncomment line 274
    3. run the search
    4. copy and paste what appears on the screen into an email and send it to me
    5. undo the above changes so your site doesn’t remain broken

    Sorry for the confusion. Here’s my e-mail address:
    [email protected]

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Due to the changes in the new release, Step 2 has been changed to simply uncommenting line 274 (that is, erase the // from that line). Other than that, it should work the same.

    To ‘run the search’, simply select the appropriate faceted search checkboxes on your front page (or wherever your faceted search widget appears), and click the widget’s search button. Once clicked, it will do a faceted search like usual, but will stop at a certain point and output some information to your screen which I could definitely use.

    One other thing you can modify in the above instructions is change ‘die’ to ‘print’, so your site will still be able to load after you press the search button. In this case, just right click, select ‘view source’, and email the contents of that to me.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Tags aren’t hierarchical, but categories are. Both of these data types are stored in a similar fashion, so it should be pretty easy to convert them to each other. Just googling it, I found the following link that apparently has instructions on how to do this:
    https://www.bhagwad.com/blog/2009/technology/converting-wordpress-tags-into-categories.html

    Yes, you’ll need to create those Vibe, Location, etc. categories. There should be an easy way to put all your newly-converted categories under these. You could try one of many bulk category plugins, or just do it the old fashioned way.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Hey good news:

    I just released version 3.0, and it allows you to choose from three different search modes. For your site, I recommend the new ‘Smart’ search mode, which will allow people to choose, say, both 14th Street and H Street, and Burgers, and will return restaurants at either location that serve burgers. To get that set up, you’ll have to put your tags as subcategories to location, food, and vibe parent categories. Let me know if you need help disabling those parent categories so that they don’t show up as selectable options.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Ok, I’ve just released version 3.0. It contains an overhaul of the query builders, so let me know if that resolves your problems.

    You can also now choose from inclusive, exclusive, or smart searching. You can find more info about that here.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Borisj,

    Yeah, I think the contact form should work. Thanks a bunch.

    Loving40s

    Yes, if you could as well, it will give me more information to work with.

    Please do it for the searches that don’t work. If you do it for the searches that do work, please label them as so.

    Thanks a bunch!

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Looking good, man!

    I think I know what you’re saying. It won’t return anything if you select, say, both 14th Street and H street because there are no posts tagged with both of those. It will only return results if you select only one of those. However, if you select both Downtown and American, you’ll find something because there are posts tagged with both of these.

    I think what you want is the option to broaden the results rather than narrow them, so that if you select both 14th and H Street, you’ll find posts at either location, rather than posts that are only at both locations. This is a much requested feature, and I plan to look into it tonight, though if I can’t finish it tonight, it may have to wait a week or so ’cause I’ve got a different task to do this weekend.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    If you could do me a big favor, the following would be helpful for me to debug the issue:
    in faceted-search.php:
    1. uncomment lines 253-256 (take out the //). Don’t uncomment line 257 which has the word “die” in it.
    2. after line 340 (that’s the line that says $query = $query.$queryfrom.$querywhere;), add this line: die(“
    Executed the following query: $query”);
    2. run the search
    3. copy and paste what appears on the screen into an email and send it to me
    4. undo the above changes so your site doesn’t remain broken

    Plugin Author AndrewUlrich

    (@andrewulrich)

    thanks borisj for confirming this. I’ll work on it some more tonight. In the meantime, I’m uploading a small bugfix that will better handle wpmu sites.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Hmm, that’s perplexing…

    Those 20 posts each have both tags, right? ‘Cause if they don’t, then it wouldn’t select them. Other than that, I’ve re-checked the code, and can’t find anything wrong at the moment.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    you might be able to tack on something like query .= ‘AND p.ID <> ANY (SELECT * FROM ‘.$wpdb->prefix.’term_relationships WHERE term_taxonomy_id = ‘.$excluded_id; right after line 340 in faceted-search.php. You would then just get the $excluded id from $_POST. That would be a starting point for you.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Since it’s hierarchical, and dropdownlists are not, this might be kind of hard. You may want to see if you can use some code from the Hierarchical Select Drupal Module.

Viewing 15 replies - 46 through 60 (of 80 total)