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)

Dave Hybrid 07-13-2009 09:19 AM

Quote:

Originally Posted by lord_of_chaos (Post 1847785)
I'm trying to use this great addon but can't get the links to show up. It works when I add the "?hl=XXX" string manually.

I'm using PHP 5.3 running as FastCGI. And I recognized that the mechanism to fetch the appropriate language links is a little bit odd - could some of the URL rewriting stuff you do in "translateflags.php" be broken in PHP 5.3?

The code is necessary, simply adding ?hl= doesn't work.

What is your forum URL?

lord_of_chaos 07-13-2009 10:43 AM

Was my fault. While looking about the stuff again the third time, I realized, that I used the wrong hook for the second plugin. Sorry that I have bothered you. ;)

Dave Hybrid 07-13-2009 11:16 AM

Quote:

Originally Posted by lord_of_chaos (Post 1848014)
Was my fault. While looking about the stuff again the third time, I realized, that I used the wrong hook for the second plugin. Sorry that I have bothered you. ;)

Sorry I gave you a free product and you removed the credit link.

bjhuang 07-13-2009 11:16 AM

is there any reason why you didn't make use of vbulletin's buildin functions and database for better integration?

Dave Hybrid 07-13-2009 11:22 AM

Quote:

Originally Posted by bjhuang (Post 1848031)
is there any reason why you didn't make use of vbulletin's buildin functions and database for better integration?

Because it's more work and I don't get paid for this.

People also remove the credit link so that's it I'm afraid, don't expect anything other than bug fixes.

I'm keeping the juicy new features to myself.

vividbreeze 07-13-2009 01:49 PM

Can you please email me at pr@truckmountforums.com , i would like to pay you to install this on my forum which is : www.truckmountforums.com

And I only want a few languages, plus all your new juicy features you have to offer for this great plugin.

Thanks boss!

imedic 07-13-2009 02:13 PM

Great mode. Worked flawlessly from the first try. Marked install, nominated and ranked 5.
It can still have some other small stuff in, but as the man said is free so thank you :)
Link is there :)

I have VBSEO. Is there anything I need to do / add for this to work best? I have obviously chose the appropriate files.
Like something in Site map ...
Thanks again for brilliant mod. These is web 3.0: all content in all languages instantly :)

Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

Dave Hybrid 07-13-2009 02:25 PM

Quote:

Originally Posted by imedic (Post 1848107)
Great mode. Worked flawlessly from the first try. Marked install, nominated and ranked 5.
It can still have some other small stuff in, but as the man said is free so thank you :)
Link is there :)

I have VBSEO. Is there anything I need to do / add for this to work best? I have obviously chose the appropriate files.
Like something in Site map ...
Thanks again for brilliant mod. These is web 3.0: all content in all languages instantly :)

Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

Thank you!

That makes a nice change to the constant negative feedback I have got here for weeks.

Thanks for leaving the credit link. It's a link for a product which gets you bucket loads of traffic. The selfishness of some people.

You could have the pages added to your sitemap. Info here > http://www.vbseo.com/f66/adding-some...sitemap-34734/

Dave Hybrid 07-13-2009 02:27 PM

Quote:

Originally Posted by imedic (Post 1848107)
Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

They will display for all by default, unless you changed the code?

If the guests cannot see them neither can the search engines.

imedic 07-13-2009 02:49 PM

I figure it out (flags for visitors). Need to put the conditionals. Found it on page 6 or something. Maybe is good idea to update first post and add the conditionals to navbar link code.

I followed the instructions and it will show only for logged in users on all pages.
I mention for me is a clean install.

Thank you for fast support (I was coming back to delete my q but u already answer :D )

Dave Hybrid 07-13-2009 02:52 PM

Quote:

Originally Posted by imedic (Post 1848136)
I figure it out (flags for visitors). Need to put the conditionals. Found it on page 6 or something. Maybe is good idea to update first post and add the conditionals to navbar link code.

I followed the instructions and it will show only for logged in users on all pages.
I mention for me is a clean install.

Thank you for fast support (I was coming back to delete my q but u already answer :D )

The current code in the install guide makes it show for all, no conditional. If you had to add a conditional for them to show for guests then that is an isolated case and down to you vB config. Thanks.

imedic 07-13-2009 03:42 PM

My mistake. I saved it before and <if> and it other conditionals where involved.

I have add th below conditional. Any suggestion on how can I add translations to forum homepage and forumdisplay ?

Code:

<!-- vBGT Code Start-->

<if condition="(THIS_SCRIPT == 'showthread')">
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
</if>

<!-- vBGT Code End -->


Dave Hybrid 07-13-2009 03:52 PM

<if condition="in_array(THIS_SCRIPT, array('forumdisplay', 'showthread', 'index'))">

imedic 07-13-2009 04:31 PM

Great man! I post below the complete code to rap up.
If not, if you allow posting whithout registering, the new post / thread page is not translated at all (not that you have something to translate :) ) and it will look to google duplicate content in all languages. (just tested)

Dave you save my day :)

