Forum Archive - problem to save edited translation pro version on wordpress

problem to save edited translation pro version on wordpress
Jun 19, 2012 11:02 am by rob migchelsen
Every thing looks great, but when i can change the translation but when i push the save button i get restricted area. i have put a username and password in de config.php (the same as the administrator of de wordpress site). Who can help my.
Re: problem to save edited translation pro version on wordpr
Jun 19, 2012 11:17 am by Yana
Hi, When you press save button it should prompt for password. What is your website address? If you can send me username/password I'll check it .
Re: problem to save edited translation pro version on wordpr
Jun 19, 2012 11:51 am by rob migchelsen
website adress = Http://www.hoegen-fietsverhuur.nl
Re: problem to save edited translation pro version on wordpr
Jun 19, 2012 12:03 pm by Yana
Hi, Please don't post your private info . I've deleted it. I'll check it ASAP .
Re: problem to save edited translation pro version on wordpr
Jun 19, 2012 12:05 pm by Yana
Could you please send me FTP info , so I can check the settings. Please use contact form on our homepage.
Re: problem to save edited translation pro version on wordpr
Jun 19, 2012 12:24 pm by rob migchelsen
ftp info sent with contact form
Re: problem to save edited translation pro version on wordpr
Jun 22, 2012 4:52 pm by Yana
Hi, Could you please ask your hosting provider if they support HTTP authentication with PHP: http://php.net/manual/en/features.http-auth.php ? I've tried to add the following in the script but ir doesn't work. if (isset($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]) && $_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]!='') { $d = base64_decode($_SERVER["REDIRECT_REMOTE_AUTHORIZATION"]); list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', $d); }
Re: problem to save edited translation pro version on wordpr
Jun 26, 2012 12:04 pm by rob migchelsen
question send to provider i hope hear sone from them. Rob Migchelsen
Re: problem to save edited translation pro version on wordpr
Jun 26, 2012 3:38 pm by Yana
Hi, You can modify the php code (gtranslate/edit_translation.php file) and temporary disable authentication while editing.
Re: problem to save edited translation pro version on wordpr
Jun 26, 2012 9:41 pm by rob migchelsen
what do I need to change in the code thanks rob migchelsen
Re: problem to save edited translation pro version on wordpr
Jun 27, 2012 8:14 am by Yana
Hi, You should remove the following lines: header('WWW-Authenticate: Basic realm="Restricted area"'); header('HTTP/1.0 401 Unauthorized'); echo 'fail'; exit; } else { Here is the code: <?php require_once 'config.php'; if(!isset($_SERVER['PHP_AUTH_USER']) or !isset($_SERVER['PHP_AUTH_PW']) or !($_SERVER['PHP_AUTH_USER'] == USER and $_SERVER['PHP_AUTH_PW'] == PASS)) { $file_name = 'cache/' . $_POST['lang'] . '/' . $_POST['md5']; if(file_exists($file_name)) { $result = json_decode(file_get_contents($file_name)); $old = isset($result->data->translations[0]->translatedText) ? $result->data->translations[0]->translatedText : null; $old = isset($result->TranslateResult) ? $result->TranslateResult : $old; $result->TranslateResult = $_POST['new']; $result->TranslateResultOld = $old; unset($result->data->translations[0]->translatedText); unset($result->data->translations[0]->translatedTextOld); file_put_contents($file_name.'.human', json_encode($result)); } else { $result = new stdClass; $result->TranslateResult = $_POST['new']; file_put_contents($file_name.'.human', json_encode($result)); } echo 'success'; exit; } #print_r($_POST); echo 'fail';

SIMILAR TOPICS

wordpress amp link not translateDec 31, 2016 10:11 amReplies: 12Post by: besybuy
Add links to all translated posts on every Wordpress postJan 14, 2019 8:51 pmReplies: 5Post by: ptsniper
Joomshaper Pagebuilder buttons Link edit problemJan 11, 2019 10:04 amReplies: 1Post by: kumatest
Best way to translate a page in WordPress?Jan 7, 2019 11:10 amReplies: 3Post by: Tonnystark
Problem with pluginDec 30, 2018 11:59 pmReplies: 1Post by: Iyari

Try GTranslate with a free 15 day trial