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=216218)

Dave Hybrid 06-14-2009 10:00 PM

vB Global Translator - Multiply your indexed pages & put search traffic on autopilot
 
vB Global Translator


Note - There are 2 versions of this script depending on your setup. This script is compatible with users running standard vBulletin and vBSEO only and all vB release versions. If you cannot install this I am more than happy to answer support questions.

So what does this do?

vB Global Translator automatically translates your forum into 28 other languages via the Google translate API, stores those translations in a MYSQL database then rewrites new URLs so you end up with 28 new pages for every current page.

So, if you have 10,000 pages, this MOD will translate those pages into 28 languages making a total of 280,000 pages in 28 languages. This results in a flood of international traffic and referrals from the search engines. If you are getting 1,000 visits a day from your 10,000 pages imagine how many referrals you will get from 280,000 pages!

The current languages this MOD works with are all supported by AdSense so you can expect your income to rise accordingly. I have this running on a 20,000 page forum and after a few months I have more than doubled my search engine traffic.

How do I Install?

Note - Please make sure you have CURL enabled on your server, it will be listed in you php.ini file. If in doubt ask your host.

First download the relevant package below for your setup.

Next you need to add a new MySQL database to your domain to store the translated pages. Open the database in phpmyadmin or similar and import the db.sql file to install the database tables. Once you have done that you need to select the 'wt_cache' table on the left then 'operations' from the top menu and change the storage engine to InnoDB, then click Go.

Add your new database details to translate.php then, if your forums base language is different to English, change your country code. Otherwise ignore this step.

Find:

Code:

REMOVED
Change en to:

Code:

REMOVED
Next save translate.php and upload that, translateflags.php and overloadcache.txt to your forum root, so if your forums are in a /forums/ folder upload these files there. Upload the flags folder to your domain root, thats the domain root.

CHMOD overloadcache.txt to 777

In your vBulletin admin panel add a new plugin with the following settings.

Hook Location: global_complete
Title: vB Global Translator
Execution Order: 5
Plugin PHP Code:

Code:

REMOVED
Save the plugin and activate.

In your vBulletin admin panel add another new plugin with the following settings.

Hook Location: global_start
Title: vB Global Translator Flags
Execution Order: 5
Plugin PHP Code:

Code:

REMOVED
Save and activate.

Finally add the code below to your template so the flags to select languages appear. This is typically the header, navbar or footer so that they display on every page.

Code:

REMOVED
Load Issues:

This script is can be quite server intensive for large sites. As you are adding links to all of these new pages from all of your current pages the search engine bots will crawl these 1,000's of new pages fast. As the MySQL trys to deal with the many, many translations and querys I have seen my server load spike a bit.

To combat this we have written in a condition that if server load is more than 1.5, the cache setting will disable and pages will be read live from the Google API and no database writing will take place.

If you feel this setting too high/low you can change it by finding the variable below in translate.php and editing accordingly. The only reason to change this is if - A) You are on a slow server and it is overloaded/crashing or B) You have a very fast server and it can handle more, this will mean your site will get fully cached faster resulting in faster page load times when people re-visit the translated pages.

Code:

if(floatval(getServerLoad()) >= 1.5)
One final thing to remember is while your site is being cached and data written to the new database read access times to already cached pages may vary. Uncached pages need to be translated and this can take time when translating a fresh page. Cached pages may load fast or slow depending on whether your server is under load or not as when under load read access from the database is disabled. You just need to be patient and wait until your site is fully cached which will vary between site size, server spec and how often search bots crawl your pages.

Please rate and click install

THANK YOU!

Version History:

v1.7

* Removed ioncube encryption to bring script inline with vBulletin.org rules

v1.6

* Fixed nofollow block on flag links for users with vbseo sites
* Fixed adsense ads showing for translation services etc. by adding section targeting ignore tags

v1.5

* Fixed database speed issues by using InnoDB instead of MyISAM
* Code encrypted with ioncube

v1.0

* Script base version

rob01 06-15-2009 06:19 PM

cool i will try this and see how this work out

thought is not risky? ..so many databese reading

why dont use vb language packs?

thanks

Dave Hybrid 06-15-2009 06:47 PM

That is not an issue, the script can be limited to avoid server overload.

Also language packs will not do anything like what this script does.

GamerPerfection 06-15-2009 06:54 PM

Ok i've installed it, but when I choose a language it comes up with a 404 Not Found page.

Now, might be a silly question, but how do I know if I'm using a Windows or Linux Server?

Dave Hybrid 06-15-2009 06:57 PM

I would ask your host, Linux supports mod_rewrite and thus the .htaccess file that you should have uploaded... it is essential.

PM me the URL and I can take a look.

GamerPerfection 06-15-2009 06:58 PM

Quote:

Originally Posted by Dave Hybrid (Post 1830265)
I would ask your host, Linux supports mod_rewrit and .htaccess files (that you should have uploaded)... it is essential.

Yes mine supports .htaccess files.

