Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi!
I see that the search field is inside a hidden div and it only activates after clicking the search icon. The problem is, that one of the important events is not firing this way. Luckily, there is a very easy fix for that. Put this code in the site header of footer:
<script> aspjQuery(document).ready(function(){ aspjQuery('.search-toggle').click(function(){ aspjQuery(window).resize(); }) }); </script>Ernest Marcinko
KeymasterHi!
Thank you for the proper information, it helps me a lot!
1. This is a new “feature” to webkit browsers. By adding this css to the header of your site will most likely eleminate this issue:
.proinput input[type="search"] { -webkit-appearance: none !important; }2. Not sure why, but the first fix might fix this as well.
3. It’s working on both devices on my end, here are screenshots from iPad/iPhone:
3.a Most likely a late init issue with ubermenu mobile version. In these cases I recommend to initiate a delayed window resize event, which usually helps. If you put this code in your site header it might fix this issue:
aspjQuery(document).ready(function(){ setTimeout(function(){ aspjQuery(window).resize(); }, 2500); });You can try to experiment with the millisecond timeout value by increasing/decreasing it.
Ernest Marcinko
KeymasterHi!
Thank you for the kind words!
Please take a look at this faq article, it may help you: http://wp-dreams.com/faqs/the-search-is-not-saving-the-changes-i-made/
Ernest Marcinko
KeymasterHi!
Thank you for the detailed information about the issue, also for the ftp/admin access. I have located the problem, somehow the server was denying access to a certain file, which stopped the search procedure at the beginning.
I have made corrections on the search code, now it should work as intended.
I’m also sending a backup of the modified search as an attachment to this post, in case you need to reinstall it.
Ernest Marcinko
KeymasterYes sir 🙂
Ernest Marcinko
KeymasterOf course, why didn’t I think of that.
Actuall, maybe this will work. Open the plugins/ajax-search-pro/search.php file. That’s a controller type of file, it initiates the search actions.
Line 138 should be empty, put this thing there:$search['data']['selected-blogs'] = array(get_current_blog_id());
Lines 139-170 do the hard work. The foreach parses through the $search[‘data’][‘selected-blogs’] variable (array of selected blog ids), which by default shouldn’t be empty. By pasting this code it puts the current blog id there, and that’s it. I’m 99% sure, that this will finally solve the issue.
-
This reply was modified 12 years, 2 months ago by
Ernest Marcinko.
Ernest Marcinko
KeymasterNope, it should be the other way around. I guess they must have changed something in the wordpress core with the latest minor upgrade. On my test server it shows differently.
I guess then my first solution won’t work in this case 🙁 You should revert back the changes you made on the shortcodes.php file.
Do you know the blog ids of your sites? If so, then you can still use the same template for each site, and create an if statement to display the corresponding search like this:
<?php $_blog_id = get_current_blog_id(); if ($_blog_id=1) { //if the blog id is 1, show the search with id 1 echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); } else if($_blog_id=2) { //if the blog id is 2, show the search with id 2 echo do_shortcode('[wpdreams_ajaxsearchpro id=2]'); } else if($_blog_id=3) { //if the blog id is 3, show the search with id 3 echo do_shortcode('[wpdreams_ajaxsearchpro id=3]'); } /* Else if statements for each blog id */ ?>After inserting this you can add as many else if statements as you want, just change the numbers to the corresponding blog id and to the corresponding search id.
Ernest Marcinko
KeymasterOh, I pasted the wrong shortcode.
Try with this one:
<?php echo do_shortcode('[wpdreams_ajaxsearchpro id=0]'); ?>Ernest Marcinko
KeymasterIt depends on various things, but the id is not really predictable.
If you use only one search for each blog and the same template for all the sites, then editing the search shortcode is most likely the best solution for you.
Open up the plugins/ajax-search-pro/includes/shortcodes.php and go to line 88:
$search = $wpdb->get_results("SELECT * FROM ".$_prefix."ajaxsearchpro WHERE id=".$id, ARRAY_A);and change this line to:
$search = $wpdb->get_results("SELECT * FROM ".$_prefix."ajaxsearchpro", ARRAY_A);plus add this line after line 99:
$id = $search[0]['id'];
This change in the shortcode will generally ignore the search id and selects the first one found on each sub-site. Now you can use the same template for each site with any search shortcode, like:
<?php echo do_shortcode('[wpdreams_ajaxsearchpro_results id=0 element="div"]'); ?>because the id doesn’t matter anymore.
Ernest Marcinko
KeymasterWe might missunderstand each other. What I udnerstand is, that you want the search on each (or some) of your sites, but every one of them should only show the results from the site that they are placed on.
Lets say you have 3 sites named: 1, 2, 3. If you want a search on site 1, you need to log in to the site 1 administrator panel and select blog 1 for that search. Then log in to site 2, then select blog 2 for that search, etc… The search field on site 1 will only search site 1 then, the search field on site 2 will only search site 2 then..
In other words, each site must have an own search instance configured.
This sounds like a lot of work I know, but there is no other way to create one engine for all the sites (the reasons are mainly security issues).I know it’s written on the admin panel, that if no sites are selected, then the current one will be used, but in some rare cases it’s not working for some reason, and I could’t figure out it yet why, and the current blog must be selected.
Ernest Marcinko
KeymasterHi!
Can you see the current site in the blog list? If so, then try to select it, that might solve this issue.
Ernest Marcinko
KeymasterHi!
Try to turn off the Fulltext search option, it might help your case, you can read about it in the faq: http://wp-dreams.com/faqs/the-search-is-not-properly-searching-some-3-or-less-letter-characters/
Also, if you are using polaroid styled results, then posts without images are ignored by default. You can change that as well: http://i.imgur.com/gJx0juI.png
Ernest Marcinko
KeymasterThis is actually a very good idea! Will surely add it to v2.5!
March 18, 2014 at 1:54 pm in reply to: v2.1 to v2.4 upgrade caused lost search box theme settings #1423Ernest Marcinko
KeymasterHi!
This is a known thing, it is stated in the documentation and on the product description page, that upgrading the search requires to delete/recreate the search instances 🙂
I have implemented a better upgrading system to 2.4, so this shouldn’t happen after this version.
March 18, 2014 at 10:51 am in reply to: Statistics problem (again) when upgrade from v2.1 to v2.4 #1417Ernest Marcinko
KeymasterHi!
Just checked the code, there is indeed an error in the code. Shouldn’t affect the statistics, however I will include the fixed file to this post.
After unzipping, you should replace the wp-content/plugins/ajax-search-pro/backend/statistics.php with it.Hopefully the error will disappear.
-
This reply was modified 12 years, 2 months ago by
-
AuthorPosts