Foros del Web » Programando para Internet » PHP »

Problema con Phpimage y TinyMCE

Estas en el tema de Problema con Phpimage y TinyMCE en el foro de PHP en Foros del Web. Hola a todos. En un proyecto en el cual estoy trabajando, basado en Codeigniter, he integrado TinyMCE para la edición de campos de textos. Como ...
  #1 (permalink)  
Antiguo 02/04/2012, 03:25
 
Fecha de Ingreso: septiembre-2011
Ubicación: Almería
Mensajes: 20
Antigüedad: 12 años, 7 meses
Puntos: 2
Problema con Phpimage y TinyMCE

Hola a todos.
En un proyecto en el cual estoy trabajando, basado en Codeigniter, he integrado TinyMCE para la edición de campos de textos. Como el TinyMCE no lleva por defecto un cargador de imagenes, le he añadido la librería PHPimage. La he configurado y en mi servidor local funciona perfectamente, pero al subirla al servidor de hosting, a la hora de subir la imagen, simplemente refresca la página y no llega a subirla. No me aparece ningun error y con Firebug tampoco veo nada. Ya he comprobado que los permisos sean correctos y lo son. Llevo un buen rato peleándome con el problema, pero al no poder ver donde está el error me estoy volviendo loco

Os dejo el código de configuración del PHPimage y del TinyMCE

Config.php (phpimage)
Código PHP:
Ver original
  1. // Simple way to get back to server path minus the javascript directorys
  2. $_cur_dir = $_SERVER['DOCUMENT_ROOT'];
  3. // The default language for errors is english to change to another type add lang to the lang folder e.g. fr_FR (french) to get language packs please download the class zip from the above authors link
  4. $language                       = 'en_EN';
  5. // server file directory to store images - IMPORTANT CHANGE PATH TO SUIT YOUR NEEDS!!!
  6. $server_image_directory     = $_cur_dir.'/assets/uploads/files/eventos/';  //e.g. '/home/user/public_html/uploads';
  7. // URL directory to stored images (relative or absoulte) - IMPORTANT CHANGE PATH TO SUIT YOUR NEEDS!!!
  8. $url_image_directory            = '/assets/uploads/files/eventos/';
  9. // file_safe_name formats the filename (spaces changed to _) (default: true)
  10. $handle->file_safe_name     = true;
  11. # file_auto_rename automatically renames file if it already exists (default: true)
  12. $handle->file_auto_rename   = true;
  13. // image_resize determines is an image will be resized (default: false)
  14. $handle->image_resize       = true;
  15. // image_ratio if true, resize image conserving the original sizes ratio, using image_x AND image_y as max sizes if true (default: false)
  16. $handle->image_ratio            = true;
  17. // image_ratio_x if true, resize image, calculating image_x from image_y and conserving the original sizes ratio (default: false)
  18. $handle->image_y                = 400;
  19. // image_ratio_y if true, resize image, calculating image_y from image_x and conserving the original sizes ratio (default: false)
  20. $handle->image_x                = 400;
  21. // file_safe_name formats the filename (spaces changed to _) (default: true)
  22. $handle->file_safe_name     = true;

jquery.tine_mce.js
Código Javascript:
Ver original
  1. $().ready(function() {
  2.         $('textarea.texteditor').tinymce({
  3.  
  4.             // Location of TinyMCE script
  5.             script_url : base_url+'assets/grocery_crud/texteditor/tiny_mce.js',
  6.            
  7.             // General options
  8.             theme : "advanced",
  9.             plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist,phpimage",
  10.             relative_urls: false,
  11.  
  12.             // Theme options
  13.             theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
  14.             theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,phpimage,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
  15.             theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
  16.             theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
  17.             theme_advanced_toolbar_location : "top",
  18.             theme_advanced_toolbar_align : "left",
  19.             theme_advanced_statusbar_location : "bottom",
  20.             theme_advanced_resizing : true,
  21.  
  22.             /*
  23.             // Example content CSS (should be your site CSS)
  24.             content_css : "css/content.css",
  25.             */
  26.             // Drop lists for link/image/media/template dialogs
  27.             template_external_list_url : base_url+'assets/grocery_crud/texteditor/lists/template_list.js',
  28.             external_link_list_url : base_url+"assets/grocery_crud/texteditor/lists/link_list.js",
  29.             external_image_list_url : base_url+"assets/grocery_crud/texteditor/lists/image_list.js",
  30.             media_external_list_url : base_url+"assets/grocery_crud/texteditor/lists/media_list.js",
  31.  
  32.             // Replace values for the template plugin
  33.             template_replace_values : {
  34.                 username : "Some User",
  35.                 staffid : "991234"
  36.             }
  37.         });
  38.     });


Agradezco de antemano cualquier ayuda!
  #2 (permalink)  
Antiguo 14/06/2012, 19:48
Avatar de cuasatar  
Fecha de Ingreso: junio-2011
Ubicación: Bogotá Rock City
Mensajes: 1.230
Antigüedad: 12 años, 9 meses
Puntos: 181
Respuesta: Problema con Phpimage y TinyMCE

Todavia necesitas la respuesta? Acabo de usar tinyMCE por primera vez hoy y estoy seguro cual es tu problema, pero como veo que es de septiembre de 2011 tu pregunta no se si necesitas la respuesta aun.
__________________
Blog de humor http://elcuasatar.net63.net/

Etiquetas: html, imagenes, tinymce
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 17:42.