Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi!
I’ve made some changes on the configuration and code, it should work well now. The problem was, that the theme was detaching the stylesheet so it did not show.
Ernest Marcinko
KeymasterHi!
You should make copy of the ajax-search-pro folder in the plugin directory, that countains everything. This will be included in the next version, no worries.
August 27, 2014 at 2:48 pm in reply to: Showing the search results on the search page (i.e. going without the Ajax) #2287Ernest Marcinko
Keymaster1. First of all this way the call can be accessed from outside your server, which poses a possible threat of excessive usage. GET is also limited in terms of parameters length. In some cases people like to exclude dozens of categories, posts etc.. which is all part of the fronted as well. So there is a chance of data loss.
You can of course try if you want. Look in the search.php in the main directory. Lines 192-193:
$_posts = new wpdreams_searchContent($params); $pageposts = $_posts->search($s);Basically that’s the heart of it. You can do a “var_dump($params);die();” to see what data is passed to the constructor. The class is located at includes/search_content.class.php. It extends the includes/search.class.php, so you will need that as well.
The $pageposts variable will contain an array of the results. Pobably adapting this code is the best idea to start with.Good luck!
August 27, 2014 at 8:03 am in reply to: Showing the search results on the search page (i.e. going without the Ajax) #2282Ernest Marcinko
KeymasterHi!
This is actually requested by some users right now. The problems are:
1. The search uses POST method instead of GET, to prevent excessive external usage – I highly doubt I can change that as of now, or ever – it’s too much of a security risk.
2. The data returned by the search is not in a compatible format with a standars “WP_Query” data. There are several reasons for this, manly related to search speed and compatibility and of course some data does not have the required fields to act like a post – which cannot be returned as a default search result.
This issue is far more complicated, than a few modifications unfortunately. I have tried to solve this a few times as of now, but something always went wrong.
The solution will involve creating a filter, which hooks to the default search filter, then includes the search files, sends the search data through somehow (selected checkboxes, etc), transforms the data to the ajax search pro, recieves the results, then converts the results to wordpress-compatible format and returns.
Ernest Marcinko
KeymasterHi!
It looks like that plugin was somehow interfering with the custom ajax handler. I changed the search code a bit to the default ajax handler, now it should return results.
Ernest Marcinko
KeymasterHi!
I think it’s ok now. Just had to re-save the cache settings, some data in the database must have been inconsistent.
Ernest Marcinko
KeymasterYou can edit your first post in this thread, there are fields for ftp access to fill out – those are private.
Ernest Marcinko
KeymasterHi!
I don’t see the problem with the theme icons. Can you double check it please and perhaps send a screenshot? I can see them fine.
As for the results, the server returns an error 500, which can be anything from incompatibility to sintax errors. Can you please provide temp ftp access to run a debugging on the code?
Ernest Marcinko
KeymasterHi!
I think the problem is that it’s inside of the
Ernest Marcinko
KeymasterHi!
No, it would change it to ever type.
I however made a change on the search code directly to cut only polaroid titles. It should look better now. Currently is set to 30 characters.
Ernest Marcinko
KeymasterHi!
Only by writing a filter code.
Put this to your theme functions.php file:function asp_shorten_title( $title ) { $length = 20; $title= (strlen($title) > $length) ? substr($title,0,$length).'...' : $title; return $title; } add_filter( 'asp_result_title_after_prostproc', 'asp_shorten_title' );This will cut down the title to max 20 characters. You can change the number to anything you want.
Ernest Marcinko
KeymasterHi!
I did a few changes on the code which I suspected it was slowing down the process. It was just a random shot, so I don’t know if it actually helped. Right now it takes around 2-5 (5.36 was the highest measured) seconds for me, which seems normal. If however the load is constantly over 5 seconds, then there is something interfering with the plugin. Some spikes might happen (due to server load, maintenance, etc..), but it should not be consistent.
Let me know how is it working now.
If there are constant issues, you should provide temp ftp access as well, so I can run debugging on the search code to search for the cause.
Ernest Marcinko
KeymasterHi!
I cannot seem to find the url for the backend to check the settings. Can you please tell me where to log in?
The problem is with jQuery. None of the jQuery plugins are working because it’s moved to the footer. I can see 10 error messages on the developer tools related to jQuery.
After trying to log in by opening the lascomiditasdepapa.com/wp-login.php the site must have locked me out, because I cannot access it anymore. Can you please check that?
Ernest Marcinko
KeymasterHi!
If you recently moved to a https domain from http, then please save the search settings again. It should re-generate the css file with the proper https prefixes.
Ernest Marcinko
KeymasterAlso please check if the permissions on the plugins/related-posts-pro/includes/cache/ folder are indeed set to 777.
Be aware that there are two cache folders!
1. plugins/related-posts-pro/cache/
2. plugins/related-posts-pro/includes/cache/Timthumb uses the second one, that’s where the index.html file should be placed.
-
AuthorPosts