Views Ticker for D6 - awesome job
phicarre - May 19, 2008 - 09:19
| Project: | Views Ticker |
| Version: | 5.x-0.1-beta1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | hutch |
| Status: | needs review |
Description
I am very exciting to have this module with the drupal 6.x version ...

#1
Subcribe
#2
I'm working on this today. I was hoping to have it done today, but I'm taking the time to see if I can integrate some of the patches that have been posted.
#3
sub,
any news on this port?
#4
subscribing..
Interesting module, looking forward for a 6.x version
#5
subscribing!
#6
+1
#7
subscribing. Looking Forward to seeing Drupal 6.x
#8
Subscribe,.. waiting......................
#9
subscribe
#10
I'm also interested in this. I'm not no drupal developer but i knows the php. Please let me know if you need help.
#11
Cracked it (up to a point). see attached tarball
I have only implemented jscroller, not the other two.
It works with Views 2, I have not tried it with the older Views
Horizontal mode works if you make it inline under Row style: fields
Vertical in a block is working fine in bluemarine
There are options under Basic settings > style: Views Ticker (click on the gear)
scroll type, direction, speed, mouseover and delay.
I have used the latest version of jscroller, included in the tarball
Hope this helps
#12
Found a small thing I forgot to include in the tarball, here is a patch.
It feeds the name of the query through to the template.
#13
I have managed to get the fade and bbc tickers in there as well, please try the attached tarball.
I have also added the bounce effect to the scroller options.
In case anyone is interested, I modelled this port on the views_rotator module, nice clean code that is easy to follow.
#14
D6 version
I installed it. I see the module in the list but nothing else ...
#15
It is all in Views, go there and click on 'add', name it something say 'test_ticker'. When you get to the Edit view test_ticker look under Basic settings and click on style and select 'Views Ticker'. Then select Block from the dropdown on the left and click on Add Display.
Go back to the style 'Views Ticker' and click on the gear and you will get a form below where you can set the type, speed etc
Then save that and go to Site Building > Blocks and enable it
There is documentation on how to use Views at http://drupal.org/handbook/modules/views
#16
Any chance of making a release, even a -dev?
@hutch: Dealing with abandoned projects
#17
Aurthur hasn't made a change in 40 weeks and this is his only project.
Yea @hutch this looks like a fun project for you to take over.
Thanks
Robert
#18
wating for a stable release for d6x
#19
alpha 2 tar works for me; no issues.
+1 for stable release
#20
Sorry not to come back earlier folks, it's been a busy month.
I will look into the possibility of taking over Views Ticker, it does seem to be abandoned ;-(
#21
Great, hutch. There is a link above for the process to follow. When I do this, I use the interim two weeks to convert and fix bugs so that when I get commit access I am ready to close lots of issues.
#22
Thanks for your support, I have been through the process once before with imagepicker so I'll refresh my memory on the details and go from there.
#23
Great. I changed the title so it is more informative on my issues list.
#24
I am sorry that I never checked back on this project. Another drupal user had suggested just using a jquery plugin, and that's the route I started down.
Is this module still needed? For example, one can do something like: http://drupal.org/node/321404
#25
Well, what you're linking to is only a series of code snippets, so I don't think that's a replacement. Yes that way can work, but it's less accessible than Views Ticker, so it would seem like a waste to abandon this project.
#26
I would like to suggest that jQuery.ScrollTo, jQuery.SerialScroll and jQuery.LocalScroll are ripe for inclusion into Views Ticker. The bbc and fade scrollers are already jquery enabled. Views is becoming increasingly central to Drupal and this would make implementation much easier especially for non-coders, the majority of Drupal users.
my 2 bits worth
#27
ahkiam: point taken; accessibility for end users is very important. When I first started with views_ticker, I had just started with Drupal. I tried doing the conversion, but it was taking me too long and I needed to focus on paying work.
hutch: I have unassigned myself to this support request; could you assign yourself to this issue?
Do you need any help --code review, testing, etc? I can help with the integration of jQuery.ScrollTo, jQuery.SerialScroll and jQuery.LocalScroll, but completely understand if you want to tackle that yourself.
I have site work that will keep me busy till the 23rd, but I could help after that if you'd like.
-u
#28
I have assigned myself to this issue.
It seems to me that the first thing to do is get a D6 development version out.
See the attached tarball, it is the same as the previous one but includes the bbc and fade js which I forgot to include in the previous version.
It has been put through Code review and I have it working on my devbox.
unarsu, I understand the pressures of work, I have a business to run myself, but if you can get the cvs done sometime that would be a good start. I will have a look meanwhile at integrating the jQuery.ScrollTo etc packages into Views
#29
hutch: I'll grab this and test this out in the next few days on a live site.
CVS-- I'm not sure I'm up to time travel to the past. Can git be used?
#30
unarsu,
Not and get the files into drupal.org. They only use CVS.
Thanks
Robert
#31
Drupal uses CVS, see
http://drupal.org/handbook/cvs/quickstart
for howto, don't rush in, it's done in a very particular way
#32
I can confirm this works very nice with D6.10
#33
Yes, patch at #28 is working fine for D6.10!
#34
congratulations to all of you . Should we wait for a public release or we can test the dev in D 6.10 ; when it is supposed to have a stable release; I ask this because i dont wont to take the risk to test in live site and also I am not so keen in coding
Thanks
#35
subscribe
#36
this is an interesting module - can I be of any help? (not that I have much php experience, you understand!)
#37
subscribe
#38
I have the alpha version from #28 working nicely - thank you!
My problem now is making it loop - others have had the same issue with the D5 version - see http://drupal.org/node/293360
Thanks for porting this to D6 and all the work you've all done - getting it to loop and I'll be rockin'!
(Having all that blank space after the crawl finishes is a major drag...)
Any ideas greatly appreciated... thanks! (Continuing this discussion here to differentiate this thread from discussion of D5 version.)
#39
The problem with a gap in the loop has so far been unresolvable. The reason is as follows:
It's not really a loop, it is a dataset (a list in fact) that repeats itself, as soon as the last one is finished another starts. This is in the way the javascript works and the jscroller script is packed so it cannot be altered. I had a good look around at other scrollers and most of them have that gap, one didn't but it had a number of other problems, the output was jumpy and the code was poorly written so that was out.
So to summarize this is a javascript problem, not a php problem and it's the same for D5 and D6
To get it fixed requires someone with better javascript skills than I have.
A workaround would be to make longer lists so that the page gets changed before the gap appears, it will still be there but less obviously so.
#40
Thanks, Hutch. I took a look around as well and found that the way to do this has been documented - it's a matter of setting up a second
<div>and adding _endless to the class name. You can see the documentation at:"http://" "jscroller2.markusbordihn.de" "/docs/" (It's all in quotes because the site prevents hotlinking - you'll need to enter the URL manually.)
This could possibly be handled in the .tpl file with some PHP acrobatics and a condition set to "endless." This actually looks like it wouldn't be too hard for someone with decent coding skills, which I, unfortunately, do not possess.
It looks like there are a few of us out here who could really use this functionality, and the D6 version is very new - any takers? I'll keep checking back.... thanks to all!
#41
hmmm, I missed that entry in the docs, you might be right, it might just work, I will give it a try
I'm glad that D6 version is working for people, the credit should go to the folks developing views2, it is so flexible!
#42
OK here is a patch for endless scrolling
What it does is just repeats the loop below the original one
I have no idea wether it will work for anyone else but it is working for me ;-)
If you can't patch just open the patch and views-view-ticker.tpl.php in a texteditor, it's pretty obvious, - means remove and + means add
#43
My, my... you are THE dude!
Works like a charm - thanks SO much!
(This is why I love Drupal.... the community rocks!)
#44
Endless scrolling really does work well now, so here is the whole thing ready to roll.
#45
Subscribing.
#46
Endless scroll works great vertically... horizontally is another story... eep! Seems like a tricker proposition; you can adjust the width in CSS manually it so it sort of works - the width needs to be equal to the full text length and all the items floated left - you'd need to rely on the block width to control what's visible.
Just a heads up and a thanks for getting it working at all - I'm going to convince the client to go with a vertical scroll for now!
#47
Yes that is more or less what I found when I was playing around with it. You can also up the limit in views so that it pulls more data, if you have enough to do that of course ;-)
You could also pad out the links in css so they are further apart, 10 or 20 pixels extra would not be too bad.
You could add something like
background: url(images/bullet.png) no-repeat 0px 5px ;to .views-scroller-horizontal-item in css
hack, hack and hack some more ;-)
#48
hutch,
Thanks for all the work getting this working on D6! I just started messing around with it and, besides #46's horizontal spacing problem, I'm noticing another. I've created a views block that uses the Feed Aggregator as the data source and horizontal scrolling. Only the first item is shown in the scroll and it appears twice then repeats. Using any of the 3 other styles works as expected and shows the complete list.
Haven't had a chance to dig into it yet, but if it's a js problem, I won't likely be able to figure it out.
#49
Have you tried the version from #44
I doubt it's a js problem and if it is there is nothing to do as the js code is packed.
You could trying altering things in views-view-ticker.tpl.php
#50
Probably being very thick here but cannot find the settings to change the variables.
I click on 'styles' see the View Ticker radio , click on it but no gear symbol or options appear and the style defaults back to 'unformatted'
Using D6.10 and Views 2 ......
Cheers
#51
Subscribe
#52
Thanks #44 -- good module. =)
Only issue with it right now is that the width of the scroller is wider than the block it's placed in, so some of the text flows out. This only seems to occur with vertical scrolling.
#53
try tweaking the css:
.views-scroller-vertical-container {width: 210px;
height: 160px;
overflow: hidden;
}
Copy the above into your theme's stylesheet and edit it there, should do it.
#54
Thank you hutch that did the trick =)
#55
subscribe
#56
Great module thanks.
Works fine for me in Horizontal and Vertical mode (with a few tweeks to the CSS), however with BBC style I get the following error:
Webpage error details
Message: 'newsItems[...].length' is null or not an object
Line: 1
Char: 1
Code: 0
with the resulting HTML:
<ul id="views-ticker-fade-ticker_milestones"><li>
<a href="undefined"/>
</li>
</ul>
and consequently no ticker showing on the page.
Any ideas how I can fix this?
#57
Hard to say why but it looks like it's not picking up the sql, just guessing.
Here is an export of a test of bbc ticker that works for me
$view = new view;$view->name = 'test_bbc';
$view->description = 'test of bbc style ticker';
$view->tag = 'test_bbc';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('style_plugin', 'views_ticker_scroller');
$handler->override_option('style_options', array(
'scroller_type' => 'bbc',
'hscroller_speed' => '30',
'hscroller_direction' => 'left',
'hscroller_delay' => '0',
'hscroller_mouseover' => 0,
'hscroller_bounce' => 0,
'vscroller_speed' => '30',
'vscroller_direction' => 'up',
'vscroller_delay' => '0',
'vscroller_mouseover' => 0,
'vscroller_bounce' => 0,
));
$handler->override_option('row_options', array(
'inline' => array(
'title' => 'title',
),
'separator' => ' ',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', 'test_bbc');
$handler->override_option('block_caching', -1);
Hope this helps
#58
Thanks hutch.
Where do I put this code?
#59
Home > Administer > Site building > Views > Import
But I've just noticed that you are on Drupal 5, I don't think it works there, sorry ;-(
I haven't looked at D5 for quite awhile now, and I'm not the maintainer.
#60
Thanks. I am using D6. BBC style ticker works a treat now.
I think maybe my problem was that I was trying to use the body field instead of the title. I wanted to do this so that I could apply formatting to individual parts of the text within the ticker, eg to have numbers in red.
Is this possible?
#61
To be honest I don't know, but it sounds like something that could be done in your theme's css
A careful look at the source code using firebug or whatever tool you use the view the DOM should help.
#62
Hey guys,
Just a heads up - if you remove "Link this field to its node" from the TITLE field, it breaks the BBC-style output.
Thanks for the D6 version!
#63
subscribe
#64
Loving this, thanks Hutch... one question (and it might be something simple I have just missed) - can I have 2 fields displaying in the ticker for each item (for example, I want to show the taxonomy term, then a ':' and then the title) ?
Thanks again for taking over and getting this working.
Steve
I discovered I can, if I use fade or scroll - but I wanted to use the BBC ticker.... is this something particular to that?
#65
Is there a way to turn off it setting a link on the ticker? I searched through the view settings but did not see anything. I just want it to scroll with plain jane text. TIA!
#66
First of all I haven't taken over the project, I applied for it and never heard another thing, looks like it got lost ;-(
As far as I know you should be able to do all this in Views. I concentrated on the D6 version and got that going so I don't know about Views in D5.
#67
Just tried the V6 - great work, and can't wait for an official module with BBC ticker settings so that I'm not hacking the js file to change scroll speed, etc.
Thanks so much!
In the meantime, any idea why it breaks the External Links module / link target ? The target attribute is still there in the code (_blank) for each link, but it is being ignored when displayed within the BBC-style ticker...
Thanks in advance for any ideas.
:)
And yes, I know that the 'target' attribute has been deprecated for strict XHTML:
http://drupal.org/node/344970
#68
I imagine that the reason that extlink and ticker won't play well together is because they both manipulate the DOM and one is overriding the other.
You could try to give extlink some 'weight' in the system table..... (advanced)
This would/might cause extlink js to load after the ticker js. Wether that will work or not I don't know, I can't test as I have no ticker viewing external links.
#69
Subscribing
#70
Hey Hutch,
Thanks for the suggestion. I installed the Utility module, which allows for module weight assignments, and set the External Links module higher in weight (1000) than the Views-ticker (0), but that didn't fix it. However, when looking at the code, the extlink.js was still being called before the views ticker. I checked the MYSQL database, and the weights were assigned correctly.
I did a quick str_replace to remove the extlink.js from the $script variables, and then added the extlink.js back below the other ticker script, but that still didn't fix it. Also tried replacing the target attribute with some javascript, but no luck there either. I think that Ext Links is working - but links are being re-rendered in this case. For a flash second, I can see the items in the 'news' view before the BBC-style scroller actually starts, and I can see that they do have the external link icon next to them. But once the scroller starts, it is gone, and they won't open in another window.
In fact, I apologize in that I should have been clearer in my original post - this issue apparently only affects the BBC style ticker. I just tried the horizontal and it works with Exteneral Links just fine. So my guess is that some sort of link rendering option that is available in the other ticker styles is not present in the BBC style ticker.
Found this from the coder who wrote the BBC script:
http://www.makemineatriple.com/2009/02/link-target/
Doesn't really say anything about adding this feature to the BBC ticker, but I guess it explains his reasoning for not including. Whether using target or javascript, I can't say I agree with him - particularly with the prevalence of tabbed browsing and the fact that the Ext Links module adds an icon next to the link to let users know where they are going.
I'll do some tinkering and see if I can't come up with a solution...in case anyone else feels the same way and wants these modules to play well together.
#71
No luck on a pretty fix, but I did manage to unpack the bbc.js file and add the target attribute where my client wanted it. I was going to add the "ext" class and let the External Links module do its thing, but I couldn't get it to correct the links as they were loaded by the ticker. Only the first link displayed was given the class.
Anyways, if anyone else wants the links to open in a new window in their BBC style ticker, unpack the views.ticker.bbc.js script included in the views ticker module and find this line:
if(currentLength==0){
$(settings.newsList).empty().append('<li><a href="'+settings.newsLinks[currentItem]+'"></a></li>')
}
and add your target:
if(currentLength==0){
$(settings.newsList).empty().append('<li><a target="_blank" href="'+settings.newsLinks[currentItem]+'"></a></li>')
}
Not perfect, but it works for me.