Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

Alguien de usted conoce editor fckeditor

Estas en el tema de Alguien de usted conoce editor fckeditor en el foro de Sistemas de gestión de contenidos en Foros del Web. Alguien conoce lo que es editor fckeditor y si lo conocen y lo han instalado me podrian decir como. o si pueden traducirme esto @import ...
  #1 (permalink)  
Antiguo 30/12/2008, 04:36
 
Fecha de Ingreso: diciembre-2008
Mensajes: 52
Antigüedad: 15 años, 3 meses
Puntos: 0
Alguien de usted conoce editor fckeditor

Alguien conoce lo que es editor fckeditor y si lo conocen y lo han instalado me podrian decir como.

o si pueden traducirme esto


Código perl:
Ver original
  1. #####
  2. #  FCKeditor - The text editor for Internet - [url]http://www.fckeditor.net[/url]
  3. #  Copyright (C) 2003-2008 Frederico Caldeira Knabben
  4. #
  5. #  == BEGIN LICENSE ==
  6. #
  7. #  Licensed under the terms of any of the following licenses at your
  8. #  choice:
  9. #
  10. #   - GNU General Public License Version 2 or later (the "GPL")
  11. #     [url]http://www.gnu.org/licenses/gpl.html[/url]
  12. #
  13. #   - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14. #     [url]http://www.gnu.org/licenses/lgpl.html[/url]
  15. #
  16. #   - Mozilla Public License Version 1.1 or later (the "MPL")
  17. #     [url]http://www.mozilla.org/MPL/MPL-1.1.html[/url]
  18. #
  19. #  == END LICENSE ==
  20. #
  21. #  This is the integration file for Perl.
  22. #####
  23.  
  24. #my $InstanceName;
  25. #my $BasePath;
  26. #my $Width;
  27. #my $Height;
  28. #my $ToolbarSet;
  29. #my $Value;
  30. #my %Config;
  31.  
  32. sub FCKeditor
  33. {
  34.  
  35.     local($instanceName) = @_;
  36.     $InstanceName   = $instanceName;
  37.     $BasePath       = '/fckeditor/';
  38.     $Width          = '100%';
  39.     $Height         = '200';
  40.     $ToolbarSet     = 'Default';
  41.     $Value          = '';
  42. }
  43.  
  44. sub Create
  45. {
  46.     print &CreateHtml();
  47. }
  48.  
  49. sub specialchar_cnv
  50. {
  51.  
  52.     local($ch) = @_;
  53.  
  54.     $ch =~ s/&/&/g;     # &
  55.     $ch =~ s/\"/"/g;   #"
  56.     $ch =~ s/\'/'/g;    # '
  57.     $ch =~ s/</&lt;/g;      # <
  58.     $ch =~ s/>/&gt;/g;      # >
  59.     return($ch);
  60. }
  61.  
  62. sub CreateHtml
  63. {
  64.  
  65.     $HtmlValue = &specialchar_cnv($Value);
  66.     $Html = '' ;
  67.     if(&IsCompatible()) {
  68.         $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName";
  69.         if($ToolbarSet ne '') {
  70.             $Link .= "&amp;Toolbar=$ToolbarSet";
  71.         }
  72.         #// Render the linked hidden field.
  73.         $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\" style=\"display:none\" />" ;
  74.  
  75.         #// Render the configurations hidden field.
  76.         $cfgstr = &GetConfigFieldString();
  77.         $wk = $InstanceName."___Config";
  78.         $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\" style=\"display:none\" />" ;
  79.  
  80.         #// Render the editor IFRAME.
  81.         $wk = $InstanceName."___Frame";
  82.         $Html .= "<iframe id=\"$wk\" src=\"$Link\" width=\"$Width\" height=\"$Height\" frameborder=\"0\" scrolling=\"no\"></iframe>";
  83.     } else {
  84.         if($Width =~ /\%/g){
  85.             $WidthCSS = $Width;
  86.         } else {
  87.             $WidthCSS = $Width . 'px';
  88.         }
  89.         if($Height =~ /\%/g){
  90.             $HeightCSS = $Height;
  91.         } else {
  92.             $HeightCSS = $Height . 'px';
  93.         }
  94.         $Html .= "<textarea name=\"$InstanceName\" rows=\"4\" cols=\"40\" style=\"width: $WidthCSS; height: $HeightCSS\">$HtmlValue</textarea>";
  95.     }
  96.     return($Html);
  97. }
  98.  
  99. sub IsCompatible
  100. {
  101.  
  102.     $sAgent = $ENV{'HTTP_USER_AGENT'};
  103.     if(($sAgent =~ /MSIE/i) && !($sAgent =~ /mac/i) && !($sAgent =~ /Opera/i)) {
  104.         $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3);
  105.         return($iVersion >= 5.5) ;
  106.     } elsif($sAgent =~ /Gecko\//i) {
  107.         $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8);
  108.         return($iVersion >= 20030210) ;
  109.     } elsif($sAgent =~ /Opera\//i) {
  110.         $iVersion = substr($sAgent,index($sAgent,'Opera/') + 6,4);
  111.         return($iVersion >= 9.5) ;
  112.     } elsif($sAgent =~ /AppleWebKit\/(\d+)/i) {
  113.         return($1 >= 522) ;
  114.     } else {
  115.         return(0);      # 2.0 PR fix
  116.     }
  117. }
  118.  
  119. sub GetConfigFieldString
  120. {
  121.     $sParams = '';
  122.     $bFirst = 0;
  123.     foreach $sKey (keys %Config) {
  124.         $sValue = $Config{$sKey};
  125.         if($bFirst == 1) {
  126.             $sParams .= '&amp;';
  127.         } else {
  128.             $bFirst = 1;
  129.         }
  130.         $k = &specialchar_cnv($sKey);
  131.         $v = &specialchar_cnv($sValue);
  132.         if($sValue eq "true") {
  133.             $sParams .= "$k=true";
  134.         } elsif($sValue eq "false") {
  135.             $sParams .= "$k=false";
  136.         } else {
  137.             $sParams .= "$k=$v";
  138.         }
  139.     }
  140.     return($sParams);
  141. }
  142.  
  143. 1;

Última edición por AlvaroG; 30/12/2008 a las 07:28 Razón: resaltado de sintaxis
  #2 (permalink)  
Antiguo 30/12/2008, 07:31
AlvaroG
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Alguien de usted conoce editor fckeditor

El código que pegaste, tal cual se indica en la parte inferior de los comentarios iniciales, es un código de integración con Perl. Es solamente un componente del programa, no el programa completo.

Fijate en la documentación del programa para saber cómo instalarlo correctamente.


Saludos
  #3 (permalink)  
Antiguo 30/12/2008, 08:56
 
Fecha de Ingreso: noviembre-2007
Ubicación: Zamora (Spain)
Mensajes: 251
Antigüedad: 16 años, 5 meses
Puntos: 1
Respuesta: Alguien de usted conoce editor fckeditor

BUenas

Yo lo uso en PHP y me va muy bien. Estoy bastante contento con él.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:55.