Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 2:05 pm (All times are UTC )

 




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 361 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next
Author Message
Posted: Fri Dec 23, 2005 11:37 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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:
      <td><?php echo $row->lastchanged ? strftime(_DATE_FORMAT_LC,strtotime($row->lastchanged )) : ' '; ?></td>


And change line 754 to:
Code:
        <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.

_________________
email: opensourcematters at copynDOTplusDOTcom


Last edited by Robin on Fri Apr 14, 2006 6:30 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Fri Dec 23, 2005 11:50 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Sep 01, 2005 5:55 am
Posts: 5
Location: Ioannina - Greece
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


Top
   
 
Posted: Fri Dec 23, 2005 12:04 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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,  ???

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Thu Jan 05, 2006 12:40 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Jan 04, 2006 11:42 pm
Posts: 2
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


Top
  E-mail  
 
Posted: Thu Jan 05, 2006 8:44 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 823
Did you install AND publish the bot in step 2?


Top
  E-mail  
 
Posted: Thu Jan 05, 2006 9:57 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 17, 2005 12:21 pm
Posts: 65
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


Top
   
 
Posted: Thu Jan 05, 2006 10:14 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 17, 2005 12:21 pm
Posts: 65
Uups and another one.
When I select german in the frontend - don't see the translated versions.

Hm???

Any Idea ?

Thanx
Hanselmann


Top
   
 
Posted: Thu Jan 05, 2006 10:20 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 17, 2005 12:21 pm
Posts: 65
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


Top
   
 
Posted: Thu Jan 05, 2006 10:23 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Jan 04, 2006 11:42 pm
Posts: 2
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*


Top
  E-mail  
 
Posted: Thu Jan 05, 2006 2:42 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Aug 21, 2005 7:37 pm
Posts: 7
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?


Top
   
 
Posted: Thu Jan 05, 2006 2:58 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 823
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.

Top
  E-mail  
 
Posted: Thu Jan 05, 2006 3:55 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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 ... 339.&nbsp; I am working with Alex to get this functionality into a future version of Joomfish.

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Thu Jan 05, 2006 11:48 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Aug 21, 2005 7:37 pm
Posts: 7
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.

Top
   
 
Posted: Sat Jan 07, 2006 2:34 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Dec 29, 2005 2:38 pm
Posts: 93
Can I ask a silly question here?

How to install the components?

Much Thanks


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 2:49 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
I installed as told in first post, but got this error:
Quote:
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


Top
   
 
Posted: Sat Jan 07, 2006 3:05 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
Did you follow all of step 2 properly - I suspect you didn't publish the mambot!

Geraint

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 3:07 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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/)

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 3:08 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
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


Top
   
 
Posted: Sat Jan 07, 2006 3:20 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
The error
Code:
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?

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 3:27 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
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


Top
   
 
Posted: Sat Jan 07, 2006 3:36 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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:
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

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 3:44 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
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


Top
   
 
Posted: Sat Jan 07, 2006 3:54 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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.

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 4:02 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
I did this:
Quote:
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:
Quote:
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:
Quote:
  $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


Top
   
 
Posted: Sat Jan 07, 2006 4:12 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
If you add
Code:
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.

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sat Jan 07, 2006 4:26 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Nov 12, 2005 10:55 pm
Posts: 842
Location: Israel
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


Top
   
 
Posted: Sat Jan 07, 2006 5:03 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Posted: Sun Jan 08, 2006 11:37 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Dec 25, 2005 5:47 pm
Posts: 6
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


Top
  E-mail  
 
Posted: Sun Jan 08, 2006 11:50 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 823
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.


Top
  E-mail  
 
Posted: Sun Jan 08, 2006 2:41 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 5:23 pm
Posts: 553
Location: Gogledd Cymru
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:
/**
* 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

_________________
email: opensourcematters at copynDOTplusDOTcom


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 361 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group