Página 1 de 1

Erros no modulo pois nao aparece no site

Enviado: 25 Dez 2008, 22:15
por Umbus
Boas,
Estou com uns problemas no desenvolvimento dum modulo que funcione com o joomfish e que coloque as noticias do letterman a funcionar em marquee. O meu codigo é:

Código: Selecionar todos


defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

global  $mainframe;
$now = date( 'Y-m-d H:i:s', time()  );
?>
     <table style="BORDER-RIGHT: rgb(208,208,208) 1px solid; BORDER-TOP: rgb(208,208,208) 1px solid; BACKGROUND: url(/templates/miguel_praia/images/box_options_bg.jpg) no-repeat center bottom; BORDER-LEFT: rgb(208,208,208) 1px solid; BORDER-BOTTOM: rgb(208,208,208) 1px solid; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" cellspacing="0" cellpadding="0" width="217" border="0">
    <!--DWLayoutTable-->
    <tbody>
        <tr>
            <td width="4" height="79">&nbsp;</td>
            <td valign="top" width="206"><?php mosLoadModules ( 'right' ); ?>
            <table height="69" cellspacing="2" cellpadding="2" width="209" summary="" border="0">
                <tbody>
                    <tr>
                        <td><a href="index.php?option=com_letterman"><font color="#ff6600" size="4">Not&iacute;cias / News</font></a><br />
                        <img height="1" alt="" width="197" src="http://forum.joomlapt.com/images/splitter_box.gif" /> </td>
                    </tr>
                    <tr>
                        <td valign="middle">
  <?
  
  $sql = "SELECT c.id, c.subject, c.message, c.html_message
  FROM #__letterman as c
        WHERE ( c.state = '1' AND c.checked_out = '0' AND c.sectionid > '0' )"
  . "n AND ( c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= '". $now ."' )"
  . "n AND ( c.publish_down = '0000-00-00 00:00:00' OR c.publish_down >= '". $now ."' )"
  . "nORDER BY c.created asc "
  . "nLIMIT 10";
$database->setQuery( $sql );
$result = $database->mysql_num_rows();
$nregistos = mysql_num_rows($result);
        echo '<MARQUEE
direction="up" scrollamount="2" height="200" width="100%">';
         for ($i=0; $i <$nregistos; $i++) {
        $registo = mysql_fetch_assoc($result);
        echo '<BR><b><font size="2" color="#ff9900">'.$registo['subject'].'</font></b><BR>';
        echo ''.$registo['message'].'<BR>';
        if (!$registo['html_message']) {
        echo "<BR><BR>";
    }
else
{
?>
<a href="index.php?option=com_letterman&task=view&id=<? echo  $rows->id; ?>">[ Ver Mais ]</a><BR><BR>
<?
}

}
}
echo '</MARQUEE>';
?>
<a href="index.php?option=com_letterman">[ Histórico ]</a><BR><BR>
<?

?>
     </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td width="2">&nbsp;</td>
        </tr>
    </tbody>
</table>
Alguem pode dar-me um jeitinho é que sou novo na criação de módulos.


Para traduzir o letterman usei o seguinte xml:

Código: Selecionar todos

<joomfish type="contentelement">
  <name>letterman</name>
  <author>Umbus</author>
  <version>1.0</version>
  <description>Traduçao para letterman</description>
  <reference type="letterman">
     <table name="letterman">
        <field type="referenceid" name="id" translate="0">ID</field>
        <field type="titletext" name="subject" translate="1">subject</field>
        <field type="text" name="headers" translate="0">headers</field>
        <field type="text" name="message" translate="1">message</field>
        <field type="htmltext" name="html_message" translate="1">html message</field>
        <field type="text" name="published" translate="0">published</field>
        <field type="checked_out_by" name="checked_out" translate="0">Check out by</field>
        <field type="checked_out_date" name="checked_out_time" translate="0">Check out date</field>
        <field type="date" name="publish_up" translate="0">Publish from</field>
        <field type="date" name="publish_down" translate="0">Publish to</field>
      <field type="created_date" name="created" translate="0">Created</field>
         <field type="date" name="send" translate="0">send date</field>
      <field type="text" name="hits" translate="0">hits</field>
      <field type="text" name="access" translate="0">access</field>
     </table>    
  </reference>
  <translationfilters>
       <keyword>subject</keyword>
  </translationfilters>
</joomfish>
Por favor preciso de ajuda =(

Re: Erros no modulo pois nao aparece no site

Enviado: 14 Jan 2009, 12:18
por Umbus
Alguem que me ajude por favor?