11 de julio de 2013

Joomla: error codificación de contenido

Si les llega a suceder en Joomla (o Mambo) el siguiente error:
Error de codificación de contenido
La página que intentas ver no puede mostrarse porque usa una forma de compresión no válida o admitida.
Contacta a los propietarios del sitio web para informarles sobre este problema.
La solución es deshabilitar la compresión de las páginas con gZip, entonces en el archivo de configuration.php buscamos la linea $gzip y le ponemos valor 0.
public $gzip = ’0′;
Listo!! reiniciamos la página web de joomla y todo normal.

10 de julio de 2013

JOOMLA: quitar encabezado y pie ruso en vista de impresión

Editar el archivo templates/it_university2/html/com_content/article/default.php

Buscar el texto "base64_decode"

Comentar las líneas de código que tienen ese texto.

Acceso a la configuración avanzada del router ADB

Movistar distribuye unos router parecidos físicamente a los ASL, pero son los ADB. Se accede a la configuración a través de:
http://10.0.0.3/main.html

No olvidarse de teclear http

JOOMLA: añadir todas las imágenes de una categoría de joomgallery a la cesta de descargas

Editar el archivo:
components/com_joomgallery/views/category/tmpl/default_head.php

Y añadir en la línea 2:
      <div class="jg_headerfavourites_icon">
<?php   if($this->params->get('show_headerfavourites_icon') == 1): ?>
        <a href="<?php echo JRoute::_('index.php?task=favourites.addimages&catid='.$this->category->cid); ?>"<?php echo JHTML::_('joomgallery.tip', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_TIPTEXT', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_TIPCAPTION', true); ?>>
          <?php echo 'Añadir1'.JHTML::_('joomgallery.icon', 'star.png', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_TIPCAPTION'); ?></a>
<?php   endif;
        if($this->params->get('show_headerfavourites_icon') == 2): ?>
        <a href="<?php echo JRoute::_('index.php?task=favourites.addimages&catid='.$this->category->cid); ?>"<?php echo JHTML::_('joomgallery.tip', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_TIPTEXT', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_TIPCAPTION', true); ?>>
          <?php echo 'Añadir todas las imágenes de esta categoría a la cesta de descargas'.JHTML::_('joomgallery.icon', 'basket_put.png', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_TIPCAPTION'); ?></a>
<?php   endif;
        if($this->params->get('show_headerfavourites_icon') == -1): ?>
        <span<?php echo JHTML::_('joomgallery.tip', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_NOT_ALLOWED_TIPTEXT', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_TIPCAPTION', true); ?>>
          <?php echo 'Añadir3'.JHTML::_('joomgallery.icon', 'star_gr.png', 'COM_JOOMGALLERY_COMMON_FAVOURITES_ADD_IMAGES_TIPCAPTION'); ?>
        </span>
<?php   endif;
        if($this->params->get('show_headerfavourites_icon') == -2): ?>
        <span<?php echo JHTML::_('joomgallery.tip', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_NOT_ALLOWED_TIPTEXT', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_TIPCAPTION', true); ?>>
          <?php echo 'Añadir4'.JHTML::_('joomgallery.icon', 'basket_put_gr.png', 'COM_JOOMGALLERY_COMMON_DOWNLOADZIP_ADD_IMAGES_TIPCAPTION'); ?>
        </span>
<?php   endif; ?>
      </div> <br />

28 de junio de 2013

Flash responsivo

We recommend not to use flash (swf) in Joomla 3, because Flash is not supported in many mobile devices. If you nevertheless want to use Flash this is a technique to create responsive flash objects.

Flash code
The w3C flasshcode is without "embed". Create 2 divs's around the flash object, each with a unique class.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div class="objectcontainer">
  <div class="objectwrapper">
  
    <object width="375" height="241"
        data="images/CIAA_Model.swf"
        type="application/x-shockwave-flash">
      <param name="quality" value="best" />
      <param name="wmode" value="opaque" />
      <param name="base" value="/joomlacss/" />
      <param name="src" value="images/CIAA_Model.swf" />
    </object>
  
  </div>
</div>

CSS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
div.objectcontainer {
    max-width: 375px;
    width: 100%;
}
div.objectcontainer div.objectwrapper {
    height: 0;
    padding: 0 0  64.26666667% 0;
    position: relative;
}
div.objectwrapper object {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

The outer div (=div.objectcontainer) has a width of 1000% and a max-width of the original flash object (375px).
The inner div (=div.objectwrapper) has a height of 0, a position relative and a bottom padding of a percentage height/width (=241 / 375 *100% = 64.26666667%).

With this CSS the flash object is responsive and will be proportionallly redoced in size less than 375px.