Differenze tra un template per Mambo versione 4.5.0 e 4.5.1
Transcript
Differenze tra un template per Mambo versione 4.5.0 e 4.5.1
Differenze tra un template per Mambo versione 4.5.0 e 4.5.1 (22 Giu, 2005 at 04:45 AM) - Contributi di Roberto D'Alessio - Ultimo aggiornamento (29 Lug, 2005 at 07:36 PM) Differenze tra un template per Mambo versione 4.5.0 e 4.5.1 Mostriamo due versioni di uno stesso template, ma per versioni diverse di Mambo. Il cambio del codice è mostrato in rosso. Se vuole mantenere i template anche per le versioni successive si deve fare le modifiche a mano. Principali Differenze ElementoMambo 4.5.0Mambo 4.5.1Metataginclude ("includes/metadata.php");mosShowHead();Editor wysiwyginclude ("editor/editor.php"); initEditor();if ( $my->id ) initEditor();Pathwayinclude_once("pathway.php");include $GLOBALS['mosConfig_absolute_path'] . '/pathway.php';Corpo principale include_once("mainbody.php");mosMainBody();Variabli globali$mosConfig_live_site$GLOBALS['mosConfig_live_site']$mosConfig_absolute_path$GLOBALS['mosConfig_absolu te_path']$mosConfig_sitename$GLOBALS['mosConfig_sitename']$mosConfig_offset$GLOBALS['mosConfig_offset']Ban nersmosLoadComponent( "banners" ); mosLoadModules( 'banner', -1 ); Codice dei moduli mostrati nel template di Mambo In Mambo 4,5,1 si può scegliere se mostrare i moduli : in una tablella o un div o semplicemete senza nessun tempalte(no wrapped). <?php mosLoadModules ( 'left'); ?> Modulo mostrado nel modo normale dentro una tabella <?php mosLoadModules ( 'left', -1 ); ?> Modulo mostrato dentro un div <?php mosLoadModules ( 'left', -2 ); ?> Modulo mostrato (no wrapped) Posizione dei moduli <?php mosLoadModules( "left" ); ?> Modulo mostrado a sinistra <?php mosLoadModules( "right" ); ?> Modulo disposto a destra <?php mosLoadModules( "top" ); ?> Modulo disposto nella parte centrale, altro <?php mosLoadModules( "bottom" ); ?> Modulo disposto nella parte centrale, in basso <?php mosLoadModules( "user1" ); ?> Primo modulo a disposizione del utente <?php mosLoadModules( "user2" ); ?> <?php mosLoadModules( "inset" ); ?> Codice del Template per Mambo 4.5.0 <?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); echo "<?xml version="1.0"?>"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo $mosConfig_sitename; ?></title> <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> <?php include ("includes/metadata.php"); include ("editor/editor.php"); initEditor(); ?> <script language="JavaScript" type="text/javascript"> <!-function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <link href="<?php echo $mosConfig_live_site;?>/templates/mi_template/css/template_css.css" rel="stylesheet" type="text/css" /> </head> <body> <a name="up" id="up"></a> <table border="0" cellpadding="0" cellspacing="0" width="770" height="100%"> <tr> <td width="180" height="75" bgcolor="#000000" align="center" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/big_grass.jpg"> </td> <td style="border-right:1px solid #000000; border-left:1px solid #000000;"width="575" height="75" bgcolor="#339933" http://www.supportomambo.it - Supportomambo.it : il supporto ufficiale italiano a Mambo Powered by Mambo Generato:17 March, 2017, 05:57 background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/slogan_back.jpg"> </td> <td width="15" height="75" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_right.png"> </td> </tr> <tr> <td style="border-bottom:1px solid #000000; " width="180" bgcolor="#DDDDDD" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/module_shading.png" valign="top"> <!-- LEFT Modules --> <?php mosLoadModules ( "left" ); ?> </td> <td style="border:1px solid #000000; background: #fff url('<?php echo $mosConfig_live_site;?>/templates/mi_template/images/small_grass.jpg') repeat-x bottom;" valign="top" height="100%"> <table border="0" cellpadding="2" cellspacing="0" width="100%" height="100%"> <tr> <td height="30" width="30"> </td> <td height="30" width="513" style="background:url('templates/mi_template/images/dotimage.gif') repeat-x bottom;" class="pathway"><?php include_once("pathway.php"); ?></td> <td height="30" width="30"> </td> </tr> <tr> <td width="30" height="100%"> </td> <td width="513" height="100%" valign="top"> <!-- Main Content Section --> <?php include_once("mainbody.php"); ?> </td> <td width="30" height="100%"> </td> </tr> <tr> <td height="30" width="30"> </td> <td class="pathway" height="30" width="513" align="right" style="background:url('templates/mi_template/images/dotimage.gif') repeat-x top;"><a href="<?php echo sefRelToAbs($_SERVER['REQUEST_URI'])."#up"; ?>">Top of page</a></td> <td height="30" width="30"> </td> </tr> </table> </td> <td width="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_right.png"> </td> </tr> <tr> <td width="180" height="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottom.png"></td> <td height="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottom.png"></td> <td width="15" height="15"><img border="0" src="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottomright.png" width="15" height="15"></td> </tr> </table> </body> </html> Codice dello stesso Template, per Mambo 4.5.1<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); $iso = split( '=', _ISO ); echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php if ( $my->id ) initEditor(); ?> <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> <?php mosShowHead(); ?> <link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site; http://www.supportomambo.it - Supportomambo.it : il supporto ufficiale italiano a Mambo Powered by Mambo Generato:17 March, 2017, 05:57 ?>/templates/mi_template/css/template_css.css" /> </head> <body> <a name="up" id="up"></a> <table border="0" cellpadding="0" cellspacing="0" width="770" height="100%"> <tr> <td width="180" height="75" bgcolor="#000000" align="center" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/big_grass.jpg"> </td> <td style="border-right:1px solid #000000; border-left:1px solid #000000;"width="575" height="75" bgcolor="#339933" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/slogan_back.jpg"> </td> <td width="15" height="75" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_right.png"> </td> </tr> <tr> <td style="border-bottom:1px solid #000000; " width="180" bgcolor="#DDDDDD" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/module_shading.png" valign="top"> <!-- LEFT Modules --> <?php mosLoadModules ( "left" ); ?> </td> <td style="border:1px solid #000000; background: #fff url('<?php echo $mosConfig_live_site;?>/templates/mi_template/images/small_grass.jpg') repeat-x bottom;" valign="top" height="100%"> <table border="0" cellpadding="2" cellspacing="0" width="100%" height="100%"> <tr> <td height="30" width="30"> </td> <td height="30" width="513" style="background:url('templates/mi_template/images/dotimage.gif') repeat-x bottom;" class="pathway"><?php include $GLOBALS['mosConfig_absolute_path'] . '/pathway.php'; ?></td> <td height="30" width="30"> </td> </tr> <tr> <td width="30" height="100%"> </td> <td width="513" height="100%" valign="top"> <!-- Main Content Section --> <?php mosMainBody(); ?> </td> <td width="30" height="100%"> </td> </tr> <tr> <td height="30" width="30"> </td> <td class="pathway" height="30" width="513" align="right" style="background:url('templates/mi_template/images/dotimage.gif') repeat-x top;"><a href="<?php echo sefRelToAbs($_SERVER['REQUEST_URI'])."#up"; ?>">Top of page</a></td> <td height="30" width="30"> </td> </tr> </table> </td> <td width="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_right.png"> </td> </tr> <tr> <td width="180" height="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottom.png"></td> <td height="15" background="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottom.png"></td> <td width="15" height="15"><img border="0" src="<?php echo $mosConfig_live_site;?>/templates/mi_template/images/shadow_bottomright.png" width="15" height="15"></td> </tr> <tr> <td width="180"></td> <td><?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?></td> <td width="15"></td> </tr> </table> </body> </html> http://www.supportomambo.it - Supportomambo.it : il supporto ufficiale italiano a Mambo Powered by Mambo Generato:17 March, 2017, 05:57 http://www.supportomambo.it - Supportomambo.it : il supporto ufficiale italiano a Mambo Powered by Mambo Generato:17 March, 2017, 05:57