Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

iframe javascript to replace regular scroller for CMS

Junior Spellweaver
Joined
Apr 30, 2010
Messages
141
Reaction score
18
Hello Ragezoners,

I have been asking for help many times and I think its time to make a noob release xD. I have never released anything here but just now lol. Its pretty noobish but hey I like it on my cms. First of on what it is. It's a little replacement for those CMS that have those scrollers. I simply changed the scroller message to an iframe by using java script. Here we go,

First of add this to:
Header.php
Code:
<td>
	  <table width="100%" cellspacing="0"><tr><td class="cat" align="center" height="5"></td></tr></table>
	  <iframe title="Current News" src="includes/public/scroller.php" width="100%" height="30px" frameborder="0"></iframe>
	  </td>


Now add this to:
scroller.php
Code:
<html>
<head>
<style>
body {
font-family:times new roman, sans-serif;
font-size:85%;
}
</style>
 <script language="JavaScript">
      <!-- begin
      var max=0;
      function textlist()
      {
      max=textlist.arguments.length;
      for (i=0; i<max; i++)
      this[i]=textlist.arguments[i];
      }
      tl=new textlist
      ( 
       "Hello RaGEZONERers, Testing the iframe release xD I really dont know what to say lol.",    
       "Yup been confirmed IDK what to say hahah. But there ya go! HAVE FUN! -KenoRIK10"
      );
      var x=0; pos=0;
      var l=tl[0].length;
      function textticker()
      {
        tickfield.innerHTML=tl[x].substring(0,pos)+"_";
        if(pos++==l) { pos=0; setTimeout("textticker()",5000); x++;
        if(x==max) x=0; l=tl[x].length; } else
        setTimeout("textticker()",50);
      }
      // end -->
      </script>
</head>
<body onLoad="textticker()">
<span id="tickfield" style="font-weight:bolder"></span>
</body>
</html>

Change these to what ever you want ur iframe to say/type out. As what I have on the example code above.
Code:
tl=new textlist
      ( 
       "Your saying here number 1.", 
	   "Your saying here number 2.",
      );


Then make sure you change:
Code:
src="includes/public/scroller.php"
to the correct path of where you have you scroller.php


To change the text and text size (kinda common sense but ill tell ya anyways):
Code:
font-family:times new roman, sans-serif;
font-size:85%;
change those to your desired settings.

Here is the video if you wanna see what this is xD:



NOTE: You really do not have to change the name "scroller.php" to "watever.php" really does not matter but if you want
make sure you change to wherever scroller.php is used.

All Flames are welcome :thumbup::thumbup:. My 1st post its a eh release lol.
IF YOUR HAVING PROBLEMS PLEASE POST IT HERE
 
Revolution-Entrepreneur
Joined
Apr 2, 2009
Messages
451
Reaction score
19
Press the freaking thanks! Thanks for contributing and sharing!
 
Mother effin' clouds
Loyal Member
Joined
Apr 13, 2008
Messages
1,534
Reaction score
448
So... you have a JavaScript in scroller.php that basically modifies the innerHTML element of tickfield. Then, you used an iframe that linked to scroller.php... is it just me or do you not notice the how redundant your method is?
What is the point of that if you could just place the JavaScript directly in the header file and modify an element in the header directly?
 
for(alive>0){makeMoney()}
Loyal Member
Joined
Aug 1, 2006
Messages
357
Reaction score
68
So... you have a JavaScript in scroller.php that basically modifies the innerHTML element of tickfield. Then, you used an iframe that linked to scroller.php... is it just me or do you not notice the how redundant your method is?
What is the point of that if you could just place the JavaScript directly in the header file and modify an element in the header directly?

Thats what i was thinking lol.
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
297
Reaction score
126
Pretty good release, I would prefer this than scrolling too, good job.
 
Back
Top