In fact I have my own one on my root directory, but I also placed your one in the forum root directory. Is that ok?

Dave Hybrid 06-15-2009 07:03 PM

Sounds like they may be conflicting, why do you have a htaccess in the root, what is it's content?

GamerPerfection 06-15-2009 07:06 PM

Quote:

Originally Posted by Dave Hybrid (Post 1830273)
Sounds like they may be conflicting, why do you have a htaccess in the root, what is it's content?

I used to use it to block certain IP's. It's rather obsolete now anyway.
But I removed my old one and it's not causing the 404 error, so something else is wrong.

Here's my forum: http://www.galaxyofstars.co.uk/forums/

GamerPerfection 06-15-2009 07:20 PM

Quote:

Then add your database details to translate.php
I take it you mean the new database details?

Dave Hybrid 06-15-2009 07:36 PM

Looks like a htaccess issue for sure, make sure it is in /forums/

Without ftp access I can't help much further, PM me if you want.

Dave Hybrid 06-15-2009 07:37 PM

Quote:

Originally Posted by clarkey25 (Post 1830286)
I take it you mean the new database details?

Yes. :D

Selene 06-15-2009 08:11 PM

taking too long time to load

not good enough

please improve it

GamerPerfection 06-15-2009 08:19 PM

Sorry uninstalled this.

Can't get it to work, and I can't chance giving someone I don't know FTP access.

Dave Hybrid 06-15-2009 08:21 PM

Translating a page can take some time, this is down to Google, not the script.

Once translated they are called from a database, so are much faster.

It could take a few days to a few months to cache your whole site.

I can take a look if you PM me your site URL.

Dave Hybrid 06-15-2009 08:21 PM

Quote:

Originally Posted by clarkey25 (Post 1830315)
Sorry uninstalled this.

Can't get it to work, and I can't chance giving someone I don't know FTP access.

No problem, support is there is you want it.

It's a shame, you didnt really give it a chance.

GamerPerfection 06-15-2009 08:26 PM

Quote:

Originally Posted by Dave Hybrid (Post 1830318)
No problem, support is there is you want it.

It's a shame, you didnt really give it a chance.

I'd love to give it a chance, but I run my forums for an Actor, and I can't risk giving out FTP access to anyone.

Dave Hybrid 06-15-2009 08:32 PM

All I can suggest is uploading all the files supplied to both root and /forums/

Just in case the folders are causing some issue. Let me know.

GamerPerfection 06-15-2009 08:35 PM

Quote:

Originally Posted by Dave Hybrid (Post 1830327)
All I can suggest is uploading all the files supplied to both root and /forums/

Just in case the folders are causing some issue. Let me know.

LOL somehow I missed this bit:

Quote:

Open the database in phpmyadmin or similar and import the db.sql file to install the database tables.
I'll update you once I've done this. DOH!

Dave Hybrid 06-15-2009 08:41 PM

That shouldn't case a 404, the database part willl be skipped if not setup anyway.

You issues is with the urls.

bigtime 06-15-2009 08:46 PM

If anyone installs this that is using vBSEO, please post your .htaccess contents here to help the rest of us using vBSEO get it set up correctly.

Thanks.

Dave Hybrid 06-15-2009 08:54 PM

If enough people chime in running vbseo I will look into it further and release how to add it for those users.

FreshFroot 06-15-2009 09:14 PM

Quote:

Originally Posted by Dave Hybrid (Post 1830347)
If enough people chime in running vbseo I will look into it further and release how to add it for those users.

I'd be interested, but I am using vbseo too.

Can't we just merge the htaccess files? or do you have code, which will interfere?

GamerPerfection 06-15-2009 09:20 PM

Marked as Installed again.

I realised I had to change the code for the template from:

http://www.galaxyofstars.co.uk/ar/

to

http://www.galaxyofstars.co.uk/forums/ar/

So i've now gone through all the list and added forums/ to it.

I'm now testing all of the languages. It's going to take a little while, so think i'll get some sleep before I finish it off.

However, the only one not to work so far is:

http://www.galaxyofstars.co.uk/forums/zh-TW/

Not sure why.

Dave Hybrid 06-15-2009 09:26 PM

Try this htaccess. I have updated the main download also.

Code:

#############################################################
# DefaultType application/x-httpd-php5
##############################################################
Options +FollowSymLinks
RewriteEngine On
# Set file extension you wish to translate here [you may add your desired extension]
# Definition ##/[^\./]*## for translating index files or files without extension [delete to disable]
##############################################################
RewriteRule !(/[^\./]*|\.(|shtml|shtml|html|htm|shtml|php|php3|php4|php5|php6))$ - [S=1]
RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2?hl=$1 [L,QSA]
# If not valid html file, view as original (without traslation)
RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2 [L,QSA]
##############################################################


GamerPerfection 06-15-2009 09:42 PM

Right, I tested out all of the languages/ They all work except this one:

http://www.galaxyofstars.co.uk/forums/zh-TW/

Not sure why, but i'm off to bed. I'm glad I got this working. :)

