[ABD] Automatic Translate Mod V0.1.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
ksar
Registered User
Posts: 119
Joined: Thu May 22, 2008 3:10 pm
Location: Paris, France
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by ksar »

purusam wrote:And now it works great.

Its very strange this, one month it works great another month it doesnt work.

Ksar do you know how it could be like this ?
The only thing that can cause that is some changes made on your server side.

I use the php function fsockopen(), ask your hoster to know if they are doing something on their side.

@++
mail to post mod : A new mod, to "replace" the mail2form mod that is not working in phpbb3 (it will be more simple at the beging). Estimated Release Date : November 2010
Invitation mod : Translate to English my mod and update.
Tranlate mod : update of the mod and at the possibility for users to write message in any language
email html: Add template feature
User avatar
Nawid
Registered User
Posts: 329
Joined: Sat Jun 27, 2009 4:32 pm
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Nawid »

This looks interesting, nice mod :D
Image
Check SuperNova Orange style on:
SchoolLife.nl
phpBB.com
blacksunTR
Registered User
Posts: 40
Joined: Mon May 03, 2010 4:08 pm
Location: Istanbul
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by blacksunTR »

thank you very much this mod. perfect and usefull.

i have a link problem. links are like this: http://sifirforum.com/forum/tr////index.php

it has more than one slash after lang tag.

and sometime gives this link error.
This webpage has a redirect loop.

The webpage at http://sifirforum.com/forum/tr///////// ... /index.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
where is the problem ?

thanks again.
This signature is best until more is better.
My mods are here
marcon
Registered User
Posts: 5
Joined: Wed Feb 17, 2010 3:38 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by marcon »

Hello, how can I disable auto language detection? I want to this mod redirect url's and translate page only when user click on flag ( something like vbet from vbulletin ). Sorry for my english.
ninja250
Registered User
Posts: 11
Joined: Mon Nov 30, 2009 1:46 pm
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by ninja250 »

Hi, I have two little problems with this mod
-When i go on the forum index the flags show 3 times. (Only on index).
-I see two or three slash in URL after lang tag.

Thank you for this mod

(NB I apologyse for my poor english).
I apologyse for my poor English.
Znatok Ne
Registered User
Posts: 59
Joined: Wed Jul 01, 2009 2:39 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Znatok Ne »

Hi ksar,

I Installed this MOD on my board, and I have 2 problems:

First

If you choose any language (other than the main language), then the following message appears:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_translate.php on line 235: Undefined index: port

Fatal error: Call to undefined function: json_decode() in /www/****/users/***/www/htdocs/includes/functions_translate.php on line 192
Second
Like this (http://www.phpbb.com/community/viewtopi ... #p12359755)
When you visit the page the flags show 2 times.

How I can fix that?
Znatok Ne
Registered User
Posts: 59
Joined: Wed Jul 01, 2009 2:39 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Znatok Ne »

Hi ksar,

After the upgrade version of PHP,
If you choose any language (other than the main language), the problem :

Code: Select all

Fatal error: Call to undefined function: json_decode() in /www/****/users/***/www/htdocs/includes/functions_translate.php on line 192
is disappeared.

But now, I have another problem:
If you choose any language (other than the main language), then the following message appears:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_translate.php on line 235: Undefined index: port


[phpBB Debug] PHP Notice: in file /includes/functions_translate.php on line 235: Undefined index: port
[phpBB Debug] PHP Notice: in file /includes/functions_translate.php on line 235: Undefined index: port
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4520: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3591)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4522: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3591)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4523: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3591)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4524: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3591)


lines 4520, 4522, 4523, 4524 in file /includes/functions.php like that:

Image

How I can fix that?
pebumen
Registered User
Posts: 137
Joined: Tue Apr 20, 2010 3:50 pm
Location: Poland

Re: [DEV] Automatic Translate Mod V0.1.0

Post by pebumen »

