Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 9:36 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Newsflash Scroller
Posted: Wed Jan 04, 2006 1:56 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Oct 31, 2005 1:20 am
Posts: 29
My Newsflash Scroller (dhtml) NOT PRO works fine - but if there is a link to click, as soon as you mouse over the scroller box, an error appears at the bottom  on internet explorer. "error on page"

Even if you don`t have a link in the scroller box - if you even mouse over the area, the error appears.

Anyone know why ?
Thanks
Phil


Top
  E-mail  
 
 Post subject: Re: Newsflash Scroller
Posted: Wed Jan 04, 2006 1:33 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Jan 04, 2006 12:20 pm
Posts: 21
Location: UK
I would imagine there is some kind of onmouseover call to a javascript function that is either broken or missing you may want to post a link to your site for us to take a look.

Just as a bit of futher infomation, not all browsers will display this error as how you described some will present the user with a warning message.

_________________
http://www.zeststudios.co.uk - Professional Website Development
http://www.wzod.co.uk - Free Developer Listings


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Sun Jan 22, 2006 5:19 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
any chance you've found a soln to this problem?

i'm experiencing the same thing in IE

this is the line
Code:
<table class="moduletable" height="90" border="0" cellpadding="0" cellspacing="0" onmouseover="NFstopScroller448847();" onmouseout="NFstartScroller448847();">


cheers


You do not have the required permissions to view the files attached to this post.


Last edited by OAS on Sun Jan 22, 2006 5:24 am, edited 1 time in total.

Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Sun Jan 22, 2006 6:14 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
and here's the code for the script :)

Code:
<?php

// $Id: mod_newsflash_scroller.php, v2.2 2004/10/13 20:56:34 DJesus Exp $

/**

* NewsFlash Scroller Module

* @ for Mambo Open Source v4.5.1

* @ copyright (C) 2000 - 2004 Miro International Pty Ltd

* @ All rights reserved

* @ Mambo Open Source is Free Software

* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html

* @ Modified/Hacked by TEG Design - www.tegdesign.ch (implemented the "Flash" option...)

* @ version $Revision: 2.2 $

**/



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



$NFversion = "v2.2 (13.10.2004)";



// Loading the Content Class code

require_once( $mainframe->getPath( 'front_html', 'com_content') );



$content = "";   // clear previous content



global $my, $mosConfig_shownoauth, $mosConfig_offset;



$access = !$mosConfig_shownoauth;



$now = date( "Y-m-d H:i:s", time()+$mosConfig_offset*60*60 );



// ID name Randomizer to avoid conflict in case of multiple modules (module duplication for multiple NewsFlash)

srand ((double) microtime() * 1000000);

$IDrdm = rand( 1, 999999 );

$IDname = "NFRow".$IDrdm."_";



// Get Mameters...

$catid    = intval( $params->get( 'catid' ) );         // Category to display

$style    = $params->get( 'style' );                   // Display mode (random,horiz,vert,flash)

$sorting  = $params->get( 'sorting' );                 // Display mode (0:sorted,1:random)

$image    = $params->get( 'image' );                   // 1:Yes / 0:No

$readmore = $params->get( 'readmore' );                // 1:Yes / 0:No

$items    = intval( $params->get( 'items' ) );         // No of items to display : 0:all

$height   = intval( $params->get( 'height' ) );        // Height  : 200px / 0:auto-height

$borders  = intval( $params->get( 'borders' ) );       // borders : 1

$padding  = intval( $params->get( 'padding' ) );       // padding : 2

$spacing  = intval( $params->get( 'spacing' ) );       // spacing : 0

$bgcolor  = $params->get( 'bgcolor' );                 // back ground color: #F0F0F0



$delay    = intval( $params->get( 'delay' ) );         // Flash : Delay : 1000 = 1 seconds



$direction    = $params->get( 'direction' );                // Marquee : Scroll Direction

$scrollamount = intval( $params->get( 'scrollamount' ) );   // Marquee : # of lines (step) per scroll

$scrolldelay  = intval( $params->get( 'scrolldelay' ) );    // Marquee : Delay between each line (ms) between each scroll (0:fast / 200:slow)

$separator    = intval( $params->get( 'separator' ) );      // Marquee : Separator (1:Yes / 0:No)



$cache    = $params->get( 'cache' );

$moduleclass_sfx = $params->get( 'moduleclass_sfx' );



// Content's Intro only and Hide some content features (author, dates, etc)

$params->set( 'intro_only', 1 );

$params->set( 'hide_author', 1 );

$params->set( 'hide_createdate', 0 );

$params->set( 'hide_modifydate', 1 );



if ( $items ) {

    $limit = "LIMIT ". $items;

} else {

    $limit = "";

}



if ( $sorting ) {

    $sorted = "ORDER BY rand()";

} else {

    $sorted = "ORDER BY a.ordering";

}



$Query = "SELECT a.id"

."\n FROM #__content AS a"

."\n INNER JOIN #__categories AS b ON b.id = a.catid"

."\n WHERE a.state = 1"

."\n AND a.access <= ". $my->gid .""

."\n AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '". $now ."') "

."\n AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '". $now ."')"

."\n AND catid='". $catid ."' "

."\n ". $sorted

."\n ". $limit

;



$database->setQuery( $Query );



$rows = $database->loadResultArray();



$row = new mosContent( $database );



$numrows = count( $rows );





echo "\n<!-- ### Module NewsFlash Scroller $NFversion ### -->\n";



echo "\n<table class=\"moduletable" . $moduleclass_sfx . "\"";

if ($height)  { echo " height=\"".$height."\""; }

echo " border=\"".$borders."\"";

echo " cellpadding=\"".$padding."\"";

echo " cellspacing=\"".$spacing."\"";

echo " onmouseover=\"NFstopScroller".$IDrdm."();\"";

echo " onmouseout=\"NFstartScroller".$IDrdm."();\"";

if ($bgcolor) { echo " bgcolor=\"".$bgcolor."\""; }

echo ">\n";



echo "<tr valign=\"TOP\">\n";



switch ($style) {

  case 'horiz':

     foreach ($rows as $id) {

         $row->load( $id );

         $row->text = $row->introtext;



         echo '<td>';

         HTML_content::show( $row, $params, $access, 0, 'com_content' );

         echo "</td>\n";

     }

     break;



  case 'vert':

     foreach ($rows as $id) {

         $row->load( $id );

         $row->text = $row->introtext;



         echo '<td>';

         HTML_content::show( $row, $params, $access, 0, 'com_content' );

         echo "</td>";

         echo "</tr><tr valign=\"TOP\">\n";

     }

     break;



  case 'flash':

     $ii = 0;

     echo "<td>\n";

     foreach ($rows as $id) {

         $row->load( $id );

         $row->text = $row->introtext;



         echo '<DIV';

         echo ' id="'.$IDname.$ii.'"';

         echo ' style="';

         echo ($ii < 1) ? 'display: visible; visibility: visible;' : 'display: none; visibility: hidden;';

         echo '"';

         echo '>';

         HTML_content::show( $row, $params, $access, 0, 'com_content' );

         echo '</DIV>';



         $ii++;

     }

     echo "</td>";

     break;



  case 'marquee':

     echo "<td>\n";



     if ($numrows > 1) {   // Scrolling only if multiple news available...

        echo '<marquee';

        echo ' behavior="scroll"';

        echo ' direction="'.$direction.'"';

        echo ' height="'.$height.'"';

        echo ' scrollamount="'.$scrollamount.'"';

        echo ' scrolldelay="'.$scrolldelay.'"';

        echo ' truespeed';

        echo ' onmouseover=this.stop()';

        echo ' onmouseout=this.start()';

        echo ">\n";

     }



     if ($direction == 'left' || $direction == 'right') {

        echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><TR valign="TOP">';

     }



     $ii = 0;

     foreach ($rows as $id) {

         $row->load( $id );

         $row->text = $row->introtext;

         $ii++;



         if ($direction == 'up' || $direction == 'down') {

            echo '<DIV>';

            HTML_content::show( $row, $params, $access, 0, 'com_content' );

            echo '</DIV>';

            if ($numrows > 1 && $ii < $numrows ) {   // Scrolling only if multiple news available...

              if ($separator) {   // Show Separator ?

                 echo '<hr>';

              }

            }

            echo "\n";

         } else {

            echo '<TD>';

            HTML_content::show( $row, $params, $access, 0, 'com_content' );

            echo '</TD>';

            echo "\n";

         }

     }



     if ($direction == 'left' || $direction == 'right') {

        echo '</TR></table>';

     }



     if ($numrows > 1) {   // Scrolling only if multiple news available...

        echo "</marquee>\n";

     }



     echo "</td>";

     break;



  default:

     echo '<td>';

     if ($numrows > 0) {

        srand ((double) microtime() * 1000000);

        $flashnum = $rows[rand( 0, $numrows-1 )];

     } else {

        $flashnum = 0;

     }

    $row->load( $flashnum );

    $row->text = $row->introtext;



    HTML_content::show( $row, $params, $access, 0, 'com_content' );



    echo "</td>";

    break;

}



echo "</tr></table>\n";



if ($numrows > 1 && $style == 'flash') {   // more than 1 news to display and flash mode => activate scroller, otherwise just display current News...



$txt = "

<SCRIPT LANGUAGE='javascript'>



  // ----------------------------------------

  var NFtimerID".$IDrdm." = null;

  var NFscrollerRunning".$IDrdm." = false;

  var NFid".$IDrdm." = 0;

  var NFtotal".$IDrdm." = " .$numrows. ";

  var NFblock".$IDrdm." = 1;

  var NFdelay".$IDrdm." = " .$delay. ";

  var NFname".$IDrdm." = '".$IDname."';



  var ns4=(navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4);

  var ns6=(document.getElementById)? true:false;

  var ie4=(document.all)? true:false;



  // ----------------------------------------

  function NFshowObject".$IDrdm."(obj){

    if (ns6) {

      obj.style.display='block';

      obj.style.visibility='visible';

    }

    else if (ie4) obj.visibility='visible';

    else if (ns4) obj.visibility='show';

  }



  // ----------------------------------------

  function NFhideObject".$IDrdm."(obj){

    if (ns6) {

      obj.style.display='none';

      obj.style.visibility='hidden';

    }

    else if (ie4)obj.visibility='hidden';

    else if (ns4)obj.visibility='hide';

  }



  // ----------------------------------------

  function NFnextblock".$IDrdm."(id,block,total) {

    if (total % block > 0) {

        totmax = (Math.floor(total/block)+1)*block;

    } else {

        totmax = total;

    }

    id = (id < totmax-block) ? id+block : totmax-(id+block);   // Circular chain : next to last = first

    return id;

  }



  // ----------------------------------------

  function NFprevblock".$IDrdm."(id,block,total) {

    if (total % block > 0) {

        totmax = (Math.floor(total / block) +1) * block;

    } else {

        totmax = total;

    }

    id = (id < block) ? totmax-block+id : id-block;   // Circular chain : previous to first = last

    return id;

  }



  // ----------------------------------------

  function NFshowBlock".$IDrdm."() {

      for (i=NFid".$IDrdm."; i < NFid".$IDrdm." + NFblock".$IDrdm."; i++) {

        p = NFprevblock".$IDrdm."(i,NFblock".$IDrdm.",NFtotal".$IDrdm.");

        if (p < NFtotal".$IDrdm.") {

           NFhideObject".$IDrdm."(document.getElementById(NFname".$IDrdm." + p));

        }  // Hide Object

        if (i < NFtotal".$IDrdm.") {

           NFshowObject".$IDrdm."(document.getElementById(NFname".$IDrdm." + i));

        }  // Show Object

      }

      n = NFnextblock".$IDrdm."(NFid".$IDrdm.",NFblock".$IDrdm.",NFtotal".$IDrdm.");

      NFid".$IDrdm." = n;                                            // Set next object

      NFstartScroller".$IDrdm."();

  }



  // ----------------------------------------

  function NFstopScroller".$IDrdm."(){

    if (NFscrollerRunning".$IDrdm.") {      // Stop the scroller

       clearTimeout(NFtimerID".$IDrdm.");

    }

    NFscrollerRunning".$IDrdm." = false;    // Scroller stopped

  }



  // ----------------------------------------

  function NFstartScroller".$IDrdm."() {

    if (!NFscrollerRunning".$IDrdm.") {

       if (document.getElementById) {   // DOM Compatible ?

         NFscrollerRunning".$IDrdm." = true;      // Scroller started

         NFtimerID".$IDrdm." = setTimeout('NFshowBlock".$IDrdm."()', NFdelay".$IDrdm.");   // Wait for a while before to display next object

       }

    } else {

         NFtimerID".$IDrdm." = setTimeout('NFshowBlock".$IDrdm."()', NFdelay".$IDrdm.");   // Wait for a while before to display next object

    }

  }



  // ----------------------------------------

  function NFloadScroller".$IDrdm."() {

    NFstopScroller".$IDrdm."();                // Make sure the scroller is stopped

    NFshowBlock".$IDrdm."();

  }



  // Start scroller

  // ----------------------------------------

  NFloadScroller".$IDrdm."();



</SCRIPT>\n\n";



echo $txt;



}



echo "\n<!-- ### END : Module NewsFlash Scroller $NFversion ### -->\n\n";



?>


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Sun Jan 22, 2006 4:49 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
been workin on this all day
the line of code below is the culprit:

Code:
echo "\n<table class=\"moduletable" . $moduleclass_sfx . "\"";


the _sfx is the Module Class Suffix

i've got mine left blank, and haven't changed my css file or anything

if only i knew how to fix it :-[


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Mon Jan 23, 2006 5:35 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
think i was wrong with my last post!

Code:
echo " onmouseover=\"NFstopScroller".$IDrdm."();\"";

echo " onmouseout=\"NFstartScroller".$IDrdm."();\"";


i commented the above lines, and no more errors :)

well hopefully it stays like that

the on mouseover/out still works too


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Fri Jan 27, 2006 11:11 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Oct 31, 2005 1:20 am
Posts: 29
Worked for me too ! thanks a million for that ! Does it change the way it shows up on other browsers though ? eg firefox, safari etc

Thanks


Top
  E-mail  
 
 Post subject: Re: Newsflash Scroller
Posted: Sat Jan 28, 2006 3:32 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
haven't noticed anyway in the way is appears in the web browser

i've tried it with both IE and firefox


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Sun Jan 29, 2006 1:45 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Jan 19, 2006 3:44 pm
Posts: 1
Where can I get a newsflash scroller
Thanks


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Sun Jan 29, 2006 4:16 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jan 10, 2006 3:36 pm
Posts: 33
Location: Australia
think i got mine from here: http://mamboforge.net/projects/webtools/


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Mon Feb 13, 2006 4:40 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Dec 08, 2005 11:39 pm
Posts: 23
Hi,

Is there any way you can make the newsflash scroller appear on one page alone (like say the main page for a content blog) and not on all pages for a menu item ?

thanks


Top
   
 
 Post subject: Re: Newsflash Scroller
Posted: Thu Feb 23, 2006 12:43 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Nov 18, 2005 10:34 am
Posts: 5
how do i post new news items on my scroller?

Ive installed the djesus newsflash scroller, but cant seem to get it working? ?

http://www.some-things.net

Any tips ?


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

Quick reply

 



Who is online

Users browsing this forum: jadboog and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group