Download & Extend

All items being separated and scrolled in two massive lists

Project:Newsticker
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review

Issue Summary

I have a list of around 50 items. For some reason the scroller has separated them all in to two 25(ish) item lists and is jsut scrolling back and forth between the two rather than scrolling through each list item one at a time.. This worked fine in the drupal 5 version. I should mention that every item has a weight of -10. Any suggestions? I am using a homegrown theme.

Comments

#1

I believe making some adjustments to the default CSS should do the trick, just make the changes in your own themes CSS. The new version of the module uses a different approach to scrolling, basically laying out all the items in a horizontal line and using some overflow trickery and CSS to show one at a time. I thought it was better performance and SEO. Also take a look at how the widths are defaulted in newsticker_get_rotator().

#2

Hey thanks for the quick feedback :)

I see what you're saying, but mine isn't horizontal. It's two vertical lists which are sliding back and forth as if each is a single list item or something. The content in the two vertical lists isn't being manipulated at all so if i were to set a height on the content via css so it only showed one line it would then just be bouncing back and forth between the first item in each list.

I included a screenshot so you can see what I mean. This image shows what it looks like in the middle of the transition between the two lists.

AttachmentSize
screen.png 20.61 KB

#3

I don't know anything about php coding, but I change line 232 from $('#newsticker ul').width(width*3); to $('#newsticker ul').width(width*150); and now it works although when it gets to the end of the list is talkes a LOOOONG time to slide through everything back to the beginning... not sure what that did, but seems to be on the right track!

EDIT: regarding the LONNNG slide back to the first list item, is there some way I can just have it kick right back to the first item in the list once done rather than sliding? I spent a bit of time checking our the serialscroll docs and could see anything outside of 'cycle' which doesn't do waht I thought it would (go from the last item to the first item as if it was just advancing again)

#4

Version:6.x-1.x-dev» 6.x-1.1

Bumping. #3 works pretty well. Is that going to be worked into an update?

#5

Agreed that #3 solves the problem, and should be worked into an update (unless there is a more graceful solution!)

#6

For anyone still wanting to make the 'scroll back' quicker, you'll need to upgrade the version of 'jquery.serialScroll.js' to 2.2 and then either change line 38 in the file from true to false. Basically constant:false // use contant speed ?.

Alternatively, you can add a new line to 'newsticker.module' file (update attached along with change to line 232, as noted in #3) around line 237 as follows:
constant: 0,

What's happening is that the jQuery serial scroll is set by default to scroll through all of the entries at a 'constant' speed, meaning it will scroll back through to the beginning at the same speed as it got to the end but without a pause of course. Setting the 'constant' to 'false' therefore ignores this setting and gives you a nice quick scroll back to the beginning!

You may be able to get away without updating the jquery.serialScroll.js file but I thought it was best to use the latest version anyway. You can download the update here: http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.2.zip

Thanks to the module creator loubabe. Hopefully this helps out some people.

Goodnight... Much love...

AttachmentSize
newsticker.zip 3.34 KB

#7

I have the same issue, however my ticker is horizontal. I see no code that controls the height of the ticker. I can set the div container to a certain height but just as leetamus suggested, it just bounces back and fourth between the first item. Any idea on how to fix? Anyone maintaining this module? This should definitely be fixed otherwise the module is only good for 2 news ticker items.

Thanks.

#8

I'm using this module with 20 items in the list and it scrolls horizontally, just how I want it. The 'bounce' only occurs when it reaches the last item and then quickly scrolls to the first item again. If you don't want it to do this, then you need to use a different jQuery scroll option, which this module does not support. Try the patch file I've submitted before, I think you'll find it works.

I also set the weight for each file to a unique value if that helps. Looking at the 'weight' options, it seems as though you can only have 20 items or less.

If this module isn't good enough for you, I'd make a 'view' for a block with your content, make sure it's set to display an 'HTML list', add a jQuery scroller like Easy Slider to your theme, create extra css to accommodate for the hidden elements and then add a link to the javascript in your theme's page.tpl.php. I've done this before to show multiple scrolling images and it works well.

#9

I don't know if this is the same issue, or different:

With the third news-item for the newsticker, the three are not scrolled on one line, but on two lines. There is enough space for all three on the screen, but even if there wasn't, the items should just scroll on the same line to give space to the others that don't fit on the screen.

Then I tried to give them different values like 10, 9 and 8, but that didn't make any difference.

I updated all the jQuery by unzipping that file in the module dir, overwriting the old files => no difference.

(also cleared the cache)

Then applying #3:

OHH! Only 2 items??! It should be endless. As I have 3 test articles at this point, I changed in line 232 of newsticker.module to width*3. But then ONLY ONE item show up at the time.

I presume a news-ticker is generally considered as as much as items on one line on the screen and scrolling towards all the other news-items that can't be on the same full screen-width line all at the same time..?!

This module can't do that?

#10

Thanks for taking the time to reply onewayticket. I ended up using cck, jcarousel and views to build my news ticker. I had more flexibility to achieve the results I wanted.

#11

Version:6.x-1.1» 6.x-1.x-dev
Category:support request» bug report
Priority:normal» critical
Status:active» needs work

I just confirmed this with the latest dev version. I'm changing this to critical because as mentioned in #7, this module is good for only 2 items until this is fixed.

#12

Status:needs work» needs review

As some people have hinted at, the problem lies in the width of the block. Currently, the module is hardcoding the width * 2, thus causing there to be only 2 rows - if you were to change that to 3, there would be 3 rows, etc. Anyway, I have attached a patch that fixes this issue by multiplying the width of the block by the number of items there are in the ticker.

AttachmentSize
widthbug-611924.patch 861 bytes
nobody click here