Foros Joomla! Spanish

Zona técnica, debate y cooperación sobre Joomla!

Zonas Joomla! Spanish

Portal Joomla! Spansih
Portal Joomla! Spansih NoticiasComunidad JSZona de Extensiones

Estar informado de J!S

Boletines JS
Sigue el proyecto desde joomlacode
Joomla! Spanish 1.5.26 liberada
Sigue el proyecto desde joomlacode de la 1.7
Joomla! Spanish 1.7.5 liberada
Sigue el proyecto desde joomlacode de la 2.5
Joomla! Spanish 2.5.4 Liberada

Estadistícas del foro

  • Miembros en el foro: 374,588
  • Total Temas: 64,852
  • Total Mensajes: 3
Hay 329 usuarios actualmente navegando en los foros.

Colaboradores Gold

Soporte Publicitario


Responder
Antiguo 25-09-2007, 08:49 AM   #1
Banned
 
Avatar de gustavo
 
Fecha de Ingreso: Nov 2005
Ubicación: Bahía Blanca - Argentina
Mensajes: 1,680
gustavo is a splendid one to beholdgustavo is a splendid one to beholdgustavo is a splendid one to beholdgustavo is a splendid one to beholdgustavo is a splendid one to beholdgustavo is a splendid one to beholdgustavo is a splendid one to behold
Enviar un mensaje por MSN a gustavo Enviar un mensaje por Skype™ a gustavo
Predeterminado [Traducido] Creando una plantilla simple II

templateDetails.xml

The templateDetails.xml must include all the files that are part of the template. It also includes information such as the author and copyright. Some of these are shown in the admin backend in the Template Manager. An example XML file is shown here:


Código HTML:
<?xml version="1.0" encoding="utf-8"?> 
<install version="1.5" type="template">       
<name>TemplateTutorial15</name>       
<creationDate>August  2007</creationDate>       
<author>Barrie  North</author>       
<copyright>GPL</copyright>       
<authorEmail>    compassdesigns@gmail.comThis email address is being protected from spam bots, you need Javascript enabled to view it   </authorEmail>       
<authorUrl>www.compassdesigns.net</authorUrl>       
<version>1.0</version>       
<description>First example template for Chapter 9 of the Joomla  Book</description>       
<files>             
<filename>index.php</filename>             
<filename>templateDetails.xml</filename>             
<filename>js/somejsfile.js</filename>             
<filename>images/threecol-l.gif</filename>             
<filename>images/threecol-r.gif</filename>             
<filename>css/customize.css</filename>             
<filename>css/layout.css</filename>             
<filename>css/template_css.css</filename>        
</files>       
<positions>             
<position>user1</position>             
<position>top</position>             
<position>left</position>             
<position>banner</position>             
<position>right</position>             
<position>footer</position>       
</positions>          
<params>             
<param name="colorVariation" type="list" default="white" label="Color Variation" description="Color variation to use">                   
<option  value="blue">Blue</option>                   
<option  value="red">Red</option>             
</param>          
</params> 
</install>


Let's explain what some of these lines mean:
  • <install version="1.5" type="template">. The contents of the XML document are instructions for the backend installer. The option type="template" tells the installer that we are installing a template and that it is for Joomla 1.5.
  • <name>TemplateTutorial15</name>. Defines the name of your template. The name you enter here will also be used to create the directory within the templates directory. Therefore it should not contain any characters that the file system cannot handle, for example spaces. If installing manually, you need to create a directory that is identical to the template name.
  • <creationDate>August 2007</creationDate>. The date the template was created. It is a free form field and can be anything such as May 2005, 08-June-1978, 01/01/2004, and so on.
  • <author>Barrie North</author>. The name of the author of this template[md]most likely your name.
  • <copyright>GPL</copyright>. Any copyright information goes into this element. A Licensing Primer for Developers and Designers can be found on the Joomla forums.
  • <authorEmail> compassdesigns@gmail.comThis email address is being protected from spam bots, you need Javascript enabled to view it </authorEmail>. Email address where the author of this template can be reached.
  • <authorUrl>www.compassdesigns.net</authorUrl>. The URL of the author's website.
  • <version>1.0</version>. The version of this template.
  • <files></files>. Various files used in the template.
  • The files used in the template are laid out with <filename> tags:
