Ruud Laan
Forum Replies Created
-
Forum: Plugins
In reply to: [qTranslate] Please have a look at these notices, patch providedIndex: htdocs/wp-content/plugins/qtranslate/qtranslate_configuration.php =================================================================== --- htdocs/wp-content/plugins/qtranslate/qtranslate_configuration.php (revision 823892) +++ htdocs/wp-content/plugins/qtranslate/qtranslate_configuration.php (working copy) @@ -456,8 +456,8 @@ echo " checked='checked'"; } echo ' />'; - echo ' <a href="'.add_query_arg('moveup', $language, $clean_uri).'"><img src="'.WP_PLUGIN_URL.'/'.basename(__DIR__).'/arrowup.png" alt="up" /></a>'; - echo ' <a href="'.add_query_arg('movedown', $language, $clean_uri).'"><img src="'.WP_PLUGIN_URL.'/'.basename(__DIR__).'/arrowdown.png" alt="down" /></a>'; + echo ' <a href="'.add_query_arg('moveup', $language, $clean_uri).'"><img src="'.WP_PLUGIN_URL.'/'.basename( dirname(__FILE__) ).'/arrowup.png" alt="up" /></a>'; + echo ' <a href="'.add_query_arg('movedown', $language, $clean_uri).'"><img src="'.WP_PLUGIN_URL.'/'.basename( dirname(__FILE__) ).'/arrowdown.png" alt="down" /></a>'; echo ' <img src="' . trailingslashit(WP_CONTENT_URL) .$q_config['flag_location'].$q_config['flag'][$language] . '" alt="' . $q_config['language_name'][$language] . '" /> '; echo ' '.$q_config['language_name'][$language] . "</label><br />\n"; }
Forum: Plugins
In reply to: [Meta Box] Demo file missingHi Rilwis,
I can confirm that the demo files/folder is missing in the latest versions in the SVN repo.
Please compare:
https://plugins.svn.www.ads-software.com/meta-box/tags/4.3.3/with
https://plugins.svn.www.ads-software.com/meta-box/tags/4.3.4/The ‘demo’ folder is missing ??
Yes it works for me fine. I’m using the latest version of Relevanssi and P2P.
You can use this filter to use both Relevanssi in the admin and have the search in P2P still working OK:add_filter( 'relevanssi_admin_search_ok', 'yourname_relevanssi_admin_search_ok_filter', 10, 2); function yourname_relevanssi_admin_search_ok_filter( $admin_search_ok, $query ) { if ( isset( $query->query_vars['p2p:context']) && $query->query_vars['p2p:context'] == 'admin_box_candidates' ) { $admin_search_ok = false; } return $admin_search_ok; }
Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)OK, I understand.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Great!
Any thoughts on when the next version is coming out?Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Hi Mikko,
I looked into your suggestion for removing the filter. This is a viable option, however the timing of removing the filter and the precise call when removing the filter both makes this a somewhat hacky way of doing things I think, and prone to errors later on the road, for instance if you decide to change the behaviour of the method or the way in adding the filter yourself.
I suggested a filter for use in common.php (line 430:)
$admin_search_ok = true; $admin_search_ok = apply_filters('relevanssi_admin_search_ok', $admin_search_ok, $query ); if (!is_admin()) $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; else if ('on' == get_option('relevanssi_admin_search') && $admin_search_ok ) { $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; }
This way, a user can do on a per query basis check if the want the query to be prevented or not. This of course in conjunction with the actual search later on.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Hi Mikko,
Scribu added a variable in the query on which I can base the filter to exclude the search on the basis of that variable.
Could you please consider adding the suggested filter (or something like it) into the ‘relevanssi_prevent_default_request’ method, so I can truly filter out this usage of your plugin in this particular case?
Besides me using this feature, the option for other users to be able to use it in their cases would make this enhancement a nice addition I would think, especially because you already made the ‘relevanssi_search_ok’ filter in order to be able to do that.
Yst?v?llisin terveisin,
RuudThnx!
or just
'p2p:context' => 'admin_box'
like in your render() method?That’s great… however the admin_box ajax search uses a different function which doesn’t add this variable.. how about this to get this variable also in place for ajax searches (line 166 box.php):
protected function post_rows( $current_post_id, $page = 1, $search = '' ) { $extra_qv = array_merge( self::$admin_box_qv, array( 'p2p:context' => 'admin_box_ajax_search', 'p2p:search' => $search, 'p2p:page' => $page, 'p2p:per_page' => 5 ) );
Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Hi Mikko,
I found a better solution after I found the cause of the incompatibility problem. You we’re right that I want to try to exclude the search when doing an p2p_ajax_admin search… however I’m not able to because your ‘relevanssi_prevent_default_request’ method unconditionally ‘destroys’ the current query.
So I propose the following:[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
$admin_search_ok = true; $admin_search_ok = apply_filters('relevanssi_admin_search_ok', $admin_search_ok, $query ); if (!is_admin()) $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; else if ('on' == get_option('relevanssi_admin_search') && $admin_search_ok ) { $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; }'
In this filter I can selectively exclude all p2p related searches.
What do you think?Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Hi Mikko,
Fair enough. I’ll drop a line with Scribu to see if he can shed some light on this.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] AJAX search from P2P_Box broken ( fix?)Hi Mikko,
Thanks for replying. I took a good look at your suggestion. It didn’t work out. The thing is that somehow (don’t know how) but by the time the query is going through your ‘the_posts’ filter, the wp_query seems totally unusable for specific tests in the relevanssi_search_ok filter (unusable as in totally empty/default).
There also seems to be a discrepancy between the global $wp_query and the $query var in the function.
I’m a bit lost here and had to switch off your admin search completely so far to get it working again.
I’ve checked my custom theme for any related ‘the_posts’ filters etc, but to no avail.Could you verify my findings by using the p2p plugin (by scribu) yourself? Perhaps we could invite Scribu himself to this problem too? (not sure how to do that..)
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Error on update (wp 3.5 – Relevanssi 3.1)In relevanssi.php line 114