Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2008, 09:23
HugoMan
 
Fecha de Ingreso: febrero-2008
Mensajes: 2
Antigüedad: 16 años, 2 meses
Puntos: 0
Puglins..? joomla 1.5

Un saludo a toda la comunidad.
Saben estoy creando un template para joomla 1.5, el problemas que tengo es:
Quiero mostrar un index.php (de la plantilla principal) y lueog que en el menu de este me dire4cciones a una index.php(Secundario de diferente estilo al primero).
Busque informacion en la red y lo que encontre mas relacionado al tema fue "Como crear plugins", la informa cion me sirvio de poco.
Ya que quiero que cuando el visitante presione en un articulo el (Leer mas...) esta lo direccione a una pagiona secundaria con diferente estilo a la primera.
por si acaso dejo el código del readmoore.php para que alguien me pueda indicar en que lugar hacer el cambio y como..
Espero su respuesta gracias..!


<?php


// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );

/**
* Editor Readmore buton
*
* @author Johan Janssens <[email protected]>
* @package Editors-xtd
* @since 1.5
*/
class plgButtonReadmore extends JPlugin
{
/**
* Constructor
*
* For php4 compatability we must not use the __constructor as a constructor for plugins
* because func_get_args ( void ) returns a copy of all passed arguments NOT references.
* This causes problems with cross-referencing necessary for the observer design pattern.
*
* @param object $subject The object to observe
* @param array $config An array that holds the plugin configuration
* @since 1.5
*/
function plgButtonReadmore(& $subject, $config)
{
parent::__construct($subject, $config);
}

/**
* readmore button
* @return array A two element array of ( imageName, textToInsert )
*/
function onDisplay($name)
{
global $mainframe;

$doc =& JFactory::getDocument();
$template = $mainframe->getTemplate();

// button is not active in specific content components

$getContent = $this->_subject->getContent($name);
$present = JText::_('ALREADY EXISTS', true) ;
$js = "
function insertReadmore(editor) {
var content = $getContent
if (content.match(/<hr id=\"system-readmore\" \/>/)) {
alert('$present');
return false;
} else {
jInsertEditorText('<hr id=\"system-readmore\" />', editor);
}
}
";

$doc->addScriptDeclaration($js);

$button = new JObject();
$button->set('modal', false);
$button->set('onclick', 'insertReadmore(\''.$name.'\');return false;');
$button->set('text', JText::_('Readmore'));
$button->set('name', 'readmore');
// TODO: The button writer needs to take into account the javascript directive
//$button->set('link', 'javascript:void(0)');
$button->set('link', '#');

return $button;
}
}