PDA

View Full Version : vBET isue with Google API



wangan
24-02-10, 20:01
Hello there, I am an admin of one site which runs free version of vBET2.3.8 recently the site was blocked by Google. I've contacted them about this issue and they told me that i need to add the userip parameter to supply the IP address of the end-user on whose behalf the server is making the API request if I want them to unblock me.

I would like your help on this issue as I really need to fix this, if you cant make the actual changes at least guide me to the right direction so I could make the changes myself as I have somewhat limited php programing ability.

vBET
24-02-10, 21:24
I already have solution for it for some time. I didn't made release in free version because as I know userip is only advised not obligatory. I do not have time to made release now, so please follow this instructions:

1. open file /includes/vbenterprisetranslator_functions.php
2. find function vbet_getTranslationURL($from,$to)
3. replace whole function (not only this line) by:


function vbet_getTranslationURL($from,$to) {
global $vbulletin;

if ($vbulletin->options['vbenterprisetranslator_googleapikey']) {
return 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair='.$from.'|'.$to.'&key='.$vbulletin->options['vbenterprisetranslator_googleapikey'].'&userip='.$_SERVER['REMOTE_ADDR'];
} else {
return 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair='.$from.'|'.$to.'&userip='.$_SERVER['REMOTE_ADDR'];
}
}


After that contact Google. I see that we will have to release 2.3.x soon (all other versions already have it included as I remember). No time today - but probably will be released tomorrow if you do not want to made changes yourself :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translated to other languages thanks to vB Enterprise Translator 4.9.2