[LOCKED] Definitive guide to Mambelfish in Joomla 1.07

How to support more than one language on your site.

Moderator: General Support Moderators

Locked
User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

[LOCKED] Definitive guide to Mambelfish in Joomla 1.07

Post by Geraint » Fri Dec 23, 2005 11:37 am

The purpose of this message is to create a definitive guide and "one stop shop" to installing and running mambelfish with Joomla 1.07.  I intend to modify this message in the light of feedback/comments/difficulties/successes and will try to keep the attachments up to date and when 1.08 is release the message/attachments will be updated accordingly.

Please note that this is not an official release of mambelfish for Joomla 1.07.

1.Install component (Mambelfish_for_Joomla10x.zip) – IGNORE any messages about installing a patch they are not needed
2.Install initialisation bot (bot_mbf_language_system.zip - remember to publish !!!).  MAKE SURE THE SYSTEM MAMBOT DIRECTORY IS WRITEABLE - THIS IS NOT PART OF THE USUAL INSTALLATION TEST FOR JOOMLA.  If you get a permission error then you need to change the permission!
3.Install language switching module (mbf_module.zip - remember to publish the module)
4.Install search bot (mbf_searchbot.zip - remember to publish the mambot)
5.If you haven't done so already setup the languages you want for your site via the Joomla Language Manager.
6.Setup languages for the fish
7.Note that there is no need to change domit libs any more
8.Install additional contentElement files as required

Let me know how you get on so I can modify this message accordingly.  A special thanks to walb for his assistance in testing and keeping this message up to date.

Geraint

Tips/useful hints
1.If you want to update these files then simply overwrite the existing files as opposed to uninstalling/reinstalling
2. You cannot "preview" the translation functionality from the backend - you can only test from the frontend.
.

For reference information only:

The modified versions of the fish attached to this message incorporate the following changes (and no others) - specifically they do not extend te functionality of mambelfish in any way and are not meant to fix all known bugs in mambelfish.  You may see some warnings or notices from PHP depending on your config.
1.Changes to administrator/mamblefish.class.php : add & to GetTable
2.Changes to components/classes/mambelfish.class.php : add a test on $rows being empty i.e. add new line at beginning of translateList : if (!isset($rows)) return null;
3.Package : Remove patch code and references to it in the help file and install/uninstall scripts

25/01/06 (mk2): Fixed &/? problem for combobox language switcher, eliminate warning about undeclared $GLOBALS['mbf_dir'] and add a / to the end of an IMG tag.  Redone with Walb's correction.


Notes for users of PHP5+
You will need to change line 564 of administrator/components/com_mambelfish/admin.mambelfish.html.php to read

Code: Select all

      <td><?php echo $row->lastchanged ? strftime(_DATE_FORMAT_LC,strtotime($row->lastchanged )) : ' '; ?></td>
And change line 754 to:

Code: Select all

        <td><?php echo $actContentObject->lastchanged ? strftime("%A, %d %B %Y %H:%M",strtotime($actContentObject->lastchanged)):"";?></td>
The price you pay for being on the curring edge!
You do not have the required permissions to view the files attached to this post.
Last edited by Robin on Fri Apr 14, 2006 6:30 pm, edited 1 time in total.

User avatar
GlobeTrotter
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Sep 01, 2005 5:55 am
Location: Ioannina - Greece
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.04

Post by GlobeTrotter » Fri Dec 23, 2005 11:50 am

This is a great contribution to Joomla! community...

But I cannot download the attached files!!! What's going wrong? I have the same problem with Mambelfish files from the other post...

Mike

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.04

Post by Geraint » Fri Dec 23, 2005 12:04 pm

Try a different webbrowse or clearing your web-cache files.  Also if you have a firewall/security system/parental controls running make sure they don't block zip files.  Rebooting can't do any harm.

If that doesn't help - not sure what to suggest,  ???

CaptainBalou
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jan 04, 2006 11:42 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by CaptainBalou » Thu Jan 05, 2006 12:40 am

I had no problems downloading the files. But it's not working though. I'm using Joomla! 1.0.5 Stable. I get the following error on the website:

Fatal error: Call to a member function on a non-object in /data/joomla/components/com_mambelfish/mambelfish.html.php on line 62

I've asked google a while but didn't find a solution. If I uncomment the line 62 so it's not processed the error doesn't occur, but there is also no text or picture to select one of my two configured languages.

What can be the problem?

Bye
Marco

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by walb » Thu Jan 05, 2006 8:44 am

Did you install AND publish the bot in step 2?

hanselmann
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Mon Oct 17, 2005 12:21 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by hanselmann » Thu Jan 05, 2006 9:57 am

Hi

I also just installed everything and in general it seems to work.
However when I do this:

Components => Mambel Fish => Translation
and then I translate something
In the column Last modified I get this error:

