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-20-2009 06:03 PM

Spammers target the majority. As most forums are in English spammers target that, maybe you should stop posting in English?

Dave Hybrid 06-20-2009 07:17 PM

For people getting the compression error in the browser my coder says this is due to a plugin that is conflicting with the script. You can try disabling any other plugins to troubleshoot if you want.

Quote:

This page can not be displayed, because it uses incorrect or unsupported compression methods.

SuperTaz 06-20-2009 08:29 PM

Works good with new files.

chris1979 06-20-2009 08:54 PM

This is a great idea. I have a similar thing on my wordpress blog and it is excellent for bringing in extra traffic.

I have a problem with my installation though. As soon as I created the plug in, my site crashed. I just got a blank white page when I went to the site.

I've disabled the plugin for now but I'm very keen to make it work.

Can you help?

This is the plugin code I am referring to:

Code:

require_once("translate.php");
// Enable UTF-8 characters
if(isset($_GET['hl']))
{
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);
    }
   
$output=callback($output);

// Place back remainders of <style and <script tags!
    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));

(I am using vb 3.8.)

merkaz 06-20-2009 10:24 PM

Thanks Dave ..

It's really amazing hack ..

I installed it yesterday .. the page load but without the text ..

I see the database growing up now it's 9.5 MB with 118,279 records ...

http://www.alhnuf.com/18.html?hl=en

What i can do ?

burlesque 06-20-2009 11:11 PM

Quote:

Originally Posted by chris1979 (Post 1833588)
This is a great idea. I have a similar thing on my wordpress blog and it is excellent for bringing in extra traffic.

I have a problem with my installation though. As soon as I created the plug in, my site crashed. I just got a blank white page when I went to the site.

I've disabled the plugin for now but I'm very keen to make it work.

Can you help?

This is exactly the problem that I am having. I'm using vbSEO and 3.8.2.

Dave Hybrid 06-21-2009 06:17 AM

Quote:

Originally Posted by chris1979 (Post 1833588)
This is a great idea. I have a similar thing on my wordpress blog and it is excellent for bringing in extra traffic.

I have a problem with my installation though. As soon as I created the plug in, my site crashed. I just got a blank white page when I went to the site.

I've disabled the plugin for now but I'm very keen to make it work.

Can you help?

This is the plugin code I am referring to:

Code:

require_once("translate.php");
// Enable UTF-8 characters
if(isset($_GET['hl']))
{
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);
    }
   
$output=callback($output);

// Place back remainders of <style and <script tags!
    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));

(I am using vb 3.8.)

You uploaded all the files too?

Dave Hybrid 06-21-2009 06:18 AM

This product might conflict with other plugins, i suggest you disable other products and enable them one by one to troubleshoot. That is all I can offer really unless you have a installation error. This works just fine an a vanilla vB install.

chris1979 06-21-2009 09:17 AM

I've disabled all the other products as a test and it still creates a blank page, even with no products enabled.

Any ideas what can cause that? It seems like a few others are getting the same thing.

I use branding free versions of vb and vbseo - could that be relevant?

burlesque 06-21-2009 09:30 AM

Quote:

Originally Posted by chris1979 (Post 1833881)
I've disabled all the other products as a test and it still creates a blank page, even with no products enabled.

Any ideas what can cause that? It seems like a few others are getting the same thing.

I use branding free versions of vb and vbseo - could that be relevant?