This will show flags only on index , forums, and threads for all groups:
Code:

<!-- vBGT Code Start-->
<if condition="in_array(THIS_SCRIPT, array('forumdisplay', 'showthread', 'index'))">
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
</if>
<!-- vBGT Code End -->


Here you find how to edit VBSEO sitemap so it work with this mod. I have added all languages in the copy paste code except en.

racale 07-13-2009 06:20 PM

now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do

Dave Hybrid 07-13-2009 06:35 PM

Quote:

Originally Posted by racale (Post 1848244)
now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do

The 1st time you load a translated page it has to be translated by the machine translation engine.

2nd and further page loads of the same page will be fast as the translation loads from cache.

NLP-er 07-13-2009 07:48 PM

Quote:

Originally Posted by racale (Post 1848244)
now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do

Make sure you have cache enabled. First translation will be slow, bacause google translates it and google is slow at this point. After that it is cached and fast :)

Gersfan 07-13-2009 09:02 PM

Awesome,

I was about ot ask the same question, In the live demo even though it was the first time clicking it was rapid first on mine first time it takes about 20=30 seconds at least.

I don't know what cURL is and I don't know if its active but i guess it's active since the mod is working right?

Dave Hybrid 07-13-2009 09:13 PM

Quote:

Originally Posted by Gersfan (Post 1848307)
Awesome,

I was about ot ask the same question, In the live demo even though it was the first time clicking it was rapid first on mine first time it takes about 20=30 seconds at least.

Right, but loads of others have clicked before you, the 1st time it was translated in real time and saved to the database and every other time it was just loaded from the database so is fast.

Same for your site, as you, your user and the search engine spiders use the flags the pages will get translated in real time and saved so will be fast for the next user. Over time the entire site gets saved so it will all be fast.

LI_Pets 07-13-2009 11:10 PM

Quote:

Originally Posted by Dave Hybrid (Post 1848117)
Thank you!

That makes a nice change to the constant negative feedback I have got here for weeks.

Thanks for leaving the credit link. It's a link for a product which gets you bucket loads of traffic. The selfishness of some people.

You could have the pages added to your sitemap. Info here > http://www.vbseo.com/f66/adding-some...sitemap-34734/

So I was knocking the mod because Vbseo said it didn't work :o now this link says you can get it work.

So Dave you are right, I'm wrong

Gersfan 07-14-2009 01:16 PM

Quote:

Originally Posted by Dave Hybrid (Post 1848311)
Right, but loads of others have clicked before you, the 1st time it was translated in real time and saved to the database and every other time it was just loaded from the database so is fast.

Same for your site, as you, your user and the search engine spiders use the flags the pages will get translated in real time and saved so will be fast for the next user. Over time the entire site gets saved so it will all be fast.

Awesome and I understand, Thanks :up:

imported_silkroad 07-14-2009 02:02 PM

First of all, I would like to thank Dave for such an awesome mod. This mod is truly inspirational. Thank you!!

Second of all, for those who have posted in this thread and harassed Dave about this mod, I want to say, "What is wrong with you?!" Dave is a lot more patience than I would have been with the fear-mongers and nay-sayers who toss rocks at his code (which is hard work! and free!) ! I think folks who get this mod up and working, and more traffic to their site, should PayPal some serious coin his way (that includes me).

Third, translation of a page of unique content is not duplicate content. There is nothing in Google's TOS that says translation of one page of unique content is bad in any way. In fact, to translate one page of unique content to the other is a service to people all over the planet! If you have good unique content in EN, for example, it is good to make that content available in SP, or JP or CN, for example. Dave deserves a seat at the UN, for finding a way to do this :-) This is good for everyone and good for Google too.

Forth, I have a few questions because I have not installed this yet because we have about 400,000 (English) URLs in our Google sitemap. 400K * 28 is over 11 Million URLs, so I am a bit worried about server load and performance on this new install.

So I was thinking to simply only translate one language at a time, say EN to SP. From reading the posts here, this seems easy enough by commenting out all the other flags, going slow at first.

Our database is already a kinda large, nearly 180 MB Gzipped for backup, so this will grow quite big with so many languages, so I think better to start small and work our way up, based on the size of the user base. According to this link, Top 10 World Internet Languages, we should do Chinese after English, followed by Spanish and then Japanese (see attached) to reach the large "Internet Audiences". I don't think I will translate minor languages from small language-Internet populations anytime soon, and will prioritize, unless Dave advises otherwise.

Also, we use vBSEO (of course!). So thanks for all the great posts on vBSEO regarding this mod.

In closing this post, I would like to again thank Dave for coming up with a way to translate vB posts (etc) to other languages so people who are searching for information can find that content. I have a few more questions, but this post is getting too long!

Dave Hybrid 07-14-2009 02:27 PM

Quote:

Originally Posted by imported_silkroad (Post 1848605)
First of all, I would like to thank Dave for such an awesome mod. This mod is truly inspirational. Thank you!!

