Danke. Klappt
Hier für alle das für
PHP5 modifizierte Modul. (ohne Gewähr
)
IN:
Code: Alles auswählen
<?php
//http://www.redaxo.org/de/download/module/?modul_id=526&searchtxt=script&cat_id=-1
/**
*==================================================
* REDAXO-Modul: Quelltext (php/html/css/js)
* Bereich: Eingabe
* Version: 1>
* Redaxo Version: 4.3.2 PHP 5.3.1
*
* Hinweise:
*
* Erforderliche Addons:
* Bearbeitung: chandany und cheffchen 07.01.2012 //http://www.redaxo.org/de/forum/post96980.html#p96980
* Bearbeitung: Stefan Schölzel
* Datum: 06.03.2010
* Ursprung: Jan Kristinus [Yakamara Media GmbH & Co. KG]::Minibeispiel PHP
* Typ: Modifikation
* Ursprungsname: Minibeispiel PHP
* Ursprung-Datum: /KA/
*==================================================
*/
?>
Bitte hier den Quelltext(html/php/css/js) eingeben
<p class="rex-form-textarea"><textarea style="width:90%; height:200px;" rows="10" cols="50" class="rex-form-textarea" name="VALUE[1]" id="VALUE[1]">REX_VALUE[1]</textarea></p>
OUT:
Code: Alles auswählen
<?php
//http://www.redaxo.org/de/download/module/?modul_id=526&searchtxt=script&cat_id=-1
/**
*==================================================
* REDAXO-Modul: Quelltext (php/html/css/js)
* Bereich: Eingabe
* Version: 1>
* Redaxo Version: 4.3.2 PHP 5.3.1
*
* Hinweise:
*
* Erforderliche Addons:
* Bearbeitung: chandany und cheffchen 07.01.2012 //http://www.redaxo.org/de/forum/post96980.html#p96980
* Bearbeitung: Stefan Schölzel
* Datum: 06.03.2010
* Ursprung: Jan Kristinus [Yakamara Media GmbH & Co. KG]::Minibeispiel PHP
* Typ: Modifikation
* Ursprungsname: Minibeispiel PHP
* Ursprung-Datum: /KA/
*==================================================
*/
if (!function_exists('unhtmlentities')){
function unhtmlentities($string){
// Ersetzen numerischer Darstellungen
$string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
$string = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $string);
// Ersetzen benannter Zeichen
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
}
if(!$REX['REDAXO']):?>
REX_PHP_VALUE[1]
<?php else:
$sourceCode = 'REX_VALUE[1]';
$sourceCode = explode(
"\n",
str_replace(array("\r\n", "\r"), "\n", $sourceCode)
);
$lineCount = 1;
$formatCode = null;
foreach($sourceCode as $codeLine){
$codeLine = str_replace('<br />', '', $codeLine);
$codeLine = unhtmlentities($codeLine);
$formatCode .= '<tr><td style="padding:0; font-size:0.5em;">'. $lineCount++ .'</td>';
if(preg_match('/<\?(php)?[^[:graph:]]/', $codeLine)){
//if(ereg('<\?(php)?[^[:graph:]]', $codeLine)){
$formatCode .= '<td style="padding:0;">'. highlight_string($codeLine, true).'</td></tr>';
}else{
$formatCode .= '<td style="padding:0;">'.
str_replace('<?php ', '', highlight_string('<?php '. $codeLine, true)).
'</td></tr>';
}
}
print <<<EOA
<table class="rex-table">
{$formatCode}
</table>
EOA;
endif;?>
Was man damit anstellen kann?
1.) z.B. für Gallerien individuelle js scripts in den haeder einbinden
2.) sehr individuelle css Anweisungen etc.
Tip:
im Template einen Haeder-Bereich einrichten und das Modul diesem zuweisen.