Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> FCKEditor i Zend Framework
1maciek
post
Post #1





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 12.10.2004

Ostrzeżenie: (10%)
X----


Witam, czy ktoś próbował używać FCKEditora w połączeniu z Zend Framework?
Nie mogę utworzyć okna edytora, problem jest dośc skomplikowany, ale może już ktoś z czymś takim walczył.
Zamiast utwrzenia okna edytora, obok uruchamiany jest widok z którego próbowałem uruchomic fckeditora.
Zainteresowanym udostępnie kod.
Pozdrawiam
Go to the top of the page
+Quote Post
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


Cytat(1maciek @ 22.09.2006, 15:54:26 ) *
Zainteresowanym udostępnie kod.

Proszę pokazać kod na forum. Bez niego to można sobie z fusów wróżyć.
A po to jets forum i bbCode do wstawiania źródeł żeby z niego korzystać a nie "udostępniać zainteresowanym". Tutaj wszyscy są zainteresowani.
Go to the top of the page
+Quote Post
1maciek
post
Post #3





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 12.10.2004

Ostrzeżenie: (10%)
X----


Kod:

układ katalogów:
/application
->/controllers
->/models
->/views
->.htaccess
->config.ini
/library
->/Zend
->Zend.php
->.htaccess
index.php
.htaccess

katalog /FCKEditor jest 2 poziomy wyżej

index.php
  1. <?php
  2. error_reporting(E_ALL|E_STRICT);
  3. set_include_path('.'.PATH_SEPARATOR.'./library/'.PATH_SEPARATOR.'./application/models/'.PATH_SEPARATOR.'../../FCKeditor/');
  4. include('Zend.php');
  5. include('fckeditor.php');
  6.  
  7. define('FCKEDITOR', './library/FCKEditor');
  8.  
  9. function __autoload($class) { Zend::loadClass($class); }
  10.  
  11. $route = new Zend_Controller_RewriteRouter();
  12. $controller = Zend_Controller_Front::getInstance();
  13. $controller->setRouter($route);
  14.  
  15. $view = new Zend_View();
  16. $view->setScriptPath('./application/views/');
  17. Zend::register('view', $view);
  18.  
  19. $dbconfig = new Zend_Config(Zend_Config_Ini::load('./application/config.ini', 'database'));
  20. Zend::register('dbconfig', $dbconfig);
  21.  
  22. $db = Zend_Db::factory($dbconfig->db->adapter, $dbconfig->db->config->asArray());
  23. Zend_Db_Table::setDefaultAdapter($db);
  24. Zend::register('db', $db);
  25.  
  26. Zend::register('post', new Zend_Filter_Input($_POST));
  27. Zend::register('get', new Zend_Filter_Input($_GET));
  28.  
  29. $controller->run('./application/controllers/');
  30. ?>


indexController.php

  1. <?php
  2. class IndexController extends Zend_Controller_Action {
  3.  
  4. public function IndexAction() {
  5. $view = Zend::registry('view');
  6.  
  7. echo $view->render('site.tpl.php');
  8. }
  9.  
  10. public function __call($action, $arguments) {
  11. $this->_redirect('http://localhost/zendfcke/');
  12. }
  13.  
  14. public function noRouteAction() {
  15. $this->_redirect('http://localhost/zendfcke/');
  16. }
  17. }
  18. ?>


site.tpl.php

  1. <html>
  2. <head>
  3. <title></title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
  5. </head>
  6. <body>
  7. <form action='zendfcke/index/save' method="post">
  8. <?php
  9. $fckeditor = new FCKeditor('content');
  10. $fckeditor->BasePath = FCKEDITOR;
  11. $fckeditor->Width = '600';
  12. $fckeditor->Height = '600';
  13. $fckeditor->Create();
  14. ?>
  15. </form>
  16. </body>
  17. </html>


.htaccess w katalogu głównym

  1. <?php
  2. RewriteEngine on
  3. RewriteRule .* index.php
  4. ?>


.htaccess w katalogu /application

  1. <?php
  2. deny from all
  3. ?>


.htaccess w katalogu /library

  1. <?php
  2. deny from all
  3. ?>



po zmianie serwera zamiast
Cytat
Zamiast utwrzenia okna edytora, obok uruchamiany jest widok z którego próbowałem uruchomic fckeditora.

teraz jest komunikat
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403

Dzięki za pomoc

Ten post edytował 1maciek 24.09.2006, 22:10:07
Go to the top of the page
+Quote Post
Apo
post
Post #4





Grupa: Zarejestrowani
Postów: 426
Pomógł: 1
Dołączył: 2.10.2005

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


A po co dajesz deny from all skora ZF przekierowuje wszystko na index.php ?
Jak coś to m być:

deny from all
allow from 127.0.0.1
Go to the top of the page
+Quote Post
1maciek
post
Post #5





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 12.10.2004

Ostrzeżenie: (10%)
X----


teraz nie ma komunikatu o błędzie, ale okno edytora nadal się nie wyświetla, a jesli chodzi o .htaccess to robie tak jak w tutorialu Roba Allena

Udało się!!!
Trzeba wyłączyć RewriteEngine na Off w katalogu w którym jest FCKeditor.
Go to the top of the page
+Quote Post

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: 25.08.2025 - 17:52