Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/12/2009, 21:58
Avatar de destor77
destor77
 
Fecha de Ingreso: noviembre-2004
Ubicación: Gálvez, Santa Fe, Argentina
Mensajes: 2.654
Antigüedad: 20 años, 4 meses
Puntos: 43
problemas con rutas de directorios

buenas,
tengo la siguiente estructura de directorios

sitio
---- admin
--------- controladores
------------------index
------------------------templates
------------------------------index.html
------------------------------nuevo.html
------------------error404
------------------------templates
------------------------------index.html
---------template
-------------css
-------------js
---------------fckeditor
------------------- fckeditor.php
---------------jquery.js
---------------funciones.js
-------------images
-------------header.html
-------------footer.html

bien el tema esta en que estoy intentado usar el fckeditor en el archivo nuevo.html asi:
Código HTML:
Ver original
  1. <form action="index.php?modules=contenido&amp;opcion=nuevo" method="post" class="jNice">
  2.             <fieldset>
  3.                 <p><label>Titulo:</label><input type="text" class="text-long" name="titulo" value="<? if ($_SESSION['titulo']){echo $_SESSION['titulo'];}?>"/></p>  
  4.                 <p><label>Introducción:</label>
  5.                 <?php
  6.                 $oFCKeditor = new FCKeditor('intro') ;
  7.                 $oFCKeditor->BasePath = 'js/fckeditor/' ;
  8.                 //Ancho del TextArea    
  9.                 $oFCKeditor->Width = '100%' ;
  10.                 //Alto del TextArea
  11.                 $oFCKeditor->Height = '400' ;          
  12.                 if($_SESSION['intro']==''){        
  13.                     $oFCKeditor->Value = '' ;
  14.                 }
  15.                 else{
  16.                     $oFCKeditor->Value = $_SESSION['intro'];
  17.                 }
  18.                 $oFCKeditor->Create() ;
  19.                 ?>
  20.                 </p>  
  21.                 <p><label>Contenido:</label>  
  22.                 <?php
  23.                 $oFCKeditor = new FCKeditor('texto') ;
  24.                 $oFCKeditor->BasePath = 'js/fckeditor/' ;
  25.                 //Ancho del TextArea    
  26.                 $oFCKeditor->Width = '100%' ;
  27.                 //Alto del TextArea
  28.                 $oFCKeditor->Height = '400' ;
  29.                 if($_SESSION['texto']==''){        
  30.                     $oFCKeditor->Value = '' ;
  31.                 }
  32.                 else{
  33.                     $oFCKeditor->Value = $_SESSION['texto'];
  34.                 }
  35.                 $oFCKeditor->Create() ;
  36.                 ?>
  37.                 </p>                               
  38.                 <input type="submit" value="Crear" />
  39.             </fieldset>
  40.         </form>
y me sale que no encuentra la clase, asi que lo cambie por esto:
Código HTML:
Ver original
  1. $oFCKeditor->BasePath = '../../../template/js/fckeditor/';
pero tampoco funciona. Tampoco logra reconocer mis otros archivos js
en mi header tengo
Código HTML:
Ver original
  1. <?php $ubicacion=explode('/',$_SERVER['PHP_SELF']);?>
  2. <link href="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/template/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
  3. <!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/css/ie6.css" /><![endif]-->
  4. <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/css/ie7.css" /><![endif]-->
  5.  
  6. <!-- JavaScripts-->
  7. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/jquery.js"></script>
  8. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/jNice.js"></script>
  9.  
  10. <link type="text/css" href="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/template/css/smoothness/jquery-ui-1.7.2.custom.css" rel="stylesheet" /> 
  11. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/jquery-1.3.2.min.js"></script>
  12. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/jquery-ui-1.7.2.custom.min.js"></script>
  13. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/ui.dialog.js" ></script>  
  14. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/ui.core.js" ></script>  
  15. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/i18n/ui.datepicker-es.js"></script>
  16. <script type="text/javascript" src="<? echo "http://".$_SERVER['HTTP_HOST'].'/'.$ubicacion[1]."/".$ubicacion[2];?>/js/funciones.js" ></script>
que me devuelve algo asi:
Código HTML:
Ver original
  1. <link href="http://localhost/ampa/admin/template/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
  2. <!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="http://localhost/ampa/admin/css/ie6.css" /><![endif]-->
  3. <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="http://localhost/ampa/admin/css/ie7.css" /><![endif]-->
  4.  
  5. <!-- JavaScripts-->
  6. <script type="text/javascript" src="http://localhost/ampa/admin/js/jquery.js"></script>
  7.  
  8. <script type="text/javascript" src="http://localhost/ampa/admin/js/jNice.js"></script>
  9.  
  10. <link type="text/css" href="http://localhost/ampa/admin/template/css/smoothness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
  11. <script type="text/javascript" src="http://localhost/ampa/admin/js/jquery-1.3.2.min.js"></script>
  12. <script type="text/javascript" src="http://localhost/ampa/admin/js/jquery-ui-1.7.2.custom.min.js"></script>
  13. <script type="text/javascript" src="http://localhost/ampa/admin/js/ui.dialog.js" ></script>  
  14. <script type="text/javascript" src="http://localhost/ampa/admin/js/ui.core.js" ></script>  
  15. <script type="text/javascript" src="http://localhost/ampa/admin/js/i18n/ui.datepicker-es.js"></script>
  16. <script type="text/javascript" src="http://localhost/ampa/admin/js/funciones.js" ></script>
pero lo unico que logro hacer funcionar es el estilo transdmin.css

donde le estoy errando?

desde ya muchas gracias