Tema: FckEditor
Ver Mensaje Individual
  #9 (permalink)  
Antiguo 20/09/2008, 14:05
mesoriginal
 
Fecha de Ingreso: septiembre-2008
Mensajes: 211
Antigüedad: 15 años, 7 meses
Puntos: 2
Respuesta: FckEditor

Hola amigos! Masterojitos me ayudó mucho con lo del tema de FCK Editor aún así me sale un error alguien sabria decir cual és el problema??

El error es ese:


Fatal error: Cannot instantiate non-existent class: fckeditor in C:\AppServ\www\w\SDN\add-noticia.php on line 39

Que siginfica?

i el codigo es este:

Código PHP:
<?php
// incluimos el archivo de conexion
include ('db-cnx.php');
// recibimos el formulario
if(isset($_POST['enviar']) && $_POST['enviar'] == 'Enviar'){
// comprobamos que el formulario no envie campos vacios
if(!empty($_POST['notTitulo']) && $_POST['notTexto'] &&
$_POST['notCategoriaID']){
// creamos las variables y les asignamos los valores a insertar
$notTitulo $_POST['notTitulo'];
$notTexto $_POST['notTexto'];
$notCategoriaID $_POST['notCategoriaID'];
// hacemos el INSERT en la BD
$sqlInsertNot mysql_query("INSERT INTO sn_noticias
(notTitulo, notTexto, notCategoriaID)
VALUES ('$notTitulo', '$notTexto', '$notCategoriaID')"
,
$db_link) or die(mysql_error());
// enviamos un mensaje de exito
echo "Los datos fueron gurdados correctamente";
}else{
// si el formulario envia algun campo vacio
// enviamos un mensaje de error
echo "Debe llenar todos los campos del formulario";
}
}
?>
<?
include("http://localhost/w/fckeditor/fckeditor.php");//segun donde este tu carpeta  
?>
<!– el formulario –>
<form name="notTexto" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<p>
Título de la Noticia<br />
<input type="text" name="notTitulo" size="50" />
</p>
<p>
Texto de la Noticia<br />
<?php
$oFCKeditor 
= new FCKeditor('notTexto') ;//nombre del editor (reemplaza a tu textarea ps)
$oFCKeditor->BasePath 'http://localhost/w/fckeditor/'//lugar donde esta el fckeditor (la carpeta)
$oFCKeditor->Width  '100%'//ancho del fckeditor
$oFCKeditor->Height '400';//alto del fckeditor
$oFCKeditor->Create();//creamos el fckeditor
?>
</p>
<p>
Categoría<br />
<select name="notCategoriaID">
<option value="">Escoger de la Lista</option>
<?php
// asignamos una categoria a la noticia
// mediante un select
$sqlQueryCat mysql_query("SELECT * FROM sn_categorias"$db_link)
or die(
mysql_error());
// creamos un bucle while
// que nos muestre todas las categorias
// que tenemos guardadas en la BD
while($rowCat mysql_fetch_array($sqlQueryCat)){
echo 
"<option value=’$rowCat[cat_ID]‘>$rowCat[catCategoria]</option>";
}
?>
</select>
</p>
<p>
<input type="submit" name="enviar" value="Enviar" />
</p>
</form>

Gràcias saludoos!

Última edición por mesoriginal; 20/09/2008 a las 14:49