Bearbeite themes/dein_theme/theme.php, finde $template_display_media = <<<EOT
und bearbeite wie unten beschrieben. Wenn die Zeile $template_display_media = <<<EOT
in Deinem theme nicht vorhanden ist, dann kopiere// HTML template for intermediate image display
$template_display_media = <<<EOT
<tr>
<td align="center" class="display_media" nowrap="nowrap">
<table cellspacing="2" cellpadding="0" class="imageborder">
<tr>
<td align="center">
{IMAGE}
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table width="100%" cellspacing="2" cellpadding="0" class="tableb">
<tr>
<td align="center">
{ADMIN_MENU}
</td>
</tr>
</table>
<!-- BEGIN img_desc -->
<table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
<tr>
<td class="tableb"><center><b>
{TITLE}
</b></center></td>
</tr>
<!-- END title -->
<!-- BEGIN caption -->
<tr>
<td class="tableb"><center>
{CAPTION}
</center></td>
</tr>
<!-- END caption -->
</table>
<!-- END img_desc -->
</td>
</tr>
EOT;
(entnommen aus themes/sample/theme.php) in eine neue Zeile vor ?>
Wie Du siehst wird in diesem Abschnitt das rohe Design der Anzeige des Bildes in Zwischengrösse beschrieben.
Um nun dem nicht eingeloggten Benutzer eine Nachricht zukommen zu lassen müssen wir eine kleine Fallunterscheidung vornehmen - dazu dient uns eine if-Abfrage, die überprüft, ob die Konstante USER_ID gesetzt ist (was nur der Fall ist, wenn jemand angemeldet ist).
Der Code lautet dann also in etwa so:// HTML template for intermediate image display
$template_display_media = <<<EOT
<tr>
<td align="center" class="display_media" nowrap="nowrap">
EOT;
if (!USER_ID) {
$template_display_media .= <<<EOT
<table cellspacing="2" cellpadding="0" class="imageborder">
<tr>
<td align="center">
Hallo Gast,<br />
diese Nachricht bekommst Du zu sehen, weil Du nicht <a href="login.php">angemeldet</a> bist.<br />
Asche auf Dein Haupt.
</td>
</tr>
</table>
EOT;
}
$template_display_media .= <<<EOT
<table cellspacing="2" cellpadding="0" class="imageborder">
<tr>
<td align="center">
{IMAGE}
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table width="100%" cellspacing="2" cellpadding="0" class="tableb">
<tr>
<td align="center">
{ADMIN_MENU}
</td>
</tr>
</table>
<!-- BEGIN img_desc -->
<table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
<tr>
<td class="tableb"><center><b>
{TITLE}
</b></center></td>
</tr>
<!-- END title -->
<!-- BEGIN caption -->
<tr>
<td class="tableb"><center>
{CAPTION}
</center></td>
</tr>
<!-- END caption -->
</table>
<!-- END img_desc -->
</td>
</tr>
EOT;