Second of all, for those who have posted in this thread and harassed Dave about this mod, I want to say, "What is wrong with you?!" Dave is a lot more patience that I would have been with the fear-mongers and nay-sayers who toss rocks at his code (which is hard work! and free!) ! I think folks who get this mod up and working, and more traffic to their site, should PayPal some serious coin his way (that includes me).

Third, translation of a page of unique content is not duplicate content. There is nothing in Google's TOS that says translation of one page of unique content is bad in any way. In fact, to translate one page of unique content to the other is a service to people all over the planet! If you have good unique content in EN, for example, it is good to make that content available in SP, or JP or CN, for example. Dave deserves a seat at the UN, for finding a way to do this :-) This is good for everyone and good for Google too.

Forth, I have a few questions because I have not installed this yet because we have about 400,000 (English) URLs in our Google sitemap. 400K * 28 is over 11 Million URLs, so I am a bit worried about server load and performance on this new install.

So I was thinking to simply only translate one language at a time, say EN to SP. From reading the posts here, this seems easy enough by commenting out all the other flags, going slow at first.

Our database is already a kinda large, nearly 180 MB Gzipped for backup, so this will grow quite big with so many languages, so I think better to start small and work our way up, based on the size of the user base. According to this link, Top 10 World Internet Languages, we should do Chinese after English, followed by Spanish and then Japanese (see attached) to reach the large audience. I don't think I will translate minor languages from small language-Internet populations anytime soon, and will prioritize, unless Dave advises otherwise.

Also, we use vBSEO (of course!). So thanks for all the great posts on vBSEO regarding this mod.

In closing this post, I would like to again thank Dave for coming up with a way to translate vB posts (etc) to other languages so people who are searching for information can find that content. I have a few more questions, but this post is getting too long!

Thank you so much, kudos to you, someone who understands the project and it's goals. It's also nice to finally get some good feedback, this is truly a great mod and the single, most effective way of gaining huge amounts of traffic in a matter of weeks. Thanks again for your post, makes this feel a little more worthwhile.

imported_silkroad 07-14-2009 03:55 PM

Quote:

Originally Posted by Dave Hybrid (Post 1848612)
Thank you so much, kudos to you, someone who understands the project and it's goals. It's also nice to finally get some good feedback, this is truly a great mod and the single, most effective way of gaining huge amounts of traffic in a matter of weeks. Thanks again for your post, makes this feel a little more worthwhile.

You are welcome. I just installed it (vbseo install on 3.7.x) and it is working fine. I did not comment out any languages -- will just see how it goes.

I did notice that the URLs were not rewritten for the Flags. Is there some code to rewrite those URLs optimized for SEO?

Dave Hybrid 07-14-2009 04:02 PM

Quote:

Originally Posted by imported_silkroad (Post 1848685)
You are welcome. I just installed it (vbseo install on 3.7.x) and it is working fine. I did not comment out any languages -- will just see how it goes.

I did notice that the URLs were not rewritten for the Flags. Is there some code to rewrite those URLs optimized for SEO?

They are rewritten, just like vbseo, they just have a query on the end...

If you want to convert them to a directory format you'll need to play with htaccess.

I didn't do this as it makes no difference seowise and making one htaccess fit 100's of users setups is impossible.

Thanks.

imported_silkroad 07-14-2009 04:59 PM

Quote:

Originally Posted by Dave Hybrid (Post 1848687)
They are rewritten, just like vbseo, they just have a query on the end...

If you want to convert them to a directory format you'll need to play with htaccess.

I didn't do this as it makes no difference seowise and making one htaccess fit 100's of users setups is impossible.

Thanks.

Oh! Thanks. I thought it made a difference to have a query (?) in the URL, but I am no SEO expert. I will defer to you, since you have been running this for so long!

I'll just leave things as the are (not change the sitemap generation either for now) and see what happens.

Quote:

We're off to see the Wizard, the Wonderful Wizard of Oz....... :D

burntire 07-14-2009 05:07 PM

Installed and thanks for the great work.

Dave Hybrid 07-14-2009 05:13 PM

Quote:

Originally Posted by imported_silkroad (Post 1848706)
Oh! Thanks. I thought it made a difference to have a query (?) in the URL, but I am no SEO expert. I will defer to you, since you have been running this for so long!

I'll just leave things as the are (not change the sitemap generation either for now) and see what happens.

The URLs here at vb.org have ? querys, every standard vb forum has them, they make no difference at all except some say rewritten URLs look pretty, that's it, no seo value at all.

It's the long strings and pages that have multiple string for the same content you have to avoid like ww.domain.com/community/?sid=d161fcfbd7d2d99ef36fe89b5732c5ce

45wheelgun 07-14-2009 05:42 PM

I was so excited when the flags came up, i thought I was finished. Sadly I get a "Cannot connect" error and it mentions syntax in line 4 by the ")". I figure i am doing something stupid, can you point me in the right direction?

Dave Hybrid 07-14-2009 05:51 PM

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.

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 12:24 AM.

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.01903 seconds
  • Memory Usage 1,890KB
  • 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
  • (6)bbcode_code_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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