pippo-c-l wrote:Work with phpbbseo?
not work :( :( :(


1. I can not login
2. translation works only on the index page when I click on the forum - no translation (back to the standard language)
Znatok Ne
Registered User
Posts: 59
Joined: Wed Jul 01, 2009 2:39 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Znatok Ne »

ksar
Tell me please, whether it planned to continue work on this MOD?
pebumen
Registered User
Posts: 137
Joined: Tue Apr 20, 2010 3:50 pm
Location: Poland

Re: [DEV] Automatic Translate Mod V0.1.0

Post by pebumen »

Znatok Ne wrote:ksar
Tell me please, whether it planned to continue work on this MOD?
I join in the question
ksar
Registered User
Posts: 119
Joined: Thu May 22, 2008 3:10 pm
Location: Paris, France
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by ksar »

pebumen wrote:
Znatok Ne wrote:ksar
Tell me please, whether it planned to continue work on this MOD?
I join in the question
I will try to!

Ask for new features that you whant and i will work on it.

@++
mail to post mod : A new mod, to "replace" the mail2form mod that is not working in phpbb3 (it will be more simple at the beging). Estimated Release Date : November 2010
Invitation mod : Translate to English my mod and update.
Tranlate mod : update of the mod and at the possibility for users to write message in any language
email html: Add template feature
pebumen
Registered User
Posts: 137
Joined: Tue Apr 20, 2010 3:50 pm
Location: Poland

Re: [DEV] Automatic Translate Mod V0.1.0

Post by pebumen »

new version should cooperation with modifications:
  • phpBB SEO Ultimate SEO URL V 0.6.4
  • SEO No Dupe V0.6.4 (The No duplicate mod replaces posts URLs with the corresponding Topic URL (with pagination). ) CLONE last post titles mod - so that it shows the latest topic title
Smile123
Registered User
Posts: 8
Joined: Wed Oct 06, 2010 5:17 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Smile123 »

blacksunTR wrote:it has more than one slash after lang tag.
I solved this problem by editing includes/session.php

Find (3 times):

Code: Select all

$this->lang_name . "/" . $url;
Replace by:

Code: Select all

$this->lang_name . $url;

Find (1 time):

Code: Select all

$lang_iso_avail . "/" . get_clean_url(),
Replace by:

Code: Select all

$lang_iso_avail . get_clean_url(),
Smile123
Registered User
Posts: 8
Joined: Wed Oct 06, 2010 5:17 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Smile123 »

When pointing to a flag it will give you the help text like "en" , "de" or whatsoever language abbreviate. I prefer to have the full language name instead.

I changed the following files.

Open: includes/session.php
Find

Code: Select all

        //---- Start Mod phpbb3 translate ----
        foreach ($lang_iso_xx_yy as $lang_iso_avail)
        {
            $template->assign_block_vars('lang_avail', array(
                'LANG_ISO'         => $lang_iso_avail,
                'U_LANG'         => generate_board_url() . "/" . $lang_iso_avail . "/" . get_clean_url(),
                'LANG_IMG'        => $phpbb_root_path . 'images/lang_flags/'. $lang_iso_avail . ".gif")
            );
        }
        //---- End Mod phpbb3 translate ----
Replace by

Code: Select all

        //---- Start Mod phpbb3 translate ----
        foreach ($lang_iso_xx_yy as $lang_iso_avail)
        {
            $sql = 'SELECT lang_local_name FROM ' . LANG_TABLE . " WHERE lang_iso = '" . $lang_iso_avail . "'";
          $result = $db->sql_query($sql, 3600);
          $row = $db->sql_fetchrow($result);
            $template->assign_block_vars('lang_avail', array(
                'LANG_ISO'         => $lang_iso_avail,
                'LANG_NAMES'         => $row['lang_local_name'],
                'U_LANG'         => generate_board_url() . "/" . $lang_iso_avail . get_clean_url(),
                'LANG_IMG'        => $phpbb_root_path . 'images/flags/'. $lang_iso_avail . ".png")
            );
        }
        $db->sql_freeresult($result);
        //---- End Mod phpbb3 translate ----

Open: styles/prosilver/template/overall_header.html
Find

Code: Select all

                <a href="{lang_avail.U_LANG}" title="{lang_avail.LANG_ISO}" ><img src="{lang_avail.LANG_IMG}" /></a>
Replace by

Code: Select all

                <a href="{lang_avail.U_LANG}" title="{lang_avail.LANG_NAMES}" ><img src="{lang_avail.LANG_IMG}" /></a>
Smile123
Registered User
Posts: 8
Joined: Wed Oct 06, 2010 5:17 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Smile123 »

ksar wrote:
scouthostinguk wrote:I think I may of found a error on the viewtopic page.

When you visit the page the flags show 2 times.
Image
I have never see that...
The think strange is that this variables are calculated in page_header() so normally it will be shown 2 times on every pages....
On our board we had the same problem. Double flags only on the index page. I discovered the problem was caused by an other mod. We have a calendar mod installed (http://www.phpbb.com/community/viewtopi ... 9&t=691155).

This mod was also part of index.php.

Code: Select all

calendar_display_calendar_on_index();
Removing that line solved the double flags problem, but then we had no calendar part on the index page of course.

The line in the index.php file calls a function in includes/functions_calendar.php.

Code: Select all

function calendar_display_calendar_on_index()
{
	global $auth, $db, $user, $config, $template;

	$user->setup('calendar');

	//find the first day of the week
	$index_display_week = get_calendar_config_value( "index_display_week", 0 );
	if( $index_display_week === "1" )
	{
		$template->assign_vars(array(
			'S_CALENDAR_WEEK'	=> true,
		));
		calendar_display_week( 1 );
	}
	else
	{
		//see if we should display X number of upcoming events
		$index_display_next_events = get_calendar_config_value( "index_display_next_events", 0 );
		$s_next_events = false;
		if( $index_display_next_events > 0 )
		{
			$s_next_events = true;
		}

		$template->assign_vars(array(
			'S_CALENDAR_WEEK'	=> false,
			'S_CALENDAR_NEXT_EVENTS'	=> $s_next_events,
		));
		display_next_events( $index_display_next_events );
	}
}
More precise... the variable $user is causing the double flag problem. I think this is causing a double run of the query in includes/session.php

Code: Select all

$sql = 'SELECT lang_iso FROM ' . LANG_TABLE;
I don't have a good solution yet, but maybe the author (ksar) or someone else can give good advice on this.
Locked

Return to “[3.0.x] Abandoned MODs”