Слагане на лента

GoPomiR

Registered
Здравейте искам да попитам как мога да сложа една лента ето тук
1038582o.jpg


eто css-a:
Код:
body
{
	background: transparent url("background.png"/*tpa=http://cs-pernik.net/style/background.png*/) repeat scroll 0 0;
	color: #000000;
	font-family:verdana, arial, tahoma;
	font-size:0.7em;
}

a, ul, li a:hover
{
color:#0dbc05;
text-decoration:none;
}

.uheader
{
background: #575757;
width: 880px;
height: 25px;
font-size: 11px;
border-left: 2px solid #777777;
border-right: 2px solid #777777;
border-top: 2px solid #777777;
}

.header
{
background: #FFFFFF url("header.gif"/*tpa=http://cs-pernik.net/style/header.gif*/);
width: 880px;
height: 154px;
font-size: 11px;
border: 2px solid #777777;
}

.horizontalNavText {ign.css (line 185)
-x-system-font:none;
color: #ffffff;
font-family:tahoma,sans-serif;
font-size:11px;
font-size-adjust: none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:bold;
line-height:normal;
padding:4px 0px;
text-align:center;
background: url("menu1.gif"/*tpa=http://cs-pernik.net/style/menu1.gif*/);
width: 880px;
height: 12px;
border-left: 2px solid #777777;
border-right: 2px solid #777777;
}

.main
{
background: #ffffff;
width: 880px;
height: 700px;
font-size: 11px;
border-left: 2px solid #777777;
border-right: 2px solid #777777;
border-bottom: 2px solid #777777;
}

.left_fh
{
width: 130px;
height: 20px;
float: left;
padding-top: 2px;
background: url("field_l.gif"/*tpa=http://cs-pernik.net/style/field_l.gif*/) no-repeat;
color: #ffffff;
}

.left_f
{
width: 130px;
height: 525px;
float: left;
margin-left: 10px;
background: #777777 url("field_l-1.gif"/*tpa=http://cs-pernik.net/style/style/field_l.gif*/);
}

.left_f2
{
width: 130px;
height: 130px;
float: left;
margin-top: 540px;
margin-left: -130px;
background: #777777 url("field_l-1.gif"/*tpa=http://cs-pernik.net/style/style/field_l.gif*/);
}

.right_f
{
width: 170px;
height: 575px;
float: right;
margin-right: 10px;
background: #777777 url("field_s.gif"/*tpa=http://cs-pernik.net/style/style/field_s.gif*/);
}

.right_fh
{
width: 170px;
height: 20px;
float: right;
padding-top: 1px;
background: url("field_s-1.gif"/*tpa=http://cs-pernik.net/style/field_s.gif*/) no-repeat;
color: #ffffff;
}

.right_f2
{
width: 170px;
float: right;
margin-right: -170px;
margin-top: 590px;
background: #777777;
}

.central_h
{
width: 540px;
height: 20px;
padding-top: 2px;
background: #777777 url("field_c.gif"/*tpa=http://cs-pernik.net/style/field_c.gif*/) no-repeat;
color: #FFFFFF;
font-size: 11px;
}

.central
{
width: 540px;
margin-left: 40px;
background: #777777;
color: #ffffff;
font-size: 11px;
}