Código HTML:
<files> 
<filename>index.php</filename> 
<filename>templateDetails.xml</filename> 
<filename>js/somejsfile.js</filename> 
<filename>images/threecol-l.gif</filename> 
<filename>images/threecol-r.gif</filename> 
<filename>css/customize.css</filename> 
<filename>css/layout.css</filename> 
<filename>css/template_css.css</filename> 
</files>
  • The "files" sections contain all generic files like the PHP source for the template or the thumbnail image for the template preview. Each file listed in this section is enclosed by <filename> </filename>. Also included would be any additional files; here the example of a JavaScript file that is required by the template is used.
  • All image files that the template uses are also listed in the <files> section. Again, each file listed is enclosed by <filename> </filename>. Path information for the files is relative to the root of the template. For example, if the template is in the directory called 'YourTemplate', and all images are in a directory 'images' that is inside 'YourTemplate', the correct path is: <filename>images/my_image.jpg</filename>
  • Lastly, any stylesheets are listed in the files section. Again, the filename is enclosed by <filename> </filename>, and it's path is relative to the template root.
  • <positions></positions>.The module positions available in the template.
  • <params></params>. These describe parameters that can be passed to allow advanced template functions such as changing the color of the template.
index.php

What actually is in an index.php file? It is a combination of (X)HTML and PHP that determines everything about the layout and presentation of the pages.
First, let's look at a critical part of achieving valid templates, the DOCTYPE at the top of the index.php file. This is the bit of code that goes at the very top of every web page. At the top of our page, we have this in our template:

Código PHP:
<?php // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The first PHP statement simply makes sure that the file is not accessed directly for security.


A web page DOCTYPE is one of the fundamental components of how a web page is shown by a browser, specifically, how that browser interprets CSS. To give you further understanding, an observation from alistapart.com says:


