Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [FCKeditor] Problem
Forum PHP.pl > Forum > Gotowe rozwiązania
BugsBunny
Więc tak u mnie na kompie jest wsz[/html]ystko OK jednak po uploadzie na serwer mam błąd wywołaniu systemu FCKeditor

undefined class 'FCKeditor' czy jakoś tak

jak myślę chodzi o ten kawałek kodu w nagłówku
  1. <script type="text/javascript" src="{$smarty.const.APP_URL}system/FCKeditor/fckeditor.js"></script>


Strona jest pisania z uzyciem szablonu Smary

a oto kod wywołania
  1. {literal}
  2. <script type="text/javascript">
  3. <!--
  4. // Automatically calculates the editor base path based on the _samples directory.
  5. // This is usefull only for these samples. A real application should use something like this:
  6. // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
  7. var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
  8.  
  9. var oFCKeditor = new FCKeditor( 'tresc' ) ;
  10. oFCKeditor.BasePath = '{$smarty.const.APP_URL}system/FCKeditor/' ;
  11.  
  12. oFCKeditor.Height = 500 ;
  13. oFCKeditor.Value = 'Wpisz treść newsa' ;
  14. oFCKeditor.Create() ;
  15. //-->
  16. </script>
  17. {/literal}
pawel_
Cytat(BugsBunny @ 2.09.2006, 23:00:09 ) *
a oto kod wywołania
  1. {literal}
  2. <script type="text/javascript">
  3. <!--
  4. // Automatically calculates the editor base path based on the _samples directory.
  5. // This is usefull only for these samples. A real application should use something like this:
  6. // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
  7. var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
  8.  
  9. var oFCKeditor = new FCKeditor( 'tresc' ) ;
  10. oFCKeditor.BasePath = '{$smarty.const.APP_URL}system/FCKeditor/' ;
  11.  
  12. oFCKeditor.Height = 500 ;
  13. oFCKeditor.Value = 'Wpisz treść newsa' ;
  14. oFCKeditor.Create() ;
  15. //-->
  16. </script>
  17. {/literal}

Wyłączasz parsowanie smartów a potem odwołujesz się do zmiennej w smartach?? tongue.gif
  1. oFCKeditor.BasePath = '{$smarty.const.APP_URL}system/FCKeditor/' ;

zmień na
  1. oFCKeditor.BasePath = '{/literal}{$smarty.const.APP_URL}{literal}system/FCKeditor/' ;
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.