Próbowałem już dodawać do sobi2.details.tmpl.php
To cały kod z pliku:
Kod PHP:
<center><?php echo $this->plugins['reviews']->showRating($mySobi->id); ?></center><?php
/**
* @version $Id: sobi2.details.tmpl.php 4987 2009-04-03 11:05:29Z Radek Suski $
* @package: Sigsiu Online Business Index 2
* ===================================================
* @author
* Name: Sigrid & Radek Suski, Sigsiu.NET
* Email: sobi@sigsiu.net
* Url: http://www.sigsiu.net
* ===================================================
* @copyright Copyright (C) 2006 - 2009 Sigsiu.NET (http://www.sigsiu.net). All rights reserved.
* @license see http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL.
* You can use, redistribute this file and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*/
/*please do not remove this line */
defined( '_SOBI2_' ) || ( trigger_error("Restricted access", E_USER_ERROR) && exit() );
/* ------------------------------------------------------------------------------
* This is the template for the Details View
* ------------------------------------------------------------------------------
*/
?>
<body onload='mapaStart()' onunload='GUnload()'>
<?php HTML_SOBI::renewal( $config,$mySobi );
$tytul=mysql_fetch_array(mysql_query("select * from jos_sobi2_item where itemid='".$_GET['sobi2Id']."'"));
$mapa=mysql_fetch_array(mysql_query("select * from jos_sobi2_fields_data where itemid='".$_GET['sobi2Id']."' and fieldid='3'"));
$ulica=mysql_fetch_array(mysql_query("select * from jos_sobi2_fields_data where itemid='".$_GET['sobi2Id']."' and fieldid='1'"));
$Uzyj_mapa=mysql_fetch_array(mysql_query("select * from jos_sobi2_config where configKey='useGoogleMaps' "));
?>
<table class="sobi2Details" <?php echo $style; ?> >
<tr>
<td><?php echo $ico; ?><h1><?php echo $mySobi->title; ?></h1></td>
</tr>
<tr>
<td><?php echo $img; ?></td>
</tr>
<tr>
<td>
<div id="sobi2outer">
<?php echo HTML_SOBI::customFieldsData( $fieldsFormatted );?>
<br />
<?php if ($Uzyj_mapa[1]==1){ ?>
<script type='text/javascript'>
var geo;
var mapa;
function mapaStart()
{
if(GBrowserIsCompatible())
{
mapa = new GMap2(document.getElementById("maps"),{mapTypes: [G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]});
mapa.addControl(new GLargeMapControl());
var typyMapy = mapa.getMapTypes();
typyMapy[0].getName= function() { return "Mapa";}
typyMapy[1].getName = function() { return "Satelita";}
typyMapy[2].getName = function() { return "Hybryda";}
mapa.addControl(new GMapTypeControl());
mapa.addControl(new GOverviewMapControl());
mapa.addControl(new GScaleControl());
geo = new GClientGeocoder();
var adres='<?php echo $zapytanie[1][21];?><?php echo $mapa[2];?> , <?php echo $ulica[2];?>';
geo.getLatLng(adres,function(punkt)
{
if (!punkt)
{
alert(adres + " nie został odnaleziony!");
}
else
{
mapa.setCenter(punkt, 15);
var ikona = new GIcon();
ikona.image='http://maps.google.com/mapfiles/kml/pal3/icon52.png';
ikona.shadow='';
ikona.iconSize=new GSize(32,32);
ikona.iconAnchor=new GPoint(16,16);
ikona.infoWindowAnchor=new GPoint(16,16);
var marker = new GMarker(punkt,{icon: ikona, title: adres});
mapa.addOverlay(marker);
marker.openInfoWindowHtml('<strong><?php echo $tytul[1]; ?></strong><br />'+adres);
}
});
}
}
-->
</script>
</div>
</td>
</tr><tr><td><div id="maps" style=" height: 350px; border: 1px solid black; background: gray;">
</div></td></tr><tr><td><?php HTML_SOBI::waySearchUrl( $waySearchLink,$config ); ?></td></tr> <?php } ?>
</table>
<table class="sobi2DetailsFooter" width="100%">
<tr>
<td>
<?php HTML_SOBI::addedDate($config,$mySobi); ?>
<?php HTML_SOBI::showHits($config,$mySobi);?>
</td>
<td><?php HTML_SOBI::editButtons($config,$mySobi); ?></td>
</tr>
</table>
<center>
</center>
</p>
<?php echo $plugins['reviews']; ?>
<?php echo $plugins["jcomments"]; ?>
Chyba że nie w tym miejscu co powinienem