[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
Smile123
Registered User
Posts: 8
Joined: Wed Oct 06, 2010 5:17 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Smile123 »

The Automatic Translate Mod only handles the original build in bbcodes. To add your own bbcodes you have to edit includes/functions_translate.php.

Open: includes/functions_translate.php

Find

Code: Select all

                preg_match_all("#(\[(img|code|url)+:".$bbcode_uid ."\][^\]]+\[/(img|code|url)+:".$bbcode_uid ."\])#si", $message, $bbcodes_wt, PREG_SET_ORDER);
Add your own bbcodes two times. One for the opening tag and one for the closing tag.

Here is my example:

Code: Select all

                preg_match_all("#(\[(img2=.*?|img|code|url|hr|th|cell|table)+:".$bbcode_uid ."\][^\]]+\[/(img2|img|code|url|hr|th|cell|table)+:".$bbcode_uid ."\])#si", $message, $bbcodes_wt, PREG_SET_ORDER);
marcon
Registered User
Posts: 5
Joined: Wed Feb 17, 2010 3:38 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by marcon »

I wish that's not working with SEO Mod, there are problems with logging and posts writing. Can someone fix this ?
purusam
Registered User
Posts: 440
Joined: Sat Feb 02, 2008 10:31 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by purusam »

I gor a problem with the language chooser.
Does anyone know ehre i should look at (what file)

only one swedish and one english flag should be shown.

PLs help me find the file i should take a look at :-)

look at the image then u see the problem

Image
Smile123
Registered User
Posts: 8
Joined: Wed Oct 06, 2010 5:17 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Smile123 »

Did you see my post about double flags?

I think the double flags are caused by other mods you have added to your site. Look for $user in index.php.
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 »

marcon wrote:I wish that's not working with SEO Mod, there are problems with logging and posts writing. Can someone fix this ?
please fix it

Thank you in advance
purusam
Registered User
Posts: 440
Joined: Sat Feb 02, 2008 10:31 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by purusam »

i found the code that is messing my flags upp.

Code: Select all

// MOD :: CLASSIFIEDS MOD -- START
if($config['enable_classifieds'])
{
	$sql = 'SELECT COUNT(ad_id) as NUMBER_ADS
		FROM ' . CLASSIFIEDS_TABLE . '
			WHERE ad_status = 0
				AND invisible = 0
				AND ad_expire > '.time();
	$result = $db->sql_query($sql);
	$row = $db->sql_fetchrow($result);
	$db->sql_freeresult($result);

	$template->assign_vars(array(
  	'TOTAL_ADS'		=> ($config['enable_classifieds']) ? '<strong>'.$row['NUMBER_ADS'].'</strong>' : '',
	));

	if ($auth->acl_get('u_view_classifieds') && ( ($config['display_ads_on_index'] && $config['ad_num_display_on_index'] !='0') || ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0') ) )
	{
	  if ($config['display_ads_on_index'] && $user->data['classified_display_recent_ads'] && $config['ad_num_display_on_index'] !='0' )
		{
	    display_recent_ads($config['ad_num_display_on_index']);

	    $template->assign_vars(array(
				'S_DISPLAY_ADS_ON_INDEX'	=> true,
				'S_RECENT_ADS_TOP'	=> ($config['recent_ads_place']) ? true : false,
			));
		}

		if ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0' )
		{
	    display_random_ads($config['rand_ad_num_display_on_index']);

	    $template->assign_vars(array(
				'S_DISPLAY_RAND_ADS_ON_INDEX'	=> true,
				'S_RAND_ADS_TOP'	=> ($config['rand_ads_place']) ? true : false,
			));
		}

    $template->assign_vars(array(
			'ALLOW_AD_PREFIX'		=> $config['allow_ad_prefix'],
			'AD_PREFIX_COLOR'		=> $config['ad_prefix_color'],
		));
	}
}
// MOD :: CLASSIFIEDS MOD -- END
Could somebody help me is there something wrong with the code ?

When i remove all of this code from my index.php the flags shows correctly, but when i add it the flags miltiplies with 2
maque
Registered User
Posts: 5
Joined: Wed Nov 17, 2010 8:22 am

Re: [DEV] Automatic Translate Mod V0.1.0

Post by maque »

Hello.

It might be a super stupid question but how do I install the mod. What do I put where? Did I miss it somewhere in the thread?

Thanks.
User avatar
Neo
Registered User
Posts: 113
Joined: Tue Jul 07, 2009 5:02 am
Location: Holland
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by Neo »

this is great thx for this mod!
DocSommer
Registered User
Posts: 252
Joined: Mon Aug 24, 2009 10:30 pm
Location: Hamburg
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by DocSommer »

When I open the test forum I get this error:
Translate mode error :
Google error : Daily Limit Exceeded
Original text is displayed
I can't imagine that this test forum has more traffic compared to a healthy live forum so the question is if this mod makes sense if google does limit the translation capacity?
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 »

DocSommer wrote:When I open the test forum I get this error:
Translate mode error :
Google error : Daily Limit Exceeded
Original text is displayed
I can't imagine that this test forum has more traffic compared to a healthy live forum so the question is if this mod makes sense if google does limit the translation capacity?
Sorry but the test forum is also my development forum...

I have tried a new Google api.

On the mod you haven't any limitations.

@++
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
DocSommer
Registered User
Posts: 252
Joined: Mon Aug 24, 2009 10:30 pm
Location: Hamburg
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by DocSommer »

thanks for the info - I'll definetly keep an eye on this since I'm not satisfied with google translating the complete site because it's always messing up the layout/optics.
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 »

marcon wrote:I wish that's not working with SEO Mod, there are problems with logging and posts writing. Can someone fix this ?
Can you please provide witch SEO mod you are using?
DocSommer wrote:thanks for the info - I'll definetly keep an eye on this since I'm not satisfied with google translating the complete site because it's always messing up the layout/optics.
Which code are you using now?

@++
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
DocSommer
Registered User
Posts: 252
Joined: Mon Aug 24, 2009 10:30 pm
Location: Hamburg
Contact:

Re: [DEV] Automatic Translate Mod V0.1.0

Post by DocSommer »

I'm not providing any translation service/modifications on my site. I was thinking about adding some country flags with links to google translation, like this Example (translation to english). But as you can see the result looks horrible and you have some unwanted translations in there like usernames. That's basicly the reason why I haven't realized this yet.
lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [DEV] Automatic Translate Mod V0.1.0

Post by lovelysummer »

I bookmark this topic , good :)
Locked

Return to “[3.0.x] Abandoned MODs”