The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot Details »» | |||||||||||||||||||||||||||
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot
Developer Last Online: Dec 2013
**Text Removed**
Show Your Support
|
Comments |
#92
|
||||
|
||||
Quote:
|
#93
|
|||
|
|||
In the database i see the " originaltext "
But the " translated " is empty ... |
#94
|
||||
|
||||
I cant check anything without a url?
|
#95
|
||||
|
||||
I'm trying to figure out a way I could use this with vbSEO. Ideally the url's should be in the format site.com/xx/thread_name/ where xx is the language abbreviation. Anyone have any ideas?
Also, is there any reason that links on the translated page shouldn't be to the translated version of corresponding page? Otherwise the user would have to keep clicking their flag for each new page. |
#96
|
|||
|
|||
Hey dave, very nice plugin.
I figured it out for you Code:
<!--notranslatestart--> Do not translate this text <!--notranslateend--> Change the plugin code to the following: Code:
// Enable UTF-8 characters if(isset($_GET['hl'])) { require_once("translate.php"); $output = str_replace('lang="en"', 'lang="'.$_GET['hl'].'"', $output); header ('Content-type: text/html; charset=utf-8'); // Keep remainders of <style and <script tags! $time = time(); // Unique Tag Identifier! preg_match_all('|<script[^>]*>(.*?)</script>|si', $output,$scripttags, PREG_SET_ORDER); for($i=0;$i<count($scripttags);$i++) { $output = str_replace($scripttags[$i][0], "<a name=\"$i\"></a>",$output); } //preg_match_all("<style[^>]*>.*</style>",$buffer,$styletags); preg_match_all('|<style[^>]*>(.*?)</style>|si',$output,$styletags); for($i=0;$i<count($styletags);$i++) { $output = str_replace($styletags[1][$i], "<a name=\"s$i\"></a>",$output); } preg_match_all('|<!--notranslatestart-->(.*?)<!--notranslateend-->|si', $output,$notranslatetags, PREG_SET_ORDER); for($i=0;$i<count($notranslatetags);$i++) { $output = str_replace($notranslatetags[$i][0], "<a name=\"t$i\"></a>",$output); } $output=callback($output); // Place back remainders of <style and <script tags! for($i=0;$i<count($styletags);$i++) { $output = str_replace("<a name=\"t$i\"></a>", $notranslatetags[$i][0], $output); } for($i=0;$i<count($styletags);$i++) { $output = str_replace("<a name=\"s$i\"></a>", $styletags[1][$i], $output); } for($i=0;$i<count($scripttags);$i++) { $output = str_replace("<a name=\"$i\"></a>",$scripttags[$i][0] ,$output); } //print_r($scripttags); //die("c:".count($scripttags).":".count($styletags)); } You need to add a Code:
@curl_setopt($ch, CURLOPT_REFERER,"http://$_SERVER[SERVER_NAME]$_SERVER[VBSEO_URI]"); according to google. and adding an api key to the request doesn't hurt. http://code.google.com/apis/ajaxsearch/signup.html at http://code.google.com/apis/ajaxlanguage/documentation it says: Quote:
Quote:
|
#97
|
|||
|
|||
Quote:
As for HREF rewriting, I checked the code and I believe its a feature dave is working on but currently its not in place. The idea is to boost search traffic not to provide a comprehensive translation experience. The google translation gadget offers a much faster translation experience for users if this is what you are looking for: http://translate.google.com/translate_tools |
#98
|
||||
|
||||
Quote:
|
#99
|
|||
|
|||
good point. I just realized that that would actually be pretty easy
|
#100
|
||||
|
||||
Right, but what about words in the URL being translated?
|
#101
|
||||
|
||||
You're asking if we can do that?
As far as I'm aware domain names and URLs are only allowed in English, that just the way the net is... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|