News ticker

8 posts by 6 authors in: Forums > CMS Builder
Last Post: July 4, 2011   (RSS)

By NigelGordijk - October 9, 2009

Hi, there.

Does anyone know of a way to have a scrolling news ticker that can be updated via CMSB?

Many thanks!
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] News ticker

By kevbarker - October 9, 2009

There are quite a few Flash based news tickers here: http://flashden.net/searches?term=ticker&type=files I saw some pretty cool ones there. Most are less than $10.

I would choose one which is XML based and then use CMSB to update the XML file which the Flash ticker uses.

Hope this helps.

Kevin

Re: [kevbarker] News ticker

By NigelGordijk - October 9, 2009

Thanks, Kevin.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] News ticker

By Chris - October 11, 2009

Hi Nigel,

You could also do this with JavaScript. You could try searching for [jquery news ticker].

Best of luck!
All the best,
Chris

Re: [NigelGordijk] News ticker

By Mikey - June 29, 2011

Hi, there.

Does anyone know of a way to have a scrolling news ticker that can be updated via CMSB?

Many thanks!


Here's one I've been using. The CSS is a little sloppy, so you may want to clean it up a bit... I just haven't had time to touch it since I first messed with it. It's set to build a box 350px X 350px once it loads. I don't have it set to auto-scroll news, but according to the website there is a speed option that can be set. It works with a "multi" menu type.
Zick



Get easySlider jQuery here: http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider

============== Head Code ==============
// load news slider records
list($newsSliderRecords, $newsSliderMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '7',
));

<?PHP
function maxWords($html, $maxWords) {
$html = str_replace("<li>","<p>",$html);
$html = str_replace("</li>","</p>",$html);
$html = str_replace("<p>","*P*",$html);
$html = str_replace("</p>","*/P*",$html);
$html = str_replace("<"," <",$html);
$text = strip_tags($html);
$words = preg_split("/\s+/", $text, $maxWords+1);
if (count($words) > $maxWords) { unset($words[$maxWords]); }
$output = join(' ', $words);
$output=str_replace("*P*","<p>",$output);
$output=str_replace("*/P*","</p>",$output);
$output.="...</p>";

return $output;
}
?>


============= CSS ==============
#slider-container {
width:326px;
height:338px;
padding-top:12px;
padding-left:24px;
background-color:#eaeaea;
}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider, #slider li{
width:300px;
height:300px;
overflow:hidden;
}
.slider-cell {
padding-top:0px;
padding-left:0px;
padding-right:0px;
padding-bottom:0px;
}


span#prevBtn{
padding-left:12px;
padding-right:4px;
font-size: 10px;
font-weight: normal;
color: #000000;
font-family: Helvetica, Arial, Georgia, Sans-serif;
text-decoration: none;
line-height:156%;
}
span#prevBtn a {
color: #000000;
}
span#prevBtn a:link {
color: #000000;
text-decoration:underline;
}
span#prevBtn a:hover{
color: #660000;
text-decoration:underline;
}
span#prevBtn a:visited{
}

span#nextBtn{
padding-left:0px;
padding-right:12px;
font-size: 10px;
font-weight: normal;
color: #000000;
font-family: Helvetica, Arial, Georgia, Sans-serif;
text-decoration: none;
line-height:156%;
}
span#nextBtn a {
color: #000000;
}
span#nextBtn a:link {
color: #000000;
text-decoration:underline;
}
span#nextBtn a:hover{
color: #660000;
text-decoration:underline;
}
span#nextBtn a:visited{
}


============= Page Code ==============
<div id="slider-container">
<div id="slider" class="slider-cell">
<ul><?php foreach ($newsSliderRecords as $record): ?>
<li>
<h3><a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a></h3>
<?php echo maxWords($record['content'], 90); ?>
<?php ?>
<p><a href="<?php echo $record['_link'] ?>">Read More</a></p>
</li><?php endforeach ?>
</ul>
</div></div>

Re: [zick] News ticker

By Toledoh - June 30, 2011

http://www.jquerynewsticker.com/

works a treat!
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] News ticker

By Mikey - June 30, 2011

http://www.jquerynewsticker.com/

works a treat!


NICE!!! I need a ticker just like this for a site I'll be building soon. Thanks Toledoh!!!!!

Zick

Re: [NigelGordijk] News ticker

By moh3 - July 4, 2011

hi here a diffrent JS script


News Ticker in JavaScript
http://www.mioplanet.com/rsc/newsticker_javascript.htm'

Features:

Easy to embed into an HTML document;
Compatible with Internet Explorer and FireFox;
Full JavaScript: no plugin, no Java, no ActiveX;
Supports full HTML, including images, links and any other tags;
Smooth scrolling;
Very small script - fast to download;
Easy to customize;