This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 15 posts - 17,761 through 17,775 (of 18,415 total)
  • Author
    Posts
  • in reply to: No Results Being Returned For Custom Field Only Search #3044
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I see now. So the keywords are stored in the search_terms custom field as “keyword 1, keyword 2, keyword x” – thus comma+space separated.

    I made a few modifications on the source code that should respect this rule, so only the whole keyword matches should be returned.
    I think it should work now as you described.

    I’m attaching the changed lines here for future reference to myself. file search_content.class.php line 167 custom_field search related:
    [php]
    // NOTES: whole word, comma-space-WORD-comma, BOL-word-comma, comma-space-word-EOL
    $parts[] = "($wpdb->postmeta.meta_key=’$cfield’ AND
    (
    lower($wpdb->postmeta.meta_value) LIKE ‘".$s."’
    OR lower($wpdb->postmeta.meta_value) LIKE ‘%, ".$s.",%’
    OR lower($wpdb->postmeta.meta_value) LIKE ‘".$s.",%’
    OR lower($wpdb->postmeta.meta_value) LIKE ‘, ".$s."’
    )
    )";
    [/php]

    in reply to: Problem with custom taxonomy #3041
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think you are using an outdated version of the plugin. I believe the term title bug was fixed back in version 3.1. You can download version 3.2 from codecanyon. Please carefully follow the steps from the documentation when upgrading.

    As for the taxonomies, there is indeed a limitation for 50 terms per taxonomy. (someone had like hundreds of thousands of them and the browser could not handle it)

    You can disable it by disabling lines 109-110 in the ajax-search-pro/backend/settings/class/customtaxonomyterm.class.php.
    [php]
    if (is_array($terms[$taxonomy]))
    $terms[$taxonomy] = array_slice($terms[$taxonomy], 0, 50, true);
    [/php]

    in reply to: How to display Blog name with each result item #3039
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Ajax search pro offers numerous action and filter hooks. These hooks can be used to achieve such tasks. These actions/filters can be found in the actions.txt and filters.txt file. The asp_result_title_after_prostproc filter is what will possibly help.

    Based on this knowledgebase article, I will try to implement some kind of solution: https://wp-dreams.com/knowledge-base/showing-the-post-type-name-in-post-title/

    Try to paste this code to your themes functions.php file:

    [php]
    add_filter( "asp_result_title_after_prostproc", "asp_show_the_blog_title", 1, 1 );

    function asp_show_the_blog_title( $title ) {
    $current_site = get_current_site();

    return $current_site->site_name . " – " . $title;
    }
    [/php]

    I have never tried this, but I think it will work.

    in reply to: Search Results Wacky #3038
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Sorry about the delay. I got no notification for some reason.

    Could you please provide a bit more information:

    • A link to a page where the search is visible
    • The exact phrases on which this problem occurs
    • Phrases on which the problems does not occur
    • Expected results

    Temporary admin/ftp access would also speed up my work in case I need to change the configuration or fix something regarding the plugin.

    in reply to: Checkbox in the Search Settings not showing up #3035
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I did a few adjustments regarding the relevance and disabled the “search in excerpt” option.

    Since the “writing” keyword is very common on your site, it gave lots of results to the plugin. With these adjustments the results should be a bit more focused on the title without loosing relevant results.

    The next search version (which is being uploaded tomorrow) will have a bit different approach exactly for these situations. You can check codecanyon in a few days for version 3.3 which will probably give you more relevant results.

    in reply to: Checkbox in the Search Settings not showing up #3032
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Those span elements are not part of the plugin.
    I checked through the dev tools, and the following script is putting those elements after every single checkbox on the site: https://64.34.205.58/~apmpbok/wp-content/plugins/userpress/wiki/js/foundation.min.js?ver=1.2.3.7

    Since that code is minified I can’t tell exactly how and what to change. You should definitely notify the developer about this, because this can lead to other issues with other plugins using checkboxes. Randomly replacing items on the entire site with javascript is not a good idea. The event listeners attached to the checkbox parent elements can change this way.

    Anyways I can suggest 2 possible solutions, that might work (I’m not 100% sure)

    1. Custom CSS – might not work

    Put this custom css code to any of your stylesheets or into the Custom css field on the search plugin Theme Options -> Custom CSS panel:
    [html]
    span.checked + label:after {
    opacity: 1;
    }
    [/html]

    2. Javascript solution – probably work

    Put this custom javascript inbetween script tags anywhere (prefer header or footer) on your site:
    [html]
    jQuery(document).ready(function () {
    jQuery(".innericon, #ajaxsearchprosettings1_1 input[type=checkbox]").click(function(){$("#ajaxsearchprosettings1_1 span.custom").detach()});
    });
    [/html]

    in reply to: No Results Being Returned For Custom Field Only Search #3028
    Ernest MarcinkoErnest Marcinko
    Keymaster

    It’s possible (on the “Cache settings” submenu), but on multisite setups that setting is ignored for various reasons. In your case I needed to make an exception and disable it programatically, because of the unexpected timthumb output.

    in reply to: No Results Being Returned For Custom Field Only Search #3025
    Ernest MarcinkoErnest Marcinko
    Keymaster

    No problem at all.

    The tiny change is in wp-content/plugins/ajax-search-pro/includes/search_content.class.php on line 346. The old code was:

    [php]
    if ($use_timthumb == 0) {
    [/php]

    and I replaced it with the bypass:

    [php]
    if (1) {
    [/php]

    This will be overwritten by updates, however all you need to do is change this one line. The line number will probably change, but if you search for “if ($use_timthumb == 0) {“ in the file, you will find it, it only occures once.

    If you can’t change it or something goes wrong, you can reply to this thread and I will do it for you.

    in reply to: No Results Being Returned For Custom Field Only Search #3023
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thanks for the information. Somehow the image handling library reported that the image does not exists, while it was there, so I inserted a bypass code to use the internal image handler, now it should work fine 😉

    in reply to: Slow response for search #3020
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I’ve found the problem. By default the search tries to execute the shortcodes found in the content and run the though the “the_content” filter. That command was stuck for some reason. I’m guessing that a plugin or maybe the theme has another filter attached to the “the_content” hook and that made an infinite loop.

    The solution was rather simple. I turned off the “Run shortcodes found in post content” and enabled the “Strip shortcodes from post content” option instead on the advanced options panel: http://i.imgur.com/r2Zrn8g.png

    The search should work now on full speed 😉

    Thank you for the proper details, it made my work much faster.

    in reply to: Slow response for search #3017
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Of course.

    I will only output things to the search ajax response, which won’t be visible on the site layout.

    If I can’t make any progress, I will ask for a dev site access 😉

    Thank you for the details.

    in reply to: Slow response for search #3014
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I just examinded the search with multiple configurations, and indeed something is slowing it down. Interestingly, if I type in something that will surely not match anything, then I get results in under 0.2 seconds. It probably means, that the database query is all right, and it’s fast as well. But once the phrase matches something, it slows down. Based on this I concluded that something in the results post processing function delays this.

    Could you please upgrade your ticket with temporary ftp details? I would like to run a line-to-line manual debugging to find out where the error comes from exactly.

    in reply to: No Results Being Returned For Custom Field Only Search #3012
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I ran throuhg some tests on the site. There were no results because the “Search in pages” option was disabled, thus there was nothing for the plugin to return.

    I enabled this option, now it returns exactly the page you linked for the “grid flooring” search term.

    in reply to: Search logic #3009
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Do you still get results or not at all?

    What you exactly described is not possible. Unfortunately there is no way to determine which keyword belongs to which custom field. One of the custom fields hold the ‘practice, the other one the ‘city’. So one of the words must had to match one field, and the other one the other field, and each word must have at least one match. It sounds easy enough, however the current architecture of the plugin and the wordpress database makes it impossible.

    I’m currently writing the documentation to the next version, which is ready to get deployed. This version includes creation of fields related to custom fields: http://i.imgur.com/PYoWDZJ.png

    As you can see on the screenshot, you will be able to create radio boxes, dropdowns, checkboxes, range sliders that are connected to custom field values. In your case you will be able to make a dropdown field that contains the cities or practices (or 2 dropdowns with both).

    in reply to: Search logic #3007
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I understand. This functionality was intentionally left out because of performance issues. Custom fields can make a huge difference. However if you want, you can still make it work.

    I’ve made a code change, so it might work:
    1. Open up the wp-content/plugins/ajax-search-pro/includes/search_content.class.php file
    2. Make a backup of it’s content.
    3. Replace it’s content with this: http://pastebin.com/raw.php?i=iQTh8jKc
    4. Save it and try it.

    I’m not sure if ti will work, but it’s worth a try.

Viewing 15 posts - 17,761 through 17,775 (of 18,415 total)