Welcome to Geeklog, Anonymous Tuesday, April 16 2024 @ 07:22 am EDT

Geeklog Forums

News Ticker


Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
I would like a news Ticker, so much news is coming out for us at the moment...
Is there one for Geeklog ???
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Be more specific. What does a news ticker do that RSS blocks don't already do (aside from automatically scrolling)?
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Automatically scrolling actually, just under the header...
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
But what content? Your website's articles or some RSS feed? Or do you want to customize it?
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
Here's a MooTools javascript library based News Ticker. See it in action here, and download it here.

Perhaps it can be shaped to do what you're wanting. Big Grin

Hope this helps!

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Thanks Geiss,
That is a start !...
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
On my test site, I've added that MooTools news ticker. It was really simple since I already had the framework installed for the theme I'm working on.

You create an unordered list, and give it the class="moostick" and it does the rest:
Text Formatted Code

<script type="text/javascript" src="http://geiss.getmyip.com/gl141ctl/layout/nouveau/js/moostick.js"></script>

<ul class="moostick">
  <li>Simple Text in a list item</li>
  <li>A <a href="#">link</a> in a text item</li>
  <li><a href="#">A headline of a story or RSS</a></li>
</ul>
 


So, now the question becomes writing a function that will output an RSS feed that way. You could use a portal block, but the feed will have the class="list-feed". You can change that in Geeklog's lib-common.php. On line 3529 change:

Text Formatted Code
        $content = COM_makeList( $articles, 'list-feed' );

to

        $content = COM_makeList( $articles, 'moostick' );


Save your changes, clear your browser cache, and make sure to clear your feed cache in the block editor.

Hope this helps!

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Thanks Geiss,
Will this change of code alter any RSS feeds we have ? because I would like to keep those ????
 Quote

Status: offline

geiss

Forum User
Full Member
Registered: 02/10/04
Posts: 176
Location:Boise, Idaho
Quote by: trampoline

Thanks Geiss,
Will this change of code alter any RSS feeds we have ? because I would like to keep those ????



Yes, it will affect them by making them all use the ticker, since the modification to lib-common.php spits out the RSS feeds with class="moostick" instead of class="list-feed".

You could either add any CSS for .list-feed to .moostick in your style.css file if you are only worried about styling, or back out the above changes in lib-common.php and figure out a way to create a custom function to create an RSS feed and specifically give it a class="moostick" attribute.

Hope this helps!

Eric
Synergy - Stability - Style --- Visit us at glfusion.org
 Quote

Status: offline

ArchyAA

Forum User
Junior
Registered: 12/19/07
Posts: 28
Location:Kiev, Ukraine
Where can i download 1.6.1 mediagallery ??
 Quote

All times are EDT. The time is now 07:22 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content