Home arrow Test arrow Maps in components & contact
Maps in components & contact PDF Print E-mail
Written by Mike Reumer   
Thursday, 20 September 2007

You make the plugin work in components and contacts!

You have to hack Joomla. In Joomla 1.0.x you have to hack the index.php in the root of your site.

Replace these lines (244-246):

$_MOS_OPTION['buffer'] = ob_get_contents();

ob_end_clean();

With the following lines:
$_MOS_OPTION['buffer'] = ob_get_contents();
 
$_MAMBOTS->loadBotGroup( 'content' );
$tmp_row = new stdClass();
$tmp_params = new mosParameters('');
$tmp_row->text = $_MOS_OPTION['buffer'];
$_MAMBOTS->trigger( 'onMap', array( &$tmp_row, &$tmp_params ), true );
$_MOS_OPTION['buffer'] = $tmp_row->text;
 
ob_end_clean();
 
If your using a version below 2.10d then use:
$_MAMBOTS->trigger( 'onPrepareContent', array( &$tmp_row, &$tmp_params ), true );
The event onPrepareContent will trigger all the mambots instead of only the google map plugin.
 
Now it will show the map if it's placed in components and the contact form of Joomla!
 
In the contact form you have to place text or & nbsp; otherwise the map won't work.
 
It's not recommended to hack Joomla and it's for your own risk. 
Last Updated ( Thursday, 27 December 2007 )
 
< Prev   Next >

Search

Google

Advertisement