I have done this too and am also receiving the white page of doom. :(

Like Chris, I am using branding free vbSEO, but my vbulletin still shows the branding.

Dave Hybrid 06-21-2009 09:41 AM

I can only support install issues, I do not have the time or manpower to customize the script to suit the minority it doesn't work for. If you are 100% you installed it correct I suggest you seek the advice of a php coder to see where the issue lies.

Geraldm 06-21-2009 09:50 AM

Hi,

I have just moved my forum to a VPS host. But now when trying to click on a flag I get the following errors:

Quote:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148
I am using v1.7 of your script.

Any suggestions?

Dave Hybrid 06-21-2009 09:51 AM

Quote:

Originally Posted by Geraldm (Post 1833904)
Hi,

I have just moved my forum to a VPS host. But now when trying to click on a flag I get the following errors:



I am using v1.7 of your script.

Any suggestions?

http://www.google.co.uk/search?q=mys...ient=firefox-a

Geraldm 06-21-2009 10:00 AM

Quote:

Originally Posted by Dave Hybrid (Post 1833906)

ohhh ignore me ..... forgot to import the wt_cache table to the new database!! :rolleyes:
All working now ... faster than before and without any 2006 mysql errors!! :cool:

Dave Hybrid 06-21-2009 10:02 AM

Yay! 99% of these issues are because of not following the install properly.

I'm glad it's working.

Dave Hybrid 06-21-2009 10:04 AM

Quote:

Originally Posted by Geraldm (Post 1833911)
ohhh ignore me ..... forgot to import the wt_cache table to the new database!! :rolleyes:
All working now ... faster than before and without any 2006 mysql errors!! :cool:

Could you also PM your URL? We are trying to gather info on how it performs on others sites/servers. You'd really be helping further the product.

Dave Hybrid 06-21-2009 10:06 AM

Quote:

Originally Posted by Geraldm (Post 1833911)
ohhh ignore me ..... forgot to import the wt_cache table to the new database!! :rolleyes:
All working now ... faster than before and without any 2006 mysql errors!! :cool:

Oh, also, you set the new DB type to InnoDB? Just checking...

chris1979 06-21-2009 10:08 AM

Quote:

Originally Posted by Dave Hybrid (Post 1833899)
I can only support install issues, I do not have the time or manpower to customize the script to suit the minority it doesn't work for. If you are 100% you installed it correct I suggest you seek the advice of a php coder to see where the issue lies.

It's ok if you don't want to help - it's a free mod so no reason you should help - but this is an install issue. The instructions you gave don't work for several people here and actually the instructions you gave have crashed our site to a blank white screen. It's probably something to do with the vbseo code. Maybe you'll take a look when you have time.

Dave Hybrid 06-21-2009 10:13 AM

Quote:

Originally Posted by chris1979 (Post 1833917)
It's ok if you don't want to help - it's a free mod so no reason you should help - but this is an install issue. The instructions you gave don't work for several people here and actually the instructions you gave have crashed our site to a blank white screen. It's probably something to do with the vbseo code. Maybe you'll take a look when you have time.

No, it is not an install issue if you followed the instructions perfect, they work for 99% of others, it's a conflict, which I cannot recode for one or two people.

If you have a blank screen uninstall the script, you can disable plugins in config.php if you cannot access the site.

bhanuprasad1981 06-21-2009 11:07 AM

i am using litespeed web server and vbseo , i did all , if i click image of language file it work good if i click any link on translated page its back to english :(

Geraldm 06-21-2009 11:19 AM

Quote:

Originally Posted by Dave Hybrid (Post 1833916)
Oh, also, you set the new DB type to InnoDB? Just checking...

The DB type is currently set to MyISAM .. I have not changed it to InnoDB yet ... I'll wait until Monday when I get more users on my site so I can test between the two DB types with some server load.

Cheers ...
Gerald.

Dave Hybrid 06-21-2009 01:23 PM

Quote:

Originally Posted by Geraldm (Post 1833948)
The DB type is currently set to MyISAM .. I have not changed it to InnoDB yet ... I'll wait until Monday when I get more users on my site so I can test between the two DB types with some server load.

Cheers ...
Gerald.

Trust me InnoDB is what you want, MyISSAM doesnt like constant write access to the db and locks tables, you should start a new InnoDB database.

Dave Hybrid 06-21-2009 01:25 PM

Quote:

Originally Posted by bhanuprasad1981 (Post 1833942)
i am using litespeed web server and vbseo , i did all , if i click image of language file it work good if i click any link on translated page its back to english :(

This is normal. This mod creates pages in other languages for bots and thus search traffic, nothing else.

vividbreeze 06-21-2009 02:45 PM

Lets say the entire forum is english. Someone finds the site in spanish, so they register, and then post in their own language. Still on the main forum, will it show up as spanish or english on the american side?
And will the registration form be in spanish too?

vividbreeze 06-21-2009 02:57 PM

id also like to pay you a donation to remove the linkback. :)

Bounce 06-21-2009 03:41 PM

Dave,

Just installed so the database is empty, now when I click on a flag it loads but then I get the sql error.

Quote:

UPDATE session
SET lastactivity = 1245602157, location = '/forum/?hl=nl', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0, useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)'
WHERE sessionhash = '798f2cab09a90c3aed27bcc7d47f217f';

MySQL Error : MySQL server has gone away
Error Number : 2006
I'm presuming this is normal as it will need to input all the data into the DB ?

Great hack as we have a lot of non english users on our forums :)

