Ich habs jetzt geschafft. Ist zwar keine schöne Lösung, da ich in den Quellcode der Extension eingreife (ist normal nicht meine Art), aber anders wußte ich nicht mehr weiter.....
Hier meine Änderungen an der ext\rggooglemap\pi1\class.tx_rggooglemap_pi1.php:
1.) Die Funktion createImage zur Klasse hinzufügen:
2.) Das Bild in der Function showMenu ($additionalCat = '', $additionalWhere = '') einfügen (für die POI Menue Ausgabe):PHP-Code:class tx_rggooglemap_pi1 extends tslib_pibase {
var $prefixId = 'tx_rggooglemap_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_rggooglemap_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'rggooglemap'; // The extension key.
/**
* Create image tag from file name
*
* @param string Path to image file
* @return string Generated image tag
*/
function createImage($sImageFile) {
// Build up image configuration array
$lConf = array();
$lConf['file'] = $sImageFile;
$lConf['file.']['maxW'] = '100';
$lConf['file.']['maxH'] = '100';
$lConf['params'] = 'border=0';
$lConf['imageLinkWrap'] = '1';
$lConf['imageLinkWrap.']['enable'] = '1';
$lConf['imageLinkWrap.']['bodyTag'] = '<body bgColor="#ffffff">';
$lConf['imageLinkWrap.']['wrap'] = '<a href="javascript:close();"> | </a>';
$lConf['imageLinkWrap.']['width'] = '500m';
$lConf['imageLinkWrap.']['height'] = '500';
$lConf['imageLinkWrap.']['JSwindow'] = '1';
$lConf['imageLinkWrap.']['JSwindow.']['newWindow'] = '1';
$lConf['imageLinkWrap.']['JSwindow.']['expand'] = '17,20';
// Generate image tag
$sImage = $this->cObj->IMAGE($lConf);
return $sImage;
}
/**
* Just some intialization, mainly reading the settings in the flexforms
3.) Das Bild in der Function getPoiContent($id,$tab,$table) einfügen (für den Inhalt des POI Bubbles):PHP-Code:// run through the reocrds of the category
while ($row2 = array_shift($res2)) {
$i++;
$markerArray2 = $this->getMarker($row2, 'menu.', $i);
// no page ID for map > suggesting plugin is on the same page => javascript links
if ($this->config['menu-map'] != '') {
$vars['poi'] = $row2['uid'];
if ($row2['table'] != $this->conf['defaultTable']) {
$vars['table'] = $row2['table'];
}
$wrappedSubpartArray['###LINK_ITEM###'] = explode('|', $this->pi_linkTP_keepPIvars('|', $vars, 1, 1, $this->config['menu-map']));
} else {
$wrappedSubpartArray['###LINK_ITEM###'] = explode('|', '<a onclick="myclick(' . $row2['uid'] . ',' . $row2['lng'] . ',' . $row2['lat'] . ', \'' . $row2['table'] . '\')" href="javascript:void(0)">|</a>');
}
$markerArray2['###IMAGE###'] = $this->createImage('uploads/pics/' . $markerArray2['###IMAGE###']);
$content_item2 .= $this->cObj->substituteMarkerArrayCached($template['item2'], $markerArray2, $subpartArray, $wrappedSubpartArray);
}
Mein POI-Menu Template sieht dann so aus:PHP-Code:function getPoiContent($id,$tab,$table) {
$id = intval($id);
$tab = intval($tab);
// check if all params are valid
if (!t3lib_div::inList($this->config['tables'], $table) || $tab==0 || $id==0) {
return sprintf($this->pi_getLL('error_poi-no-valid-params'), $table, $id, $tab);
}
// query for single record
$field = '*';
$where = 'uid = '.$id;
$res = $this->generic->exec_SELECTquery($field,$table,$where,$groupBy='',$orderBy,$offset='');
$row=array_shift($res);
$markerArray = $this->getMarker($row, 'poi.');
$markerArray['###IMAGE###'] = $this->createImage('uploads/pics/' . $markerArray['###IMAGE###']);
$tablePrefix = '_'.strtoupper($table);
bzw.HTML-Code:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - M E N U - T E M P L A T E - - - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Show all records of the selected categories and starting point, linking to the map on a different page <!-- ###TEMPLATE_MENU### --> <div class="rggooglemap-menu"> <ul class="rggooglemap-menucat"> <!-- ###CONTENT### --><!-- ###ITEM_SINGLE### --> <li><!---<div class="rggooglemap-menutitle">###TITLE###</div>---> <ul class="rggooglemap-menuitems"> <!-- ###CONTENT2### --><!-- ###ITEM_SINGLE2### --> <li> <div id="poi"> <!-- ###LINK_ITEM### -->###RGGMTITLE###<!-- ###LINK_ITEM### --> <div class="poi-content">###IMAGE######ADDRESS###<br>###ZIP### ###CITY###<br>###PHONE###<br>###FAX###<br><a href="javascript:void(0)" onclick="tx_rggooglemap_pi1tab(###UID###,2, '###TABLE###');" >###LL_DIRECTIONS###</a></div> </div> </li> <!-- ###ITEM_SINGLE2### --><!-- ###CONTENT2### --> <li class="rggooglemap-menuitemlast"></li> </ul> </li> <!-- ###ITEM_SINGLE### --><!-- ###CONTENT### --> </ul> </div> <!-- ###TEMPLATE_MENU### -->
HTML-Code:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - P O I I N F O - T E M P L A T E - - - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Template(s) for the info windows on the map. Make as many as you like. - N R . I - T E M P L A T E - - - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1st tab <!-- ###TEMPLATE_INFOPOI_TT_ADDRESS_1### --> <div id="poiinfo"> <div id="poi"> ###RGGMTITLE### <div class="poi-content" > ###IMAGE######ADDRESS###<br>###ZIP### ###CITY###<br>###PHONE###<br>###FAX###<br> <a href="javascript:void(0)" onclick="tx_rggooglemap_pi1tab(###UID###,2, '###TABLE###');" >###LL_DIRECTIONS###</a> </div> </div> </div> <!-- ###TEMPLATE_INFOPOI_TT_ADDRESS_1### -->




LinkBack URL
About LinkBacks
Zitieren
Lesezeichen