<?php { } ?>
i teraz aby wyswiwtlic TextArea z FKKeditor musze zupelnic nastepujace wartosci:
<?php $sBasePath = $_SERVER['PHP_SELF']; $oFCKeditor = new FCKeditor('FCKeditor1'); $oFCKeditor->BasePath = 'editor/'; $oFCKeditor->Value = '<!----tutaj powinienm wysiwtlic zmienna $linia----!>'; $oFCKeditor->Create(); ?>
i nie wiem jak zrobic by ta zmienna sie tam wyswietlila caly czas albo nic sie nie wyswietla albo jakies krzaczki patrzylem do pliku ktory includuje na gorze ale nie wiem jak cos tam zmienic oto ten plik:
<?php class FCKeditor { var $InstanceName ; var $BasePath ; var $Width ; var $Height ; var $ToolbarSet ; var $Value ; var $Config ; function FCKeditor( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/editor/' ; $this->Width = '800' ; $this->Height = '600' ; $this->ToolbarSet = 'Default' ; $this->Value = '' ; } function Create() { } function CreateHtml() { $Html = '<div>' ; if ( $this->IsCompatible() ) { $Link = \"{$this->BasePath}editor/fckeditor.html?InstanceName={$this->InstanceName}\" ; if ( $this->ToolbarSet != '' ) $Link .= \"&Toolbar={$this->ToolbarSet}\" ; // Render the linked hidden field. $Html .= \"<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" />\" ; // Render the configurations hidden field. $Html .= \"<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"\" . $this->GetConfigFieldString() . \"\" />\" ; // Render the editor IFRAME. $Html .= \"<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"no\" scrolling=\"no\"></iframe>\" ; } else { $WidthCSS = $this->Width . 'px' ; else $WidthCSS = $this->Width ; $HeightCSS = $this->Height . 'px' ; else $HeightCSS = $this->Height ; $Html .= \"<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\" wrap=\"virtual\">{$HtmlValue}</textarea>\" ; } $Html .= '</div>' ; return $Html ; } function IsCompatible() { $sAgent = $HTTP_USER_AGENT ; else $sAgent = $_SERVER['HTTP_USER_AGENT']; { return ($iVersion >= 5.5); } { return ($iVersion >= 20030210); } else return false ; } function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ); } return $sParams ; } function EncodeConfig( $valueToEncode ) { '&' => '%26', '=' => '%3D', '\"' => '%22' ); } } ?>