Seite 1 von 1

Hilfe: FI Newsbar

Verfasst: 01.04.2003 21:14
von Tobi
Moin, Ich hab mir die Fi_Newsbar von Forumimages gedownloadet. Nun hab ich alles gemacht und es geht auch. bis auf eins: Ich weiß nicht nicht wo ich die News schreiben muss, die angezeigt werden sollen.

So sieht das ganze aus:

FI_Newsbar Java Script:

Code: Alles auswählen

======================================== 
NewsBar v1.2 (modified) 
License : Freeware (Enjoy it!) 
(c)2002 VASIL DINKOV- PLOVDIV, BULGARIA 
======================================== 
NewsBar v1.2 was modified for forumimages.com by SamG. 
Get the unmodified NewsBar script at: 
http://smartmenus.tripod.com/other.html 
and don't wait to get the great SmartMenus script at: 
http://smartmenus.tripod.com 

LEAVE THESE NOTES PLEASE - delete the comments if you want. 
*/ 

/* Part 1: content description - edit to suit */ 
var defaultText = "Hi and Welcome..."; 
var newsBarContent = [ 
["http://www.forumimages.com/", "Forum Images NewsBar", "_blank"], 
["http://smartmenus.tripod.com/other.html", "Based on NewsBar v1.2 by Vasil Dinkov", "_self"], 
["", "Have a nice day!", ""] 
]; // newsBarContent[] blocks must be in the format ["href", "text", "target"] and blocks must be separated by commas 

/* Part 2: "look and feel" variables - edit to suit */ 
var newsBarTimeOut = 3; // the time a headline is displayed, in seconds 
var pauseNewsBarOnMouseOver = true; // true pauses NewsBar progress when mouse pointer is over links 
var newsBarSpeed = 20; // 1000 = 1 second 
var leadingSign = "..."; 
var defaultTextTimeOut = 2; // the time the default text is displayed, in seconds 

/* Part 3: the NewsBar engine - tinker in here at your own risk! */ 
var contentIndex = 0; 
var cursorPosition = 0; 
var textLength = newsBarContent[0][1].length; 
var newsBarCycle = null; 
newsBarTimeOut *= 1000; 
defaultTextTimeOut *= 1000; 

function nbNew() { 
if ( pauseNewsBarOnMouseOver ) var eventHandlers = " onmouseout=\"newsBarCycle = setTimeout('nbNew()', " + newsBarTimeOut + ");\" onmouseover=\"clearTimeout(newsBarCycle);\">"; 
else var eventHandlers = ">"; 
if ( (newsBarContent[contentIndex][0] != "") && (cursorPosition == textLength) ) var text = "<a href=\"" + newsBarContent[contentIndex][0] + "\" target=\"" + newsBarContent[contentIndex][2] + "\"" + eventHandlers + newsBarContent[contentIndex][1] + leadingSign + "</a>"; 
else var text = newsBarContent[contentIndex][1].substring(0, cursorPosition) + leadingSign; 

document.getElementById('newsbar').innerHTML = text; 

if ( cursorPosition++ == textLength ) { 
cursorPosition = 0; 
newsBarCycle = setTimeout('nbNew()', newsBarTimeOut); 
contentIndex++; 
if ( contentIndex == newsBarContent.length ) contentIndex = 0; 
textLength = newsBarContent[contentIndex][1].length;[quote]
Bitte helft mir!

Verfasst: 02.04.2003 08:29
von Lassie
in Part 1.... (ist bei mir auch schon was her, habe aber einfach rumprobiert, du siehst nach der Installation ja was erscheint....also wenn da Hi and Welcome... steht schreibste halt an die stelle was du da haben willst)

Code: Alles auswählen

Hi and Welcome...
müsste der erste text sein der erscheint....

das ist hier halt der inhalt (dunkelrot):

var newsBarContent = [
["http://www.forumimages.com/", "Forum Images NewsBar", "_blank"],
["http://smartmenus.tripod.com/other.html", "Based on NewsBar v1.2 by Vasil Dinkov", "_self"],
["", "Have a nice day!", ""]

]; // newsBarContent[] blocks must be in the format ["href", "text", "target"] and blocks must be separated by commas


und so gehts auch weiter, kannst ja auch links angeben..... (siehe letzte zeile hier oben)
die blöcke müssen per kommata getrennt werden....


hoffe ich habe es so richtig erklärt....