Script: Bežiaci Text

Priestor na prezentáciu Vašich modifikácií a vylepšení

Moderátor: Moderátori

Script: Bežiaci Text

Poslaťod Thomas » Pon Feb 05, 2007 1:10 am

Bežiaci text ktorý sa zastaví pri prejdení myšou:

Otvor overal_header.tpl a celkom naspodok súboru vlož tento kód:

Kód: Vybrať všetko
<script language="JavaScript1.2">

//Specify the marquee's width (in pixels)
var marqueewidth="300px"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#00000"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font face="Arial">SEM NAPIS TEXT KTORY SA TI BUDE ZOBRAZOVAT NA STRANKE </a> </font></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>


Ulož a nahraj na FTP

Script si môžte upraviť podla potreby...
Obrázok užívateľa
Thomas
Expert
Expert
 
Príspevky: 643
Registrovaný: Uto Jan 30, 2007 8:49 pm
Bydlisko: Slovakia

Poslaťod carlos202 » Pia Feb 09, 2007 3:20 pm

ahoj, jak to udelam pro kodovani UTF-8 ???
carlos202
Pokročilý
Pokročilý
 
Príspevky: 104
Registrovaný: Štv Feb 08, 2007 8:16 pm

Poslaťod exitPD » Pon Feb 26, 2007 5:10 pm

tu je nieco jednoduchsie, vlozto do index_body.tpl

<marquee scrollamount="5" onmouseover="this.scrollAmount=2" onmouseout="this.scrollAmount=5" style="font-family: Verdana; font-size: 8pt;"> text co chcete tam mat </b></marquee>
Obrázok
Obrázok užívateľa
exitPD
Začiatočník
Začiatočník
 
Príspevky: 49
Registrovaný: Pon Feb 26, 2007 4:23 pm

Poslaťod Shawan_666 » Pon Apr 16, 2007 1:44 pm

alebo sa do da spravit jednoducho v tabulke ako news mod
Kód: Vybrať všetko
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
   <tr>
     <td class="catHead" height="28" align="center"><a name="news"></a><span class="cattitle">4riders News</span></td>
   </tr>
   <tr>
     <td align="center"><marquee>Vas text</marquee>
   </td></tr>
</table>
Slovenská podpora modifikácii do systému phpBB >|http://phpbbhacks.sk/|<
Online podpora phpBB. Píšte!!
Shawan_666
Expert
Expert
 
Príspevky: 1256
Registrovaný: Pia Apr 13, 2007 10:38 pm
Bydlisko: Nitra

Poslaťod gapson » Str Máj 23, 2007 10:58 am

To Thomas:Ako dosiahnem aby mi ten text scroloval v strede,nie na lavej strane? :D
Obrázok užívateľa
gapson
Profesionál
Profesionál
 
Príspevky: 258
Registrovaný: Pon Máj 07, 2007 2:51 pm

Poslaťod Thomas » Str Máj 23, 2007 12:00 pm

gapson píše:To Thomas:Ako dosiahnem aby mi ten text scroloval v strede,nie na lavej strane? :D


<center>sem vlož ten script</center>
Obrázok užívateľa
Thomas
Expert
Expert
 
Príspevky: 643
Registrovaný: Uto Jan 30, 2007 8:49 pm
Bydlisko: Slovakia

Poslaťod Shawan_666 » Str Máj 23, 2007 4:45 pm

:wink: nie cely kod!!!!
ale iba toto

Kód: Vybrať všetko
<script language="JavaScript1.2">

//Specify the marquee's width (in pixels)
var marqueewidth="300px"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#00000"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font face="Arial">SEM NAPIS TEXT KTORY SA TI BUDE ZOBRAZOVAT NA STRANKE </a> </font></nobr>'
Slovenská podpora modifikácii do systému phpBB >|http://phpbbhacks.sk/|<
Online podpora phpBB. Píšte!!
Shawan_666
Expert
Expert
 
Príspevky: 1256
Registrovaný: Pia Apr 13, 2007 10:38 pm
Bydlisko: Nitra

Poslaťod vlado » Str Jún 06, 2007 5:13 pm

