Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> CKEditor
aras785
post
Post #1





Grupa: Zarejestrowani
Postów: 859
Pomógł: 177
Dołączył: 29.10.2009

Ostrzeżenie: (0%)
-----


Witam. Potrzebuję gotowej wstawki ckeditor, gdzie mogę uploadować własne zdjęcia (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Spawnm
post
Post #2





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




To ja się podepnę i powiem że można samemu łatwo dopisać upload.

W config.js dodajemy np. config.filebrowserUploadUrl='http://127.0.0.1/up.php';

I nasz pliczek up.php:
  1. <?php
  2. // Required: anonymous function reference number as explained above.
  3. $funcNum = $_GET['CKEditorFuncNum'] ;
  4. // Optional: instance name (might be used to load a specific configuration file or anything else).
  5. $CKEditor = $_GET['CKEditor'] ;
  6. // Optional: might be used to provide localized messages.
  7. $langCode = $_GET['langCode'] ;
  8.  
  9. // Check the $_FILES array and save the file. Assign the correct path to a variable ($url).
  10. $url = 'http://127.0.0.1/pattern.png';
  11. // Usually you will only assign something here if the file could not be uploaded.
  12. $message = '';
  13.  
  14. echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";
  15. ?>


Tylko nie wiem czemu js nie działa...
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 15:23