bhanuprasad1981 06-21-2009 03:59 PM

Quote:

Originally Posted by Dave Hybrid (Post 1833993)
This is normal. This mod creates pages in other languages for bots and thus search traffic, nothing else.


sorry i didn't get you but why will bot click on each flag ?

let me explain i open a page it is english , now i have to click "x" language to see it in action now when i see another thread it is back in english , maybe i am missing some thing ?

Sweeks 06-21-2009 04:05 PM

Quote:

Originally Posted by bhanuprasad1981 (Post 1834130)
sorry i didn't get you but why will bot click on each flag ?

let me explain i open a page it is english , now i have to click "x" language to see it in action now when i see another thread it is back in english , maybe i am missing some thing ?

It translates only the current page when clicked and the SE's will follow each of these flag links on every pag thus giving lots of copies of the same page in lots of different languages which is unique content driving traffic from other countries to your site :)

vktechnology 06-21-2009 04:28 PM

very good mode
thank you for making this mode

I voted mode of the Month.

vktechnology 06-21-2009 07:01 PM

When i click translat flag I have go this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148

Kottonmouth801 06-21-2009 07:55 PM

I VOTED MOD OF THE MONTH :up::up:

Thank You for this wonderful modification. :D

:up::up:

Kottonmouth801 06-21-2009 07:57 PM

Quote:

Originally Posted by vktechnology (Post 1834261)
When i click translat flag I have go this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148

Looks like paths to data are wrong ?

"BUT I COULD BE WRONG"

vktechnology 06-21-2009 08:41 PM

Quote:

Originally Posted by Kottonmouth801 (Post 1834297)
Looks like paths to data are wrong ?

"BUT I COULD BE WRONG"

it work now
becuase i didn;t setup database correctly

when translation store in database it load fast.

vktechnology 06-21-2009 08:48 PM

it would be good if can set in cron translate all threads for all language at night and store in database
When people click it will load faster don't have to wait too long from google server
or it load fast for search engine.

valendono 06-21-2009 09:58 PM

I got this on firefox .. any clue ?

Code:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.


vktechnology 06-22-2009 12:48 AM

Does google rerally crawl vB Global Translator URL ?
i checked for few sites i didnt see google crawl it

Dave Hybrid 06-22-2009 06:29 AM

Quote:

Originally Posted by vividbreeze (Post 1834052)
Lets say the entire forum is english. Someone finds the site in spanish, so they register, and then post in their own language. Still on the main forum, will it show up as spanish or english on the american side?
And will the registration form be in spanish too?

They can't, they have to register and post in your base language.

Dave Hybrid 06-22-2009 06:31 AM

Quote:

Originally Posted by vividbreeze (Post 1834066)
id also like to pay you a donation to remove the linkback. :)

Right now this is not available.

Dave Hybrid 06-22-2009 06:32 AM

Quote:

Originally Posted by hIBEES (Post 1834117)
Dave,

Just installed so the database is empty, now when I click on a flag it loads but then I get the sql error.



I'm presuming this is normal as it will need to input all the data into the DB ?

Great hack as we have a lot of non english users on our forums :)

Some sites throw an error from time to time when large pages get translated and are a bit slow. I ignore them. They will stop/slow down as your site gets cached.

Dave Hybrid 06-22-2009 06:33 AM

Quote:

Originally Posted by vktechnology (Post 1834327)
it would be good if can set in cron translate all threads for all language at night and store in database
When people click it will load faster don't have to wait too long from google server
or it load fast for search engine.

The search bots crawl them and translate them, so there is no need!


All times are GMT. The time now is 02:33 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.02994 seconds
  • Memory Usage 1,850KB
  • 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
  • (3)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