dal som to podľa návodu na samom vrchu témy funguje to ale ked som chcel aby to šlo v strede a dal som to podľa navodu čo tu je:<center><script language="JavaScript1.2"> pokračovanie skriptu a </font></nobr>'</center> tak mi začalo ukazovať false ako bežiaci text v strede tak ako som to chcel žeby som niekde spravil chybu???Ak áno poradí niekto?
vlado ak vie pomôže:-)
ak nevie - vie iný :-(
Obrázok užívateľa
vlado
Pokročilý
Pokročilý
 
Príspevky: 146
Registrovaný: Pia Jún 01, 2007 11:38 am

Poslaťod gapson » Str Jún 06, 2007 7:12 pm

Ja som to dal celé do center a funguje mi to.
Obrázok užívateľa
gapson
Profesionál
Profesionál
 
Príspevky: 258
Registrovaný: Pon Máj 07, 2007 2:51 pm

Poslaťod vlado » Str Jún 06, 2007 7:22 pm

gapson píše:Ja som to dal celé do center a funguje mi to.


tak som to skúsil dať tak ako píšeš a funguje to diky za radu :lol: :lol: :lol:
vlado ak vie pomôže:-)
ak nevie - vie iný :-(
Obrázok užívateľa
vlado
Pokročilý
Pokročilý
 
Príspevky: 146
Registrovaný: Pia Jún 01, 2007 11:38 am

Poslaťod vlado » Sob Jún 09, 2007 11:31 am

mal by som ešte 1 otázku ohladne tohoto funguje mi to tak ako má v strede... ale chcel by som skúsiť aj ako by to vyzeralo keby to šlo cez celú stranu..Viem že sa to dá spraviť ale neviem ako.Poradí niekto?
vlado ak vie pomôže:-)
ak nevie - vie iný :-(
Obrázok užívateľa
vlado
Pokročilý
Pokročilý
 
Príspevky: 146
Registrovaný: Pia Jún 01, 2007 11:38 am

Poslaťod matt21 » Sob Jún 09, 2007 12:04 pm

vl@do píše:mal by som ešte 1 otázku ohladne tohoto funguje mi to tak ako má v strede... ale chcel by som skúsiť aj ako by to vyzeralo keby to šlo cez celú stranu..Viem že sa to dá spraviť ale neviem ako.Poradí niekto?
napis mi tu zdrojak toho scriptu
Z phpbb podporou končím, lebo ľudia si to nevedia vážíť... :!: :!: :!:
Obrázok užívateľa
matt21
Expert
Expert
 
Príspevky: 1046
Registrovaný: Pia Mar 02, 2007 11:11 am

Poslaťod Shawan_666 » Sob Jún 09, 2007 12:26 pm

takto by si to mal mat cez cele
Kód: Vybrať všetko
<script language="JavaScript1.2">

//Specify the marquee's width (in pixels)
var marqueewidth="100%"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#00000"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
Slovenská podpora modifikácii do systému phpBB >|http://phpbbhacks.sk/|<
Online podpora phpBB. Píšte!!
Shawan_666
Expert
Expert
 
Príspevky: 1256
Registrovaný: Pia Apr 13, 2007 10:38 pm
Bydlisko: Nitra

Poslaťod vlado » Sob Jún 09, 2007 1:54 pm

tento funguje v strede
<center><script language="JavaScript1.2">

//Specify the marquee's width (in pixels)
var marqueewidth="300px"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#00000"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font face="Arial">Vítajte na diskusnom fóre </a> </font></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script></center>

Shawan_666
ked som zmenil 300px na "100%" tak mi to nešlo ale ked som tam dal namiesto 100% 796px tak mi to začalo isť po celej ploche tak ako som chcel inak diky za dobrú inšpiráciu :lol:
vlado ak vie pomôže:-)
ak nevie - vie iný :-(
Obrázok užívateľa
vlado
Pokročilý
Pokročilý
 
Príspevky: 146
Registrovaný: Pia Jún 01, 2007 11:38 am

Poslaťod Shawan_666 » Sob Jún 09, 2007 2:46 pm

je mozne ze ten script nebere percentualne udaje :P
Slovenská podpora modifikácii do systému phpBB >|http://phpbbhacks.sk/|<
Online podpora phpBB. Píšte!!
Shawan_666
Expert
Expert
 
Príspevky: 1256
Registrovaný: Pia Apr 13, 2007 10:38 pm
Bydlisko: Nitra

Ďalší

Späť na Vaše modifikácie

Kto je on-line

Užívatelia prezerajúci fórum: Žiadny registrovaný užívateľ nie je prítomný a 0 hostia


vladstudio
TOPlist TOPlist
cron

Valid XHTML 1.0 Strict [Valid Atom 1.0]


* Štúrovo ubytovanie *