Dave Hybrid 06-15-2009 09:44 PM

See my post above.

GamerPerfection 06-15-2009 09:45 PM

Ah ok, I'll take a look tomorrow. Thanks again.

Dave Hybrid 06-15-2009 09:47 PM

You're welcome, glad you stuck with it and put up with being a beta tester ;)

Can't be helped sometimes, so many server and vb configs.

Dave Hybrid 06-15-2009 10:15 PM

n\a

Medtech 06-16-2009 12:08 AM

looks great, guess i'll have to give it a try :D

zefyx 06-16-2009 01:26 AM

vBSEO here too.

vijayninel 06-16-2009 04:17 AM

Sad that this will run only on Linux servers :(

tansu 06-16-2009 06:13 AM

I merged .htaccess file with mine of Zoints SEO.
I installed, and actually saw my web site in different languages.
But when I click on a thread it redirects me to the original one.

hilfe-forum 06-16-2009 08:01 AM

vBSEO and Zoints SEO .htaccess version please ;)

tansu 06-16-2009 10:04 AM

Does it work in localhost?
I think I did everything right in my localhost (ubuntu).
But it gives 404

Dave Hybrid 06-16-2009 10:27 AM

Quote:

Originally Posted by tansu (Post 1830587)
Does it work in localhost?
I think I did everything right in my localhost (ubuntu).
But it gives 404

404 generally means the htaccess is wrong or if your forums are in a subfolder the template code wasnt edited according to the instructions.

tansu 06-16-2009 10:34 AM

Quote:

Originally Posted by Dave Hybrid (Post 1830598)
404 generally means the htaccess is wrong or if your forums are in a subfolder the template code wasnt edited according to the instructions.

Thanks for the reply,

I installed my forum in localhost/doctus
I created another database fro d sql file you provide, and it creates one table.

This is my .htaccess file:
HTML Code:

#############################################################

# DefaultType application/x-httpd-php5

##############################################################

Options +FollowSymLinks

RewriteEngine On

# Set file extension you wish to translate here [you may add your desired extension]

# Definition ##/[^\./]*## for translating index files or files without extension [delete to disable]

##############################################################

RewriteRule !(/[^\./]*|\.(|shtml|shtml|html|htm|shtml|php|php3|php4|php5|php6))$ - [S=1]

RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2?hl=$1 [L,QSA]

# If not valid html file, view as original (without traslation)

RewriteRule ^(sq|ar|bg|ca|zh-CN|zh-TW|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|id|it|ja|ko|lv|lt|mt|no|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ $2 [L,QSA]

##############################################################

An this is my template codes:
HTML Code:

<!-- vB Global Translator Code -->
<div align="right" class="smallfont"><form id="langsel" name="langsel" action="get"><select id="selector" name="hl" onchange="javascript: window.location.href='/'+this.options[this.selectedIndex].value+'/';"><option value="">Choose language:</option><option value="doctus/ar">Arabic</option><option value="doctus/bg">Bulgarian</option><option value="doctus/zh-CN">Chinese (Simplified)</option><option value="doctus/zh-TW">Chinese (Traditional)</option><option value="doctus/hr">Croatian</option><option value="doctus/cs">Czech</option><option value="doctus/da">Danish</option><option value="doctus/nl">Dutch</option><option value="doctus/en">English</option><option value="doctus/fi">Finnish</option><option value="doctus/fr">French</option><option value="doctus/de">German</option><option value="doctus/el">Greek</option><option value="doctus/iw">Hebrew</option><option value="doctus/hu">Hungarian</option><option value="doctus/it">Italian</option><option value="doctus/ja">Japanese</option><option value="doctus/ko">Korean</option><option value="doctus/no">Norwegian</option><option value="doctus/pl">Polish</option><option value="doctus/pt">Portuguese</option><option value="doctus/ro">Romanian</option><option value="doctus/ru">Russian</option><option value="doctus/sr">Serbian</option><option value="doctus/sk">Slovak</option><option value="doctus/es">Spanish</option><option value="doctus/sv">Swedish</option><option value="doctus/th">Thai</option><option value="doctus/tr">Turkish</option></select></form><a href="http://www.computer-juice.com/forums/">By Hybr!d</a></div>
<!-- vB Global Translator Code -->

Is there anything wrong?

Dave Hybrid 06-16-2009 10:36 AM

You uploaded all the files to your domain root or forum folder?

PM me the URL too if you need me to help further.

tansu 06-16-2009 10:38 AM

Quote:

Originally Posted by Dave Hybrid (Post 1830606)
You uploaded all the files to your domain root or forum folder?

domain root
in /doctus folder, which is root ..
Well first of all I tried with the default template code, but it gave me 4004, so I changed them do "doctus/ar"

Dave Hybrid 06-16-2009 10:40 AM

right, but the files need to be uploaded to /doctus too. Have you done that?

Domain root and forum root are not the same.


All times are GMT. The time now is 06:11 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.01472 seconds
  • Memory Usage 1,854KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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