Warning: strftime() expects parameter 2 to be long, string given in c:\wamp\www\joomla1.0.5\administrator\components\com_mambelfish\admin.mambelfish.html.php on line 564

Any Idea what that can be

Thanx
hanselmann

hanselmann
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Mon Oct 17, 2005 12:21 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by hanselmann » Thu Jan 05, 2006 10:14 am

Uups and another one.
When I select german in the frontend - don't see the translated versions.

Hm???

Any Idea ?

Thanx
Hanselmann

hanselmann
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Mon Oct 17, 2005 12:21 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by hanselmann » Thu Jan 05, 2006 10:20 am

Ups sorry.
I left out the ISO Code.
My fault.

Would be great to have a link on the configuration form to all ISO Codes.
Maybe this one: http://www.loc.gov/standards/iso639-2/langcodes.html

Hanselmann

CaptainBalou
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jan 04, 2006 11:42 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by CaptainBalou » Thu Jan 05, 2006 10:23 am

walb wrote: Did you install AND publish the bot in step 2?
I thought I did it. But I haven't searched any further. I tried to do it like described in http://forum.joomla.org/index.php/topic,9408.0.html (the way without changing the core files). I think it's the same but with different sources (e.g. Mambelfish from standard download site).

This way worked for me. *confused*

User avatar
flexconcept
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun Aug 21, 2005 7:37 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by flexconcept » Thu Jan 05, 2006 2:42 pm

When Installing the additional contentElement files as required it becomes confusing.
I found two different way's of doing this.
With XML files or with a mbf.php file....

When I tried the XML files found at http://forum.joomla.org/index.php/topic ... 0b0c20ce71
I got this error when translating any vm related content elements:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'and reference_table=\'vm_payment_method\'\n and language_id=2\' at SQL=select * \n from jos_mbf_content\n where reference_id=\n and reference_table=\'vm_payment_method\'\n and language_id=2

I don't get it.. Is it caused by previous experiments or am I missing something?

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by walb » Thu Jan 05, 2006 2:58 pm

Maybe this helps too with locating your ISO code.
Mambelfish comes installed with 43 iso flag images, to be used optionally for language switches in the language switching module.
These flags are found in folder:
components/com_mambelfish/images/flags/
The flags are named as follows: xx.gif
xx stands for the ISO code. E.g. en.gif (for english) or fr.gif (for french).
The use of flags is determined in the language configuration in tab frontend. There you can specify how you want the switch selection to be displayed as images (flags) or text. Vertical, horizontal or dropdownbox.
Also you can specify what to display if no translation is available. Original text or a message.

If you miss flags you can easily add them in the earlier mentioned folder.

Another thing people encounter when a translation is new (first time) made of a content item they don't see it.
That is because of a new translation is correctly saved but not automatically published. You have to publish it through the backend.
Per translation and language that is needed for each first time trranslation. After that you can change it as much as you like in the frontend and it displays immediately.

As far as contentElement files I use only xml files, which is standard for the current Mambelfish
As far as I know Geraint made it optional to use php or xml.
I use a version which is almost identical to the original MBF. I only fixed a few annoying notices.
The xml should reflect the table fields  names used you want to display translated.
The field "id" is important in this for reference. Check also the lean and mean documentation that comes with the mbf component zip.
Also looking at the standard installed xml files helps in understanding that stuff.

I hope this helps.  :)

Edit> an annoying typo.
Last edited by walb on Thu Jan 05, 2006 3:10 pm, edited 1 time in total.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Thu Jan 05, 2006 3:55 pm

flexconcept wrote: When Installing the additional contentElement files as required it becomes confusing.
I found two different way's of doing this.
With XML files or with a mbf.php file....

When I tried the XML files found at http://forum.joomla.org/index.php/topic ... 0b0c20ce71
I got this error when translating any vm related content elements:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'and reference_table=\'vm_payment_method\'\n and language_id=2\' at SQL=select * \n from jos_mbf_content\n where reference_id=\n and reference_table=\'vm_payment_method\'\n and language_id=2

I don't get it.. Is it caused by previous experiments or am I missing something?
If you are using the version of the files I attached to this message - the mbf.php files won't work and you will not be able to use mambelfish with VirtueMart.  The purpose of this topic was to put together a set of files with the bare minimum set of modifications  to enable mambelfish to run with Joomla 1.0.x - primarily for those with production sites who don't want to experiment/test a more heavily hacked version.

