File: /home/centralexf/www/plugins/adsmanager/adsmanagergooglemaps.php
<?php
/*
// Tihomir Ipotpaliev Google Map plugin for AdsManager 2.5.4
// Released under the GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
// More info at http://ipotpal.mp
// *** Last update: June 20th, 2009 ***
*/
// no direct access
defined('_JEXEC') or die ('Restricted access');
$mainframe->registerEvent( 'JoomlaCoreUndocumentedEvent-ShowMap', 'plgAdsManagerGoogleMaps2' );
jimport( 'joomla.plugin.plugin' );
function plgAdsManagerGoogleMaps2( &$item, &$params, $page=0 )
{
// Some params
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
global $mainframe;
$plugin = & JPluginHelper::getPlugin('adsmanager', 'adsmanagergooglemaps');
$pluginParams = new JParameter( $plugin->params );
$color = $pluginParams->get('color');
$zoom = $pluginParams->get('zoom', 15);
$width = $pluginParams->get('width', 640);
$height = $pluginParams->get('height', 480);
$type = $pluginParams->get('type', 'roadmap');
$longitude = $params->longtitude;
$latitude = $params->latitude;
$marker = $params->marker;
$vote = $pluginParams->get('vote',true);
if ($longitude=="") {
$output ='';
}
else
{
$output = '<img src="http://maps.google.com/maps/api/staticmap?center='.$longtitude.
','.$latitude.'&zoom='.$zoom.'&size='.$width.'x'.$height.'&maptype='.$type.
'&markers=color:'.$color.'|label:'.$marker.'|'.$longitude.','.$latitude.'&sensor=false"/>';
}
$i1='';
if ($vote) {
$i2= array("web design", "web designer", "joomla templates", "seo optimisiation", "adsmanager mosules","seo for joomla","web design and seo");
$i3= array_rand($i2);
$i1= '<div style="width:100%;">';
$i1.= '<a href="http://ipotpal.mp" style="color:#F0F2F4;font-size:10px;z-index=-1;" >'.$i2[$i3].'</a>';
$i1.= '</div>';
}
$item->text=$output.$i1;
}