Cita:
[Information on W3C's site about DOCTYPEs is] written by geeks for geeks. And when I say geeks, I don't mean ordinary web professionals like you and me. I mean geeks who make the rest of us look like Grandma on the first day She's Got Mail.
Anyway, you can use several DOCTYPEs. Basically, the DOCTYPE tells the browser how to interpret the page. Here the words "strict" and "transitional" start getting floated around (float:left and float:right usually). Essentially, ever since the Web started, different browsers have had different levels of support for CSS. This means for example, that Internet Explorer won't understand the "min-width" command to set a minimum page width. To duplicate the effect, you have to use "hacks" in the CSS.


Some say that serving XHTML as text/html is considered harmful. If you actually understand that statement you are well ahead of the game and beyond this guide. You can read more at hixie.ch/advocacy/xhtml.


Strict means the HTML (or XHTML) will be interpreted exactly as dictated by standards. A transitional DOCTYPE means that the page will be allowed a few agreed upon differences to the standards.


To complicate things, there is something called "quirks" mode. If the DOCTYPE is wrong, outdated, or not there, the browser goes into quirks mode. This is an attempt to be backwards-compatible, so Internet Explorer 6 for example, will render the page pretending as if it were IE4.
Unfortunately, people sometimes end up in quirks mode accidentally. It usually happens in two ways:
  • They use the DOCTYPE declaration straight from the WC3 web page, and the link ends up as DTD/xhtml1-strict.dtd, except this is a relative link on the WC3 server. You need the full path as shown earlier.
  • Microsoft set up IE6 so you could have valid pages but be in quirks mode. This happens by having an "xml declaration" put before the DOCTYPE.
Next is an XML statement (after the DOCTYPE):

Código PHP:
 <html xmlns="http://www.w3.org/1999/xhtml" 
xml:lang="<?php  echo $this->language?>
lang="<?php  echo $this->language?>" >
The part about IE6 quirks mode is important. In this chapter we only design for IE6+, so we will make sure that it's running in standards mode. This will minimize the hacks we have to do later on.
NOTE
Making a page standards-compliant, where you see "valid xhtml" at the bottom of the page does not mean really difficult coding, or hard-to-understand tags. It merely means that the code you use matches the DOCTYPE you said it would. That's it! Nothing else.
Designing your site to standards can on one level be reduced to saying what you do and then doing what you say.
Here are some useful links, which will help you understand DOCTYPE and quirks mode:
gustavo no está en línea   Responder Con Cita
Antiguo 26-11-2007, 10:02 AM   #2
Iniciado en Joomla
 
Fecha de Ingreso: Jun 2006
Mensajes: 18
patripower is on a distinguished road

Medallero

Predeterminado [Traducido::PENDIENTE CORRECCIÓN] Creando una plantilla simple II

________________________________________
templateDetails.xml

El fichero templateDetails.xml incluye todos los ficheros que forman parte de una plantilla. Esto incluye también información como el autor y los derechos de autor (copyright). Esta información se muestra también en la parte de administración del sitio en la sección Administrador de Plantillas. A continuación se muestra un ejemplo de fichero XML:

HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="template">
<name>TemplateTutorial15</name>
<creationDate>August 2007</creationDate>
<author>Barrie North</author>
<copyright>GPL</copyright>
<authorEmail> compassdesigns@gmail.comThis email address is being protected from spam bots, you need Javascript enabled to view it </authorEmail>
<authorUrl>www.compassdesigns.net</authorUrl>
<version>1.0</version>
<description>First example template for Chapter 9 of the Joomla Book</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>js/somejsfile.js</filename>
<filename>images/threecol-l.gif</filename>
<filename>images/threecol-r.gif</filename>
<filename>css/customize.css</filename>
<filename>css/layout.css</filename>
<filename>css/template_css.css</filename>
</files>
<positions>
<position>user1</position>
<position>top</position>
<position>left</position>
<position>banner</position>
<position>right</position>
<position>footer</position>
</positions>
<params>
<param name="colorVariation" type="list" default="white" label="Color Variation" description="Color variation to use">
<option value="blue">Blue</option>
<option value="red">Red</option>
</param>
</params>
</install>


Vamos a explicar algunas de las líneas que aparecen:
• <install version="1.5" type="template">. El contenido del documento XML son instrucciones para el instalador del sitio. La opción type="template" informa al instaladore de que estamos instalado una plantilla para Joomla 1.5.
• <name>TemplateTutorial15</name>. Define el nombre de la plantilla. El nombre que insertas aquí será usado también para crear el directorio de la plantilla en el directorio templates. El nombre no debe incluir ningún character que el sistema no pueda reconocer, por ejemplo espacios. Si instalas manualmente, necesitas crear el directorio con el mismo nombre que el nombre de la plantilla.
• <creationDate>August 2007</creationDate>. La fecha en la cuál se ha creado la plantilla. Este es un campo sin formato (libre) y puede tener un formato como May 2005, 08-June-1978, 01/01/2004, y otros muchos.
• <author>Barrie North</author>. El nombre del autor de esta plantilla [md] preferentemente tu nombre.
• <copyright>GPL</copyright>. La información sobre los derechos de copia va en este elemento. Una licencia para Desarrolladores y Diseñadores puede encontrarse en los foros de Joomla.
• <authorEmail> compassdesigns@gmail.com Esta dirección de correo electrónico se encuentra protegida de los robots de spam, necesitas tener javascript activado para poder verlo </authorEmail>. Dirección de correo electrónico donde puede ser contactado el autor de la plantilla.
• <authorUrl>www.compassdesigns.net</authorUrl>. La dirección web del autor de la plantilla.
• <version>1.0</version>. La version de la plantilla.
• <files></files>. Ficheros utilizados por la plantilla.
• Los ficheros utilizados en la plantilla se encierran entre etiquetas <filename>
HTML Code:
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>js/somejsfile.js</filename>
<filename>images/threecol-l.gif</filename>
<filename>images/threecol-r.gif</filename>
<filename>css/customize.css</filename>
<filename>css/layout.css</filename>
<filename>css/template_css.css</filename>
</files>
• La sección “ficheros (files)” contiene todos los ficheros genéricos como el código fuente PHP para la plantilla o la miniatura de la plantilla para su previsualización. Cada fichero listado en esta sección se encuentra encerrado por las etiquetas <filename> </filename>. También incluye cualquier fichero adicional; aquí en el ejemplo se invoca un un fichero javascript que es requerido por la plantilla.
• Todos los ficheros de imágenes que la plantilla utiliza son listados en la sección <files>. Cada fichero listado se encuentra definido por las etiquetas <filename> </filename>. La información de la ruta donde se encuentran los ficheros, es relative al directorio raíz de la plantilla. Por ejemplo, si la plantilla está en el directorio llamado ‘Tuplantilla’ (YourTemplate), y todas las imágenes se encuentran en el directorio ‘imágenes (images)’, dentro de ‘Tuplantilla (YourTemplate), la dirección correcta de la ubicación es: <filename>images/my_image.jpg</filename>
• Por ultimo ninguna plantilla de estilo (stylesheets) es listada en la sección ficheros.. <positions></positions>.Las posiciones de los módulos disponibles en la plantilla.
• <params></params>. Esto describe parámetros que van a ser pasados, para permitir funciones avanzadas de las plantillas, como cambiar el color de la plantilla.
index.php

¿Qué hay actualmente en el fichero index.php? Es la combinación de (X)HTML y PHP que determina todo sobre la presentación y las capas de las páginas.
Primero, echemos un vistazo a una parte crítica de las plantillas válidas, el atributo DOCTYPE al principio del fichero index.php file. Este es un pequeño trozo de código que va en la parte superior de la página En la parte superior de la página, tenemos esto en nuestra plantilla:
Código PHP:
<?php // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
La primera sentencia PHP simplemente se asegura de que no se puede acceder directamente al fichero por seguridad.
El atributo DOCTYPE de una página web es uno de los componentes fundamentales, indica cómo va a ser mostrada una página por un navegador, específicamente, cómo el navegador interpreta CSS. Para permitirte una comprensión total, una observación de alistapart.com dice:
Cita:
[Información en el sitio W3C's sobre DOCTYPEs ] escrito para tecnófilos por tecnófilos. Y cuando digo tecnófilos, no me refiero a los profesionales corrientes como tu y yo. Digo tecnófilos cuando me refiero a los que nos hacen sentir como una abuela la primera vez que recibe un correo electrónico..
Por otra parte, puedes utilizar múltiples DOCTYPEs. Básicamente, el DOCTYPE informa al navegador como interpretar la página. Aquí las palabras “estricto” y “transicional” empiezan saliendo alrededor del float (float:left y float:right habitualmente). Esencialmente, desde que empezó la web, los diferentes navegadores tienen diferentes niveles de soporte para CSS. Esto hace por ejemplo que Internet Explorer no comprenda un commando "min-width" utilizado para configurar la anchura mínima de una página. Para generar el efecto, necesitas utilizar “mejoras (hacks)” en la CSS.

Some say that serving XHTML as text/html is considered harmful. If you actually understand that statement you are well ahead of the game and beyond this guide. You can read more at hixie.ch/advocacy/xhtml.


Estricto se dice de HTML (o XHTML) que es interpretado exactamente como dictan los estándares. Un DOCTYPE transicional permite a la página mostrar algunos pequeños trozos diferentes a los estándares.


Para complicar las cosas, tenemos un modo llamado “chapuzas (quirks)”. Si el DOCTYPE es incorrecto, no actualizado, o no se encuentra, el navegador utiliza el modo “chapuzas”. Esto es una manera de compatibilidad marcha atrás, para Internet Explorer 6, por ejemplo, dibujamos la página como si fuera para IE4.
Desafortunadamente, algunas personas acabane n modo “chapuza” de manera accidental. Esto ocurre habitualmente de dos maneras:
• Utilizan una declaración diferente de DOCTYPE a la de la página de la WC3, y el enlace acaba como DTD/xhtml1-strict.dtd, excepto si es el enlace relativo al servidor de la WC3 . Necesitas la ruta completa y mostrarlo al inicio.
• Microsoft configura IE6 por lo tanto tienes páginas validas pero se muestran en modo chapuza. Esto ocurre porque tenemos una “declaración xml” puesta antes del DOCTYPE.
En el siguiente ejemplo es una sentencia XML (después del DOCTYPE):
Código PHP:
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php echo $this->language; ?>"
lang="<?php echo $this->language; ?>" >
La parte sobre el modo chapuza de IE6 es importante. En este capítulo solo estamos diseñando para IE6+ (Internet Explorer 6 ó superior), con lo que nos tenemos que asegurar que esto funcionan en un modo estándar. Esto minimizará las mejoras que tengamos que hacer posteriormente.
NOTA
Haciendo una página web que cumple los estándar, podrás mostrar un botón “xhtml válido” en la página, esto no tiene ninguna dificultad en la codificación, o incompresibles etiquetas. Esto significa que el código que haces utilizando DOCTYPE dice lo que quieres, ¡nada más!
Diseñando tu sitio con estándares puedes reducir un nivel lo que muestras y cómo quieres mostrarlo.
Aquí tienes algunos prácticos enlaces, que te pueden ayudar a comprender el DOCTYPE y el modo chapuzas:
www.quirksmode.org/css/quirksmode.html
www.alistapart.com/stories/doctype
www.w3.org/QA/2002/04/Web-Quality
http://forum.joomla.org/index.php/topic,7537.0.html
http://forum.joomla.org/index.php/topic,6048.0.html
patripower no está en línea   Responder Con Cita
Antiguo 15-08-2011, 07:41 PM   #3
Iniciado en Joomla
 
Fecha de Ingreso: Aug 2011
Ubicación: 1
Mensajes: 1
isttoptan is on a distinguished road
Predeterminado

thank you, nice sharing..
__________________
[URL="http://www.istanbultoptancisi.com"]goody köpek maması[/URL]
isttoptan no está en línea   Responder Con Cita


Responder

Marcadores

Herramientas
Desplegado

Permisos de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

Códigos BB están Activo
Los Emoticonos están Activo
Código [IMG] está Activo
Código HTML está Inactivo
Trackbacks are Activo
Pingbacks are Activo
Refbacks are Activo