9
« il: 20 Dic 2006, 15:03:46 »
Ciao a tutti
ho scaricato un modulo che mi permette di visualizzare le news in modo scorrevole, tutto funziona perfettamente ma ho solo un problema al passaggio del mouse le news continuano a scorrere senza fermarsi.
Qualcuno può aiutarmi
Grazie in anticipo
inserisco anche lo script
<?php
/**
* @copyright (C) 2006 Joomla-addons.org
* @author Websmurf
*
* --------------------------------------------------------------------------------
* All rights reserved. Scrollable newsflash for Joomla
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* --------------------------------------------------------------------------------
*
* Based on the original newsflash module from Joomla, written by the Joomla team
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
require_once( $mainframe->getPath( 'front_html', 'com_content') );
if (!defined( '_JOS_NEWSFLASH_MODULE' )) {
/** ensure that functions are declared only once */
define( '_JOS_NEWSFLASH_MODULE', 1 );
function output_newsflash( &$row, &$params, &$access ) {
global $mainframe;
$row->text = $row->introtext;
$row->groups = '';
$row->readmore = (trim( $row->fulltext ) != '');
$row->metadesc = '';
$row->metakey = '';
$row->access = '';
$row->created = '';
$row->modified = '';
HTML_content::show( $row, $params, $access, 0 );
}
}
global $my, $mosConfig_shownoauth, $mosConfig_offset, $mosConfig_link_titles, $acl;
// Disable edit ability icon
$access = new stdClass();
$access->canEdit = 0;
$access->canEditOwn = 0;
$access->canPublish = 0;
$now = _CURRENT_SERVER_TIME;
$noauth = !$mainframe->getCfg( 'shownoauth' );
$nullDate = $database->getNullDate();
$catid = intval( $params->get( 'catid' ) );
$height = intval( $params->get( 'height', 100 ) );
$width = intval( $params->get( 'width', 200 ) );
$speed = intval( $params->get( 'speed', 1 ) );
$items = intval( $params->get( 'items', 0 ) );
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$link_titles = $params->get( 'link_titles', $mosConfig_link_titles );
$params->set( 'intro_only', 1 );
$params->set( 'hide_author', 1 );
$params->set( 'hide_createdate', 0 );
$params->set( 'hide_modifydate', 1 );
$params->set( 'link_titles', $link_titles );
// query to determine article count
$query = "SELECT a.id, a.introtext, a.fulltext , a.images, a.attribs, a.title, a.state"
."\n FROM #__content AS a"
."\n INNER JOIN #__categories AS cc ON cc.id = a.catid"
."\n INNER JOIN #__sections AS s ON s.id = a.sectionid"
."\n WHERE a.state = 1"
. ( $noauth ? "\n AND a.access <= $my->gid AND cc.access <= $my->gid AND s.access <= $my->gid" : '' )
."\n AND (a.publish_up = '$nullDate' OR a.publish_up <= '$now' ) "
."\n AND (a.publish_down = '$nullDate' OR a.publish_down >= '$now' )"
."\n AND a.catid = $catid"
."\n AND cc.published = 1"
."\n AND s.published = 1"
."\n ORDER BY a.ordering"
;
$database->setQuery( $query, 0, $items );
$rows = $database->loadObjectList();
$numrows = count( $rows );
echo '<marquee scrollamount="'. $speed . '" direction="up" height="'. $height . '" width="' . $width . '" class="scroll_container">';
// check if any results returned
foreach ($rows as $row) {
output_newsflash( $row, $params, $access );
}
echo '</marquee>';
?>