Back to top

Autore Topic: modifica file SEF service map  (Letto 2284 volte)

Offline Mormile

  • Esploratore
  • **
  • Post: 61
    • Mostra profilo
modifica file SEF service map
« il: 07 Mag 2009, 19:31:05 »
Salve a tutti,

vi scrivo perchè dovrei trasformare una struttura <table> in una struttura <div>.
Si tratta del file sefservicemap.php del componente SEF service map.

di seguito vi incollo un estratto del codice di questa pagina, quello che definisce la tabella da trasformare.

Appena provo a cambiare qualcosa nella struttura della tabella e ad inserire dei div mi si spara una gran bella pagina bianca.

Qualcuno può darmi una mano?


Codice: [Seleziona]
if ($mainframe->maptype == 'html') $MyHTML_sefservicemap->RenderMapHTMLHeader();
else $MyHTML_sefservicemap->RenderMapXMLHeader();

if ($mainframe->maptype == 'html') {

echo '<table class="sitemap" width="100%"><tr><td valign="top">';
}

$query = "select id,name,ordering AS menu_ordering ,published AS menu_published, params FROM #__sef_sm_menus WHERE published='1' ORDER BY `ordering` ASC";
$this->database->setQuery($query);
$menus=$this->database->LoadObjectList();

$titlearr = array();
$query = "select * FROM #__menu_types";
$this->database->setQuery($query);
$menutp = $this->database->loadObjectList();
if ($menutp) {
foreach ($menutp as $menut) {
$titlearr[$menut->menutype] = $menut->title;
}
}

$menu_titles=$mainframe->ParamsArray->get( 'menu_titles', '1' );
$show_menu_icons= intval($mainframe->ParamsArray->get('show_menu_icons','0'));
$icon_path = $mainframe->ParamsArray->get('icon_path','');
$show_module_icons = intval($mainframe->ParamsArray->get('show_module_icons','1'));
if ($icon_path=='') $icon_path =DS.'components'.DS.'com_sefservicemap'.DS.'images';
global $mainframe;

foreach ($menus as $menu) {
$menu->title = $titlearr[$menu->name];
$level=0;
$pars = new JParameter($menu->params);
$title = $menu->name;
$menutype=$menu->name;
$menu_images = intval($pars->get('menu_images','0'));
if ($menu_titles) {
$level=1;
$mainframe->sm_menuitem_id=$menu->id;
$element='';
$element->link='';
$element->name=$menu->title;
$element->level=0;
if ($show_module_icons) $element->image='menu.gif'; else $element->image='none';
$element->icon_path=$icon_path;
$element->description = '';
$counter++;
switch ($mainframe->maptype) {
case 'html' : show_element ($element, $start, $end, $counter); break;
case 'xml' : show_xml_element ($element, $start, $end, $counter); break;
case 'txt' : show_txt_element ($element, $start, $end, $counter); break;
}

}
$this->print_menu($title,$menutype,0,$level,$menu_images,$show_menu_icons,$icon_path, $start, $end, $counter);
if ($menu_titles) {
$mainframe->sm_menuitem_id=$menu->id;
$element='';
$element->name= '&nbsp;';
$element->link='';
$element->level=10;
$element->image='none';
$element->icon_path=$icon_path;
$element->description = '';
$counter++;
switch ($mainframe->maptype) {
case 'html' : show_element ($element, $start, $end, $counter); break;
case 'xml' : show_xml_element ($element, $start, $end, $counter); break;
case 'txt' : show_txt_element ($element, $start, $end, $counter); break;
}
}
}

if ($mainframe->maptype == 'html') {
echo '</td></tr></table>';

if ($items_pagination) {
echo '<table width="100%"><tr><td height="20px"></td></tr><tr><td align="center">'.$pagenav->getPagesLinks( ).'</td></tr><tr><td height="30px"></td></tr></table>';
}
$MyHTML_sefservicemap->RenderMapHTMLFooter();

}
else if ($mainframe->maptype=='xml') $MyHTML_sefservicemap->RenderMapXMLFooter();
}

}
$mysefservicemap = new sefservicemap();
?>

Grazie a tutti in anticipo!

Fabio
visit me @ www.netenjoy.it

 



Web Design Bolzano Kreatif