ета html-a :
Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="style.css" tppabs="http://cs-pernik.net/style/style.css" />
<title>cs-pernik.net</title>
<link rel="SHORTCUT ICON" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body><center><center><div class="uheader">
<form method="post" action="http://cs-pernik.net/login.php"></table><tr>
<td><input type="username" name="username" style="background: #ffffff url(style/user.jpg) no-repeat; padding-left: 17px; height: 15px; margin-top: 4px; float: left; margin-left: 10px; border:1px solid #525252;" /></td>
<td><input type="password" name="password" style="background: #ffffff url(style/pass.jpg) no-repeat; padding-left: 17px; height: 15px; margin-top: 4px; float: left; margin-left: 8px; border:1px solid #525252;" /></td>
<td><input type="submit" name="submit" value="Вход" style="background: #ffffff no-repeat; margin-top: 3px; float: left; margin-left: 8px; border:1px solid #cccccc; height: 20px;" /></td>
<td><a href="register.php.htm" tppabs="http://cs-pernik.net/register.php"><input type="button" name="register" value="Регистрирай се" style="background: #ffffff no-repeat; margin-top: 3px; float: left; margin-left: 8px; border:1px solid #cccccc; height: 20px;" /></a></td>
</tr></table></form>
</div><div class="header"></div>
<div class="horizontalNavText">
<a href="index.php.htm" tppabs="http://cs-pernik.net/index.php">Начало</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/ban_list.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/ban_list.php'" tppabs="http://cs-pernik.net/ban_list.php">Банлист</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/sms_admin.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/sms_admin.php'" tppabs="http://cs-pernik.net/sms_admin.php">SMS Админ</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/reklama_server  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/reklama_server'" tppabs="http://cs-pernik.net/reklama_server">Сървър Реклама</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/turniri.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/turniri.php'" tppabs="http://cs-pernik.net/turniri.php">Турнири</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/reklama.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/reklama.php'" tppabs="http://cs-pernik.net/reklama.php">Реклама</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/baners.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/baners.php'" tppabs="http://cs-pernik.net/baners.php">Банери</a>
|
<a href="index.htm" tppabs="http://cs-pernik.net/forum/">Форум</a>
|
<a href="javascript:if(confirm('http://cs-pernik.net/contacts.php  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://cs-pernik.net/contacts.php'" tppabs="http://cs-pernik.net/contacts.php">Контакти</a>
</div></center>

<center><div class="main"><br /><center><div class="left_f"><div class="left_fh"><b>Реклама</b></div><br /><br />
<script src="side_baner.js" tppabs="http://cs-pernik.net/include/side_baner.js" type="text/javascript"></script><br />
<script src="side_baner2.js" tppabs="http://cs-pernik.net/include/side_baner2.js" type="text/javascript"></script><br />
</div></center>
<center><div class="left_f2"><div class="left_fh"><b>Реклама</b></div><br /><br />
<script src="daemon.js" tppabs="http://cs-pernik.net/include/daemon.js" type="text/javascript"></script><br />
</div></center>
<center><div class="right_f"><div class="right_fh"><b>Сървъри</b></div><br /><br /><html>
<center/>
 
Значи аз преди го правех това което искаш по тоя начин, и мен ме устройваше, правиш си нов файл под името примерно:
novosti.php или novosti.html и в него слагаш следното нещо:
Код:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>Autumn effect</title>
<style type="text/css">

/*Example CSS for the two demo scrollers*/

#pscroller1{
width: 200px;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color: lightyellow;
}

#pscroller2{
width: 690px;
height: 40px;
border: 1px solid black;
padding: 3px;

}

#pscroller2 a{
text-decoration: none;
}

.someclass{ //class to apply to your scroller(s) if desired
}

</style>

<script type="text/javascript">

/*Example message arrays for the two demo scrollers*/

var pausecontent2=new Array()
pausecontent2[0]='<a href="#">Музикална новина: на пазара е новият 13-ти албум на BIG SHA известен като Мишо шамара.</a>'
pausecontent2[1]='<a href="#">Училищна новина: училищното заседание взе решение, което гласи: нов офциален уеб сайт</a>'
pausecontent2[2]='<a href="#">От общината: взето е решение да не се пуши на публични заведения (ресторанти, кафета и др.)</a>'

</script>

<script type="text/javascript">

/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

</script>

</head>

<body bgcolor="#FFFFFF">
<script type="text/javascript">

//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)


new pausescroller(pausecontent2, "pscroller2", "someclass", 4200)

</script>
</body>
</html>
в който код променяш само това:
var pausecontent2=new Array()
pausecontent2[0]='<a href="#">Музикална новина: на пазара е новият 13-ти албум на BIG SHA известен като Мишо шамара.</a>'
pausecontent2[1]='<a href="#">Училищна новина: училищното заседание взе решение, което гласи: нов офциален уеб сайт</a>'
pausecontent2[2]='<a href="#">От общината: взето е решение да не се пуши на публични заведения (ресторанти, кафета и др.)</a>'

на твои изречения
после в сайта ти пишеш следното:
ако е novosti.html:

<iframe src="novosti.html" name="frame1" scrolling="no" frameborder="0" height="40px" width="690px"></iframe>
ако е novosti.php:
<?php include("novosti.php"); ?>
ами това е пич, демо не мога да ти дам но работи със сигурност :) и е подобно на това за което питаш[/code]
 

Back
Горе