ElkArte Community

Title: News ticker header not ticking ?
Post by: D.M. on July 10, 2024, 05:12:38 am
Hello there community !

I have noticed that the news ticker on my forums is not ticking, it only changes sometimes when the page is refreshed ? Is this a special function or addon ?

Thanks in advance!
Title: Re: News ticker header not ticking ?
Post by: Spuds on July 10, 2024, 10:47:50 am
This appears to be a regression :bug:

To fix this you will need to edit the index.template.php file for your theme(s).  In that file you will find a function function template_news_fader  then find the following

Code: (find) [Select]
	addInlineJavascript('
document.addEventListener("DOMContentLoaded", () => {
if (typeof Elk_NewsFader !== \'undefined\') {
$(\'#elkFadeScroller\').Elk_NewsFader(' . (empty($settings['newsfader_time']) ? '' : '{\'iFadeDelay\': ' . $settings['newsfader_time'] . '}') . ');
}
});', true);
and replace it with this.
Code: (replace) [Select]
	addInlineJavascript('
document.addEventListener("DOMContentLoaded", () => {
if (typeof $.fn.Elk_NewsFader !== \'undefined\') {
$(\'#elkFadeScroller\').Elk_NewsFader(' . (empty($settings['newsfader_time']) ? '' : '{\'iFadeDelay\': ' . $settings['newsfader_time'] . '}') . ');
}
});', true);

All we are doing is adding $.fn. in front of Elk_NewsFader .... the error is that Elk_NewsFader is a jquery function so we need to look for it in the jquery space.