Joomla.it Forum
Joomla! 1.5.x (versione con supporto terminato) => Joomla! 1.5 => I Template di Joomla 1.5.x => : infospa 04 Feb 2011, 17:07:36
-
Chiedo aiuto a voi guru, e un po' di tempo che provo a fare una modifica su questo template ma le mie scarse capacità con il codice mi bloccano
Vi spiego cosa vorrei fare:
semplicemnte vorrei che le tre immagini venissero viste solo ed esclusivamente in home ma nei settaggi del template c'e' solo la voce attiva immagini o disattiva, quindi o ci sono da tutte le parti o non ci sono da tutte le parti, quindi chiedo se eventualmente con una piccola modifica al codice si riusciva a fare il tutto.
vi posto il codice del template penso che la parte da modificare sia quella del <?php if ($gobotop==1) {?>
ma proprio non saprei da dove iniziare grazie a tutti in anticipo:
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" style="xhtml"/>
<?php $this->setGenerator(''); ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="./templates/little_green_world_joohopia/css/little_green_world.css" rel="stylesheet" type="text/css" />
<?php
include "joo_green.php";
?>
<style type="text/css">
body {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/background/blue_sky_back.jpg);
background-position:center;
background-position:top;
background-repeat:repeat-x;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
height:100%;
background-color: #1b2e01;
}
.littlegreen {
height:12px;
background: url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/greenbar_mini.gif);
}
.topper {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/green_top.jpg);
background-repeat:no-repeat;
background-position:right bottom;
background-color:#E5E2D5;
height:214px;
}
.menuline {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/greenbar.gif);
}
.menuline a {
color:#FFF;
}
.menuline a:hover {
color:#333;
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/bottomshadow.png);
background-repeat: repeat-x;
}
.logotop {
float:left;
}
</style>
<script src="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" class="topper"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td valign="top"><div class="logotop"><a href="index.php"><img src="<?php echo($logopic); ?>" vspace="10" alt="<?php echo($alttext); ?>" title="<?php echo($alttext); ?>"/></a></div></td>
<td align="right"><object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="214">
<param name="movie" value="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/flashglow.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
</object>
</td>
<td width="15"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="32" class="menuline"><jdoc:include type="modules" name="user3" /></td>
</tr>
[color=red][color=red][color=red]<?php if ($gobotop==1) {?>
<tr>
<td bgcolor="#000000"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="1000" height="206">
<param name="movie" value="./templates/little_green_world_joohopia/images/gobotop.swf" />
<param name="quality" value="high" />
<param name="FlashVars" value='bild1=<?php echo($pic1); ?>&bild2=<?php echo($pic2); ?>&bild3=<?php echo($pic3); ?>&menu1_name=<?php echo($menu1_name)?>&menu2_name=<?php echo($menu2_name)?>&menu3_name=<?php echo($menu3_name)?>&menu1_link=<?php echo($menu1_link)?>&menu2_link=<?php echo($menu2_link)?>&menu3_link=<?php echo($menu3_link)?>' />
<!--[if!IE]> <-->
<object data="./templates/little_green_world_joohopia/images/gobotop.swf"
width="1000" height="206" type="application/x-shockwave-flash">
<param name="quality" value="high" />
<param name="FlashVars" value='bild1=<?php echo($pic1); ?>&bild2=<?php echo($pic2); ?>&bild3=<?php echo($pic3); ?>&menu1_name=<?php echo($menu1_name)?>&menu2_name=<?php echo($menu2_name)?>&menu3_name=<?php echo($menu3_name)?>&menu1_link=<?php echo($menu1_link)?>&menu2_link=<?php echo($menu2_link)?>&menu3_link=<?php echo($menu3_link)?>' />
</object>
<!--> <![endif]-->[/color][/color][/color]
</object></td>
</tr>
<tr>
<td bgcolor="#a4d093" class="littlegreen"></td>
</tr>
<?php } ?>
<tr>
<td bgcolor="#a4d093"> </td>
</tr>
<tr>
<td bgcolor="#a4d093"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15px"></td>
<td width="165px" align="left" valign="top"><jdoc:include type="modules" name="left" style="xhtml"/>
<jdoc:include type="modules" name="user1" /></td>
<td width="15px" class="green_v"><img src="images/blank.gif" height="2" width="1" alt=""/></td>
<td valign="top"><jdoc:include type="modules" name="top" />
<jdoc:include type="modules" name="breadcrum" />
<jdoc:include type="component" /></td>
<?php if($this->countModules('right') || $this->countModules('user2')) : ?>
<td width="15px" class="green_v"><img src="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/blank.gif" height="2" width="1" alt="filler2"/></td>
<td width="165px" align="left" valign="top"><jdoc:include type="modules" name="right" />
<jdoc:include type="modules" name="user2" /></td>
<?php endif; ?>
<td width="15px"></td>
</tr>
</table>
<br /></td>
</tr>
<tr>
<td bgcolor="#969696"></td>
</tr>
<tr>
<td class="bottomer"><div align="center">
<jdoc:include type="modules" name="bottom" />
</div></td>
</tr>
</table>
<div align="center">
<jdoc:include type="modules" name="footer" />
</div>
<br />
<div class="joohopia"><a href="http://www.joohopia.com" title="joomla template by joohopia">template:joohopia.com</a></div>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
//-->
</script>
</body>
</html>
-
Ciao infospa,
fatti una copia del tuo index.php e prova questo:
<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
<?php $this->setGenerator(''); ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="./templates/little_green_world_joohopia/css/little_green_world.css" rel="stylesheet" type="text/css" />
<?php
include "joo_green.php";
?>
<style type="text/css">
body {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/background/blue_sky_back.jpg);
background-position:center;
background-position:top;
background-repeat:repeat-x;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
height:100%;
background-color: #1b2e01;
}
.littlegreen {
height:12px;
background: url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/greenbar_mini.gif);
}
.topper {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/green_top.jpg);
background-repeat:no-repeat;
background-position:right bottom;
background-color:#E5E2D5;
height:214px;
}
.menuline {
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/greenbar.gif);
}
.menuline a {
color:#FFF;
}
.menuline a:hover {
color:#333;
background-image:url(<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/bottomshadow.png);
background-repeat: repeat-x;
}
.logotop {
float:left;
}
</style>
<script src="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<body>
<table width="1055" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" class="topper"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"> </td>
<td><div class="logotop"><a href="index.php"><img src="<?php echo($logopic); ?>" alt="<?php echo($alttext); ?>" title="<?php echo($alttext); ?>"/></a></div></td>
<td align="right"><object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="214">
<param name="movie" value="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/flashglow.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
</object>
</td>
<td width="15"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="32" class="menuline"><jdoc:include type="modules" name="user3" /></td>
</tr>
<?php if(JRequest::getVar('view') == "frontpage" ) : ?>
<tr>
<td bgcolor="#000000"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="1053" height="217">
<param name="movie" value="./templates/little_green_world_joohopia/images/gobotop.swf" />
<param name="quality" value="high" />
<param name="FlashVars" value='bild1=<?php echo($pic1); ?>&bild2=<?php echo($pic2); ?>&bild3=<?php echo($pic3); ?>&menu1_name=<?php echo($menu1_name)?>&menu2_name=<?php echo($menu2_name)?>&menu3_name=<?php echo($menu3_name)?>&menu1_link=<?php echo($menu1_link)?>&menu2_link=<?php echo($menu2_link)?>&menu3_link=<?php echo($menu3_link)?>' />
<!--[if!IE]> <-->
<object data="./templates/little_green_world_joohopia/images/gobotop.swf"
width="1053" height="217" type="application/x-shockwave-flash">
<param name="quality" value="high" />
<param name="FlashVars" value='bild1=<?php echo($pic1); ?>&bild2=<?php echo($pic2); ?>&bild3=<?php echo($pic3); ?>&menu1_name=<?php echo($menu1_name)?>&menu2_name=<?php echo($menu2_name)?>&menu3_name=<?php echo($menu3_name)?>&menu1_link=<?php echo($menu1_link)?>&menu2_link=<?php echo($menu2_link)?>&menu3_link=<?php echo($menu3_link)?>' />
</object>
<!--> <![endif]-->
</object></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" class="littlegreen"></td>
</tr>
<?php endif; ?>
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15px"></td>
<td width="165px" align="left" valign="top"><jdoc:include type="modules" name="left" />
<jdoc:include type="modules" name="user1" /></td>
<td width="15px" class="green_v"><img src="images/blank.gif" height="2" width="1" alt=""/></td>
<td valign="top"><jdoc:include type="modules" name="top" />
<jdoc:include type="modules" name="breadcrum" />
<jdoc:include type="component" /></td>
<?php if($this->countModules('right') || $this->countModules('user2')) : ?>
<td width="15px" class="green_v"><img src="<?php echo(JURI::base()); ?>/templates/little_green_world_joohopia/images/blank.gif" height="2" width="1" alt="filler2"/></td>
<td width="165px" align="left" valign="top"><jdoc:include type="modules" name="right" />
<jdoc:include type="modules" name="user2" /></td>
<?php endif; ?>
<td width="15px"></td>
</tr>
</table>
<br /></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td class="bottomer"><div align="center">
<jdoc:include type="modules" name="bottom" />
</div></td>
</tr>
</table>
<div align="center">
<jdoc:include type="modules" name="footer" />
</div>
<br />
<div class="joohopia"><a href="http://www.joohopia.com" title="joomla template by joohopia">template:joohopia.com</a></div>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
//-->
</script>
</body>
</html>
Quando inserisci del codice usa il tastino # Grazie.
-
Grazie mille per la risposta, la modifica funziona al contrario non si vede in home, e si vede nelle altre, e purtroppo perde alcuni parametri e sballa il template. Lo lascio per dieci min cosi' se eventualmente riesci a vederlo www.apslunigianafoto.it
-
Mi sembra si veda solo nella pagina In prima pagina e non nelle altre. Magari è quella la tua pagina predefininita come Home? Per il template sballato non saprei, non mi sembra, ma non so come era prima. A me funziona perfettamente. Ho installato il template pulito, senza modifiche. Tu ne avevi fatte?
-
Hai ragione, la mia prima pagina non corrisponde alla home, infatti avevo scelto proprio questo template per avere come home le tre foto e come prima pagina un tasto nel menu che mi ci porta, una sorta di splash screen, quindi capisco perche' cosi non funziona, si può fare qualcosa?, il template probabilmente mi sballa perche' ho accorciato la larghezza per farlo stare in una risoluzione di 1024X768.
-
Questo è il codice che ho utilizzato
<?php if(JRequest::getVar('view') == "frontpage" ) : ?>
------codice gallery--------
<?php endif; ?>
mettilo sulla tua index.php nei punti dive l'ho messo io.
Oppure puoi duplicare il template, togliere la slide e assegnare quello originale solo alla pagina che ti serve e quello modificato alle altre. Così scegli in che pagina la preferisci.
-
Ho modificato il codice che mi hai consigliato in questo modo
<?php if(JRequest::getVar('id') == "numero id dell'articolo" ) : ?>
il tutto sembra funzionare, dimmi se ho fatto una cavolata.
Siete comunque fantastici e disponibilissimi.
-
Perfetto! :) Molto astuto. ;D
-
Ah, ricordati il [RISOLTO]. Grazie mille.
-
Grazie ancora metto risolto nel titolo magari a qualcuno potrà servire. Comunque se volete registrarvi al sito siete ben accetti.
Grazie grazie e grazie ancora.....