This may have already been stated not sure. The news section is awesome, but there are alot of news areas. I mean, the fader to me is the best fading in/out to next news item. However, the news block is awesome if you dont want to use fader. I just noticed have played with TP a little that there is also a news area under the top bar. Isnt that alot of NEWS area to keep popping up. For instance, I like the fader, but if fader running the news is also shown under top bar. That looks a little much. Then I decided to use news block, still looked a little much. Would it be possible to use the space under the top bar as just a information space instead of putting news there or make that space the news fader? Just a thought. ;D
In the "current theme" area of the admin panel you can disable the fader or the default news box. the news block in tinyportal can be disabled thru TPAdmin.
You can also create a "center block" in TPAdmin that can hold javascript+html or php, so you can put anything up there, really.
Quoteor make that space the news fader?
you mean to move the news fader under that top bar? i'm not sure if i understand this lol :)
Moving newsfader is more work..but as Moocat describes, you can pretty much close off all the areas - its more the possibility to use all those.
Some like the fader(which is only present one place), some like the random news , and that can aslo be reflected in a "newsblock" , if you close off the userinfo top for example. Lots of options. :)
Not sure if this is the right place to put this...but here goes...I would like to create a news fader for the frontpage. Currently, it will show up on the forum index page and thats it. I assume that I would have to create some sort of frontpage block for it, but I don't know what type of block to create or what exactly to put into it. I have found some code in the BoardIndex.template.php concerning the fader, but I could use some help in determining wha code is actually needed. I'm pretty new at this and this is somewat of a stretch for me.
Any help or guidance would be greatly appreciated.
Newsfader on frontpage is a great idea.
The code could be pulled from BoardIndex.template.php of course..the javascript involved are contained there - or fetched from the global js file. Its the actual news that might need to fetched. Normally its only fetched on BoardIndex.
The "news" blocktype, that just show the current random news, could be expanded to allow this. Would that be something?
I'm Bumping this thread because I would like to move the News fader to the top since I took out my userinfo block and kept the News block in place. I'd much rather a fader for the news block there rather than enabling the Fader to show above the Forums. It would repeat what's in the News block if you had that enabled as well. Kind of redundant.
This will be added, but so far I haven't got to look at it yet I am afraid.
Thanks!
I'm Looking forward to it!
I'll second that!
Sounds nice! I tried to do it but got that many errors I gave up...Stupid tables :D
I don't know why but this seems to work nicely on the front page in a phpbox (no title or frame).
*script taken from the board index of Alienation
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div style="height: 50px; background: url('.$settings['images_url'].'/machine.jpg) repeat-x;">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="text-align: center; width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 155, "g": 185, "b": 255}, smfFadeTo = {"r": 0, "g": 0, "b": 0};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script><script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script></div>';
}