Arkadiusz Rzadkowolski
Forum Replies Created
-
Forum: Plugins
In reply to: [Social Slider Feed] Broken for multisitesAlso files is an alias for:
/wp-content/blogs.dir/’.$current_blog->blog_id.’/files
and guid (in database) is in format:
[“guid”]=> string(75) “https://XXX.com/files/2014/06/0b1e655ca4722dbbb59b8366b506a329.jpg”
My code only formats your query properly to work with hyperdb – works fine with normal wpdb class & others ?? No other changes were made.
Your query is not working in this case, cause it doesn’t match such regexp due to no spaces between here
'select<code>ID</code>FROM<code>{$wpdb->posts}</code>'
(extracts table_name from query):
// Quickly match most common queries if ( preg_match('/^\s*(?:' . 'SELECT.*?\s+FROM' . '|INSERT(?:\s+IGNORE)?(?:\s+INTO)?' . '|REPLACE(?:\s+INTO)?' . '|UPDATE(?:\s+IGNORE)?' . '|DELETE(?:\s+IGNORE)?(?:\s+FROM)?' . ')\s+<code>?(\w+)</code>?/is', $q, $maybe) ) return $maybe[1];
Forum: Plugins
In reply to: [Blogger Importer] [Plugin: Blogger Importer] Invalid TokenI had this error with version 0.5 and wordpress 3.0 (I had to use it). In my case invalid token was there because headers were wrongly seperated from body.
var_dump($req_token); // wp_remote_retrieve_body(wp_remote_get($req_req->to_url(), array('sslverify' => false)));
output was like this:
ontrol: no-cache Connection: Close oauth_token=4%2FWVWV7Y6tWnRCqW0Ze-noGjO4JXIJ&oauth_token_secret=4wrgRbezXLsjFXlAGiYXrK3w
I had to change:
1.
parse_str($req_token, $tokens);
to:
$req_token = substr($req_token, strpos($req_token, 'oauth_token=')); parse_str($req_token, $tokens);
2.
parse_str($after_access_request, $access_tokens);
to:
$after_access_request = substr($after_access_request, strpos($after_access_request, 'oauth_token=')); parse_str($after_access_request, $access_tokens);
3.
$response = wp_remote_retrieve_body($data);
to:
$response = wp_remote_retrieve_body($data); $response = substr($response, strpos($response, '<?xml'));
Everything works fine since then.