If you want to translate VirtueMart then you could try out my more significantly modified version of the Fixh (see http://forum.joomla.org/index.php/topic,8785.0.html and http://forum.joomla.org/index.php/topic ... 8339.&nbsp; I am working with Alex to get this functionality into a future version of Joomfish.

User avatar
flexconcept
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun Aug 21, 2005 7:37 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by flexconcept » Thu Jan 05, 2006 11:48 pm

Superb!
Using this guide and the additional information in the other threads I do now have Joomla! 1.0.5 working together with the Fish and Virtuemart.
Keep up the good work! Thnx.

??? For a while... Now Fish&Virtuemart isn't working any more.
But this is not the topic for a multilanguage shop so I'm moving to http://forum.joomla.org/index.php/topic ... #msg148339
Last edited by flexconcept on Fri Jan 06, 2006 1:34 pm, edited 1 time in total.

VR2VKH
Joomla! Intern
Joomla! Intern
Posts: 93
Joined: Thu Dec 29, 2005 2:38 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by VR2VKH » Sat Jan 07, 2006 2:34 pm

Can I ask a silly question here?

How to install the components?

Much Thanks

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 2:49 pm

I installed as told in first post, but got this error:
Warning: ereg_replace() [function.ereg-replace]: REG_EMPTY in ...\Joomla\administrator\components\com_mambelfish\mambelfish.class.php on line 1024

Warning: ereg_replace() [function.ereg-replace]: REG_EMPTY in ...\Joomla\administrator\components\com_mambelfish\mambelfish.class.php on line 1024

Fatal error: Call to a member function getCfg() on a non-object in ...\Joomla\components\com_mambelfish\classes\mambelfish.class.php on line 260
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 3:05 pm

Did you follow all of step 2 properly - I suspect you didn't publish the mambot!

Geraint

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 3:07 pm

VR2VKH wrote: Can I ask a silly question here?

How to install the components?

Much Thanks
Check out the help pages on administration (eg http://help.joomla.org/content/view/77/146/)

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 3:08 pm

Geraint wrote: Did you follow all of step 2 properly - I suspect you didn't publish the mambot!

Geraint
Yes, I did publish...
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 3:20 pm

The error

Code: Select all

Fatal error: Call to a member function getCfg() on a non-object in ...\Joomla\components\com_mambelfish\classes\mambelfish.class.php on line 260
arises if the variable $_MAMBELFISH_MANAGER is uninitialised.  This initialisation ocurrs in the bot from bot_mbf_language_system.zip (as long as you are using Joomla 1.0.2 or later) hence my suggestion that either the bot is not published properly.

Which version of Joomla are you running?

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 3:27 pm

a new installed 1.0.5
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 3:36 pm

Can you add a couple of debug messages  in the file mbf_language.php (which will be the mambots/system directory) (assuming you don't have a PHP IDE).

replace the function with

Code: Select all

function initMBF() {
	global $database, $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix,$mosConfig_lang;
        echo "reached bot step 1<br/>";
	if (file_exists( 'components/com_mambelfish/mambelfish.php' )) {
           echo "reached bot step 2<br/>";
           global $_MAMBELFISH_MANAGER, $mosConfig_mbf_content, $iso_client_lang;
	   $mosConfig_mbf_content='1';		// can also go into the configuration - but this might be overwritten!
	   require_once( "administrator/components/com_mambelfish/mambelfish.class.php");
	   require_once( "components/com_mambelfish/classes/mambelfish.class.php");
	   $database = new mlDatabase( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
	   $mosConfig_defaultLang = $mosConfig_lang;		// Save the default language of the site
	   $iso_client_lang = MambelFish::discoverLanguage( $database );
	   $_MAMBELFISH_MANAGER = new MambelFishManager();
           echo "reached bot step 3<br/>";
        } else {
	$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
	}
	return 1;
}
Note the 3 extra echo statements.  Then try the site again - you should get the three messages at the top of the page.  How far do you get?

Geraint

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 3:44 pm

steps 1 & 2 are shown.
3 isn't...(yes, the module is published...)
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 3:54 pm

Can you add a few more debug messages to isolate at which stage the mambot is failing?

My guess is it could be a problem in your language configuration.

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 4:02 pm

I did this:
function initMBF() {
global $database, $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix,$mosConfig_lang;
$i=0;
        echo "reached bot step ".++$i."";
if (file_exists( 'components/com_mambelfish/mambelfish.php' )) {
        echo "reached bot step ".++$i."";
          global $_MAMBELFISH_MANAGER, $mosConfig_mbf_content, $iso_client_lang;
        echo "reached bot step ".++$i."";
  $mosConfig_mbf_content='1'; // can also go into the configuration - but this might be overwritten!
        echo "reached bot step ".++$i."";
  require_once( "administrator/components/com_mambelfish/mambelfish.class.php");
        echo "reached bot step ".++$i."";
  require_once( "components/com_mambelfish/classes/mambelfish.class.php");
        echo "reached bot step ".++$i."";
  $database = new mlDatabase( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
        echo "reached bot step ".++$i."";
  $mosConfig_defaultLang = $mosConfig_lang; // Save the default language of the site
        echo "reached bot step ".++$i."";
  $iso_client_lang = MambelFish::discoverLanguage( $database );
        echo "reached bot step ".++$i."";
  $_MAMBELFISH_MANAGER = new MambelFishManager();
        echo "reached bot step ".++$i."";
        } else {
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
        echo "reached bot step ".++$i."";
}
        echo "reached bot step ".++$i."";
return 1;
}
And got this:
reached bot step 1
reached bot step 2
reached bot step 3
reached bot step 4
reached bot step 5
reached bot step 6
reached bot step 7
reached bot step 8
meaning this didn't run:
  $iso_client_lang = MambelFish::discoverLanguage( $database );
        echo "reached bot step ".++$i."";
  $_MAMBELFISH_MANAGER = new MambelFishManager();
        echo "reached bot step ".++$i."";
        } else {
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
        echo "reached bot step ".++$i."";
}
        echo "reached bot step ".++$i."";
return 1;
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 4:12 pm

If you add

Code: Select all

error_reporting(E_ALL);
before the class definition in compontents\com_mambelfish\classes\mambelfish.class.php it should throw more warnings, notices and errors which may give us a clue as to where things are going wrong.  It'll do no harm to add it to the start of the mbf_language.php file too.

Failing that we'll need to pepper a few deug messages in the discoverLanguage function.

mtk
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Sat Nov 12, 2005 10:55 pm
Location: Israel
Contact:

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by mtk » Sat Jan 07, 2006 4:26 pm

I added this line into the three files.
same errors...
"In a world without walls and fences,
who needs Windows & Gates?"

http://www.smartmtk.com | http://www.lighthost.co.il/webhosting-for-joomla

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sat Jan 07, 2006 5:03 pm

Nothing extra?

At this stage its a matter of working through discoverLanguage to see where the function is failing by adding some debug messages (its a lot easier with a PHP debugger  ;)).

By the way - what web server, OS, browser, DB, PHP version are you using?  Do you have register_globals emulation on or off?

Sorry its a lot of work but its a useful exercise as it will feed into the next release of Joomfish.

Geraint

john200
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 25, 2005 5:47 pm

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by john200 » Sun Jan 08, 2006 11:37 am

Hi Geraint,

I made a new Joomla 1.05 installation and used the files from your posting.

I use two languages : english and german.

For both languages I get on the frontpage for the content : "Sorry this content is not available in your selected language. "

I look in the sourcecode : mbf_language.php and replace

global $_MAMBELFISH_MANAGER, $mosConfig_mbf_content, $iso_client_lang;

with

global $_MAMBELFISH_MANAGER, $mosConfig_mbf_content, $iso_client_lang, $mosConfig_defaultLang;


With this modification it works for me in both languages. I can see the original and translated content.

After this I enable in the Global Configuration : "Debug Site"

I get the message : 0 queries executed on the frontpage at the bottom of then site.

I look again to the sourdecode and saw that the mbf_language.php is executed after the joomla.php.

In the joomla.php there was as already a line

$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );

and the code in  mbf_language.php

$database = new mlDatabase ......

must open a second instance for $database.

Further I think that the code in mbf_language.php :

        } else {
$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );

is not necessary because of the declaration in joomla.php.


After this I uninstall the bot_mbf_language_system made the necessary changes in the joomla.php and then all will work
perfect. Again I could see the querys in the debug mode.

John

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by walb » Sun Jan 08, 2006 11:50 am

Hi John,
You are quite right about the systembot! ;)
That bot was my first version systembot.
If Geraint is interested I could upload my latest.

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: Definitive guide to Mambelfish in Joomla 1.05

Post by Geraint » Sun Jan 08, 2006 2:41 pm

Hi walb

If you could upload your latest mambot that would be good and I'll add it to the first post in this topic.  If you hadn't already added it it probably makes sense to unset the $database variable (just in case!) as follows:

Code: Select all

/**
 * initialize Mambelfish
 *
 */
function initMBF() {
	global $database, $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix,$mosConfig_lang;
	if (file_exists( 'components/com_mambelfish/mambelfish.php' )) {
		global $_MAMBELFISH_MANAGER, $mosConfig_mbf_content, $iso_client_lang, $mosConfig_defaultLang;
		$mosConfig_mbf_content='1';		// can also go into the configuration - but this might be overwritten!
		require_once( "administrator/components/com_mambelfish/mambelfish.class.php");
		require_once( "components/com_mambelfish/classes/mambelfish.class.php");
		if (isset($database)) unset($database);
		$database = new mlDatabase( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
		$mosConfig_defaultLang = $mosConfig_lang;		// Save the default language of the site
		$iso_client_lang = MambelFish::discoverLanguage( $database );
		$_MAMBELFISH_MANAGER = new MambelFishManager();
	}
	return 1;
}
Geraint


Locked

Return to “Joom!Fish and Multilingual Sites”