vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vB Global Translator - Multiply your indexed pages & put search traffic on autopilot (https://vborg.vbsupport.ru/showthread.php?t=217329)

45wheelgun 07-14-2009 06:41 PM

Quote:

Originally Posted by Dave Hybrid (Post 1848724)
It works on many other forums, individual issues are almost always the install not being followed properly. So go over that, again, and again. Also, without a url, I cant do anything.

I am CERTAIN this is pilot error. No question in my mind. I have PM'd you my URL

You will have to choose "Test Style" in order to see it.

I got pass the "Can't connect" message and i am to embarrassed to admit what was wrong. Now I get a URL with the "/?hl=ko" on the end of it, but a totally blank screen.

Again, I am sure it is something else I will be embarrassed about, but can you point it out to me? I have gone over the install multiple times attempted to find my error.

I just had my ISP install cURL this morning, could it be a permissions thing with cuRL? Here is the info they sent me about it:

CURL Information => libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
curl: /usr/bin/curl

Zi55 07-15-2009 06:39 AM

Dear Dave ,
I've test your product in 4 forums , and all of them have the same problem , the flags wont be showed in the page , i try to edit the plugin and made it in this ways
ob_start();
include('./translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();

ob_start();
include('/home/mydomain/public_htrm/forum/translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();
and it won't work also , the flags appear only if i remove the ob_start and made the plugin like this
$translateflags = include('./translateflags.php');

they appear in first line you can't move them , i try this in 4 forums and 3 of them in one server and 1 in other server .
I hope you to help me urgently as i need this hack very important .
Thanks ,
Zi5

Dave Hybrid 07-15-2009 09:58 AM

You need to use this code in the plugin;

ob_start();
include('translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();

You then add this to your template;

<!-- vBGT Code Start-->
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
<!-- vBGT Code End -->

Make sure you upload translateflags.php to your FORUM folder.

At the end of the day the install works, you must have missed a step or not followed it correct.

Farman 07-15-2009 11:02 AM

First of all Thank you so much for giving us such a great mod.

But on my forum it is taking too much time to load the page when I try to click on any flag. My forum is VBSeo Optimized, Is there any way to fast the page loading?

Dave Hybrid 07-15-2009 11:11 AM

Quote:

Originally Posted by Farman (Post 1849146)
First of all Thank you so much for giving us such a great mod.

But on my forum it is taking too much time to load the page when I try to click on any flag. My forum is VBSeo Optimized, Is there any way to fast the page loading?


Note - This script runs off a database. The 1st time a translated page is loaded by a user or search bot the words need to be sent to the Google Translation service, the words are then saved into the database, this can take a varying amount of seconds depending on how heavy your pages are with content. The next time the page is requested it loads from cache and speed is instant. Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages. Please be patient, this is a long term MOD, Google doesn't index normal pages overnight and these translated pages are no different.

imported_silkroad 07-15-2009 12:12 PM

Quote:

Originally Posted by T2x (Post 1840020)

As far as making google happy, ( This code will ONLY work if you have VBSEO)

Do this:

1. Open up your translate.php.

find these lines:
Code:

@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

change it to:

Code:

@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        @curl_setopt($ch, CURLOPT_REFERER,"http://$_SERVER[SERVER_NAME]$_SERVER[VBSEO_URI]");
        @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

2. Also in translate.php

Go to http://code.google.com/apis/ajaxsearch/signup.html

Get an api key for your site, copy it

find:

Code:

@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text));

change it to


Code:

@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&key=COPYYOURKEYHERE&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text));
Of course replace "COPYYOURKEYHERE" with the key you got from google.


That's all.

Easy as pie.

This will ensure google knows where the requests are coming from and that they can contact you in case of problems instead of just banning you from all of google by ip.

Thanks! I added this and it is working. Seems like a good idea to follow Google's requirements and use this API key.

imported_silkroad 07-15-2009 04:10 PM

Interesting: Installed barely one day and:

Quote:

3 table(s) Sum 1,823,325 Records MyISAM 338.8 MB

Sweeks 07-15-2009 04:19 PM

Quote:

Originally Posted by Dave Hybrid (Post 1849148)
Note - This script runs off a database. The 1st time a translated page is loaded by a user or search bot the words need to be sent to the Google Translation service, the words are then saved into the database, this can take a varying amount of seconds depending on how heavy your pages are with content. The next time the page is requested it loads from cache and speed is instant. Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages. Please be patient, this is a long term MOD, Google doesn't index normal pages overnight and these translated pages are no different.

If you watch your database for this in phpmyadmin and click the language flags on a new install if it working you can clearly see the filesizes growing each click :)

relaxiha 07-15-2009 05:35 PM

Hi, please add your language Persian

1Unreal 07-15-2009 05:44 PM

Quote:

Originally Posted by relaxiha (Post 1849375)
Hi, please add your language Persian

This mod uses the Google translation API and Google doesn't currently support Persian.


All times are GMT. The time now is 01:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01539 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete