[TYPO3-german] externes PHP Script

S.Korth s.korth at dms-arts.com
Wed Aug 2 23:24:55 CEST 2006


Halli hallo,

habe es gleich einmal getestet, und siehe da ich bin schon etwas weiter.
Aber!!!! Der Text und das Bild werden zwar angezeigt, aber passen nicht 
zusammen.
Liegt es eventuell daran, das mit CONTENT_PICTURE = PHP_SCRIPT_INT das
PHP Script einmal ausgeführt wird und beim CONTENT_BESCHREIBUNG < 
CONTENT_PICTURE das zweite mal????
Werden die Variablen eventuell dabei erneut überschrieben?

Gruß,
Sascha



"Markus L. Dechert" <md at weaveit.de> schrieb im Newsbeitrag 
news:mailman.1.1154479543.30094.typo3-german at lists.netfielders.de...
> S.Korth schrieb:
>
> Servus!
>
>> Ich muss da eine Lösung finden, und wenn ich es irgendwie anders mache.
>
> Du hättest das Skript in zwei Skripte spalten können, eine
> Fallunterscheidung nach Parameterübergabe (s.u.) oder den Kram ohne
> externes PHP-Skript komplett in Typoscript lösen können. ;-)
>
>
>> Hat irgend jemand so etwas schon einmal gelöst ?
>
> Bestimmt.
>
>
>> "S.Korth" <s.korth at dms-arts.com> schrieb im Newsbeitrag
>> news:mailman.1.1154342740.17029.typo3-german at lists.netfielders.de...
>>> Erst einmal danke für deine Hilfe, aber leider habe ich da noch was 
>>> nicht
>>> ganz geschnallt.
>>>
>>> Ich bin mir auch noch nicht ganz sicher wie das PHP Skript aussehen 
>>> muss.
>>>
>>> <?php
>>>
>>> [ Datenbank per Zufall auslesen, das Ergebniss ist das Array $row ]
>>>
>>> $content = "<img blablala scr=\"$row[bild]\">";
>>>
>>> ?>
>>>
>>> Das Bild wird angezeigt, wunderbar. Aber wo lasse ich das Array
>>> $row[beschreibung],
>
> Das sollte $row['beschreibung'] oder $row["beschreibung"] heißen;
> orientiere dich lieber nicht an schlechtem PHP-Code, davon gibt es schon
> genug.
>
>
>>> damit ich das dann per typoscript in dem anderen angezeigt Subpart 
>>> bekomme
>>> ???
>
> Im Typoscript:
> CONTENT_PICTURE = PHP_SCRIPT_INT
> CONTENT_PICTURE {
>   file = fileadmin/random_picture.php
>   showPicture = 1
> }
> CONTENT_BESCHREIBUNG < CONTENT_PICTURE
> CONTENT_BESCHREIBUNG {
>   showPicture = 0
>   showText = 1
> }
>
> Im PHP dann:
> if ( !empty($conf['showPicture']) ) {
> // render picture
>        $content .= '<img src="' . $row['bild'] . '" alt=" " />';
> }
> if ( !empty($conf['showText']) ) {
> // render text
>        $content .= htmlspecialchars($row['beschreibung']);
> }
>
>
>
>>> Ich nutze die Subparts CONTENT_PICTURE und CONTENT_BESCHREIBUNG
>>>
>>> wäre super wenn ihr mir da etwas helfen könntet.
>>>
>>>
>>> Gruß,
>>> Sascha
>
> Gruß und HTH
>   Markus 





More information about the TYPO3-german mailing list