sorry,
habe gerade absolut einen black out
sitze die ganze zeit daran wie ich ein block in ein leeres modul einfüge.
kann mir jemand helfen?
<?php
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
#mxGetLangfile($module_name);
$index = 0;
include("header.php");
OpenTable();
include("blocks/block-xxx.php");
$out1 = $content;
unset($content);
echo "$out1";
CloseTable();
include ("footer.php");
?>
Hi smartmusic,
probiers mal mit
echo "".$out1."";
statt
echo "$out1";
ansosnten ist dein code mit meinem identisch und bei mir funktioniert ;)
ne du,das ist es ja....bei mir wird nichts angezeigt????
hast du mal ein leeres modul nur mit einem block drin??
klar, hier haste:
<?php
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
mxGetLangfile($module_name);
$index = 0;
include_once("header.php");
OpenTable();
include("blocks/block-Letter.php");
$out1 = $content;
unset($content);
include("blocks/block-Letter.php");
$out2 = $content;
unset($content);
echo "<table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<tr valign=\"top\">
<td align=\"center\">".$out1."</td><td align=\"center\">".$out2."</td>
</tr>
</table>";
CloseTable();
echo "<br>";
include_once("footer.php");
?>
da is jetzt 2x der Newsletterblock drin ... weil meine Bloecke haste garantiert nich ;)
funktioniert absolut einwandfrei
ok,
das problem ist wohl eher das die banner blöcke nicht angezeigt werden
woran kann das liegen?
Zitatdas problem ist wohl eher das die banner blöcke nicht angezeigt werden
Ist in deinem Modul denn die Variable $block['position'] gesetzt ?
Weil wenn da nix drinne ist, kann der Bannerblock auch nix anzeigen.
Über die Variable switcht der Bannerblock ja erst in den richtigen Anzeige-Modus.
MfG
@jubilee
verstehe das nun nicht ganz,wenn ich die bannerblöcke normal benutze auf der hauptseite funktionieren sie,
nur wenn ich sie in einem modul include nicht.
$mxblockcache = FALSE;
$content = "";
if(!function_exists('viewbanner')) {
include_once("includes/mx_bannerfunctions.php");
}
switch($block['position']){
// center top
case 'c' :
$content = viewbanner(3);
break;
//center bottom
case 'd' :
$content = viewbanner(4);
break;
// left side
case 'l' :
$content = viewbanner(5);
break;
// right side
case 'r' :
$content = viewbanner(6);
break;
}
if ($content) {
$content = "<center>$content</center>";
}
Zitatswitch($block['position']){
Hierüber wird eine Anzeigeoption gesteuert, die der Block bekommt, wenn er normal angezeigt wird.
Der Aufruf ist aber anders, wenn der Block in einem Modul includiert wird.
Mach doch einmal vor dem include des blocks diese zeile :
$block['position']='r';
anstatt r kannst du einen anderen Wert nehmen. Möglich sind r (=rechts), l (=links), c (=center oben), d (=center unten).
Nehme einen Wert, für den Du im Banners-Modul auch Banner eingerichtet hast.
danke danke
woher soll man das auch wissen
funktioniert :thumbup:
eine frage noch:
wieso verschwinden sofort die rechten blöcke,wenn man in ein modul einen block included?
Zitatwieso verschwinden sofort die rechten blöcke,wenn man in ein modul einen block included?
Das :
Zitat$index = 0;
haste in deinem Modul doch geändert, oder steht das noch drinne ?
nein,steht auf 1
die blöcke verschwinden sobald ich die blöcke include,ohne blöcke oder mit conetent sind sie ja da,ganz komisch
<?php
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
#mxGetLangfile($module_name);
$index = 1;
include("header.php");
$block['position']='c';
include("blocks/block-Banner3.php");
$out1 = $content;
unset($content);
include("blocks/block-Info-Block2.php");
$out2 = $content;
unset($content);
include("blocks/block-Calendar_centerlist_muenchen.php");
$out3 = $content;
unset($content);
OpenTable();
echo "<table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<tr><td><table>
<tr valign=\"top\">
<td align=\"center\">".$out1."</td>
</tr>
<tr valign=\"top\">
<td align=\"center\">".$out3."</td>
</tr>
</table></td>";
echo "<td><table>
<tr valign=\"top\">
<td align=\"center\">".$out2."</td>
</tr>
</table></td></tr></table>";
CloseTable();
include ("footer.php");
?>