• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Effects for your website

Highlight Table Cells Script

Description: Give any table a "rollover" personality with this script! Using it, you can allow the cells of any given table to change color when the mouse rolls over them. This is a very powerful script that can add a little magic to any table, whatever the table is used for. The script can highlight either individual table cells (<TD>), or entire rows (<TR). You may also exclude select cells/rows from being highlighted.

Step 1: Inser this in the <head> of the layout.php:
Code:
<script type="text/javascript">


//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}

</script>

Now, to apply the "highlight" effect to a table, simply add the following code inside the <table> tag itself, like below:

Code:
<table onMouseover="changeto(event, 'lightgreen')" onMouseout="changeback(event, 'white')">
"
"
</table>
Where "lightgreen" represents the color the cells change to when the mouse is over them, and "white" the color when the mouse moves out. Feel free to change these values to another.

To exclude any cell(s) from the rollover effect, simply give that cell an id="ignore" declaration, inserted inside the <td> tag. For example:
Code:
<table onMouseover=.... onMouseout=...>
<td id="ignore">Main Menu</td>
<td>Eggs</td>
<td>Ham</td>
</table>

If you had set the script to highlight entire table rows (by changing a variable inside the script), you can also specify the script to ignore the entire row, by adding id="ignore" inside the desired <TR> tag:
Code:
<table onMouseover=.... onMouseout=...>
<tr id="ignore">
<td>Main Menu</td>
<td>Eggs</td>
<td>Ham</td>
</tr>
</table>
Demo: Savage - Latest News
 
Animated Document Title

Description: Animated text on the top left title, normally next to your browser logo. Reload the demo if you've missed it.

Step 1: Simply copy the below into the <head> section of your layout.php:

Code:
<script language="JavaScript1.2">

/*
Animated Document title- By Dynamicdrive.com
For full source, TOS, and 100s DTHML scripts
Visit http://dynamicdrive.com
*/

if (document.all||document.getElementById){
var thetitle=document.title
document.title=''
}

////Animation code below
////based on script from http://wsabstract.com/script/script2/statusanimate.shtml

var data="0123456789";

var done=1;
function statusIn(text){
	decrypt(text,2,1);
}

function statusOut(){
self.status='';
done=1;
}

//-------------------------\\
//decrypt(string, int, int)\\
//-------------------------\\
//
//text(string): the text to be decrypted on 
//the status bar.
//
//max(int): the number of times a random string
//is displayed before the next character is
//'decrypted'.
//
//delay(int): the number of milliseconds between
//each display of a random string
//
//Example:
//decrypt('Enter my site.',10,10);
//
//text = 'Enter my site.' :: 'Enter my site.' is 
//eventually decrypted
//
//max = 10 :: a different random string is dis-
//played 10 times before a new character is
//decrypted

function decrypt(text, max, delay){
	if (done){
		done = 0;
		decrypt_helper(text, max, delay,  0, max);
		}
	
}

function decrypt_helper(text, runs_left, delay, charvar, max){
	if (!done){
	runs_left = runs_left - 1;
	var status = text.substring(0,charvar);
	for(var current_char = charvar; current_char < text.length; current_char++){
		status += data.charAt(Math.round(Math.random()*data.length));
		}
	document.title = status;
	var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"
	var new_char = charvar + 1;
	var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"
	if(runs_left > 0){
		setTimeout(rerun, delay);
		}
	else{
		if (charvar < text.length){
			setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
			}
		else
			{
			done = 1;
			}
		}
	}
}

//if IE 4+ or NS 6+
if (document.all||document.getElementById)
statusIn(thetitle)
</script>

Obviously, your document should contain a valid title, defined using the <title> tag in the <head> section of the page, in order for this script to work.

demo: Savage - Latest News
 
Arrow head Title

Description: Have moving arrows point at your document's title, with this fun script!

Simply copy the below into the <head> section of your layout.php:

Code:
<SCRIPT>


//change title text to your own
    var titletext="Welcome to blabla"
    var thetext=""
    var started=false
    var step=0
    var times=1

    function welcometext()
    {
      times--
      if (times==0)
      {
        if (started==false)
        {
          started = true;
          document.title = titletext;
          setTimeout("anim()",1);
        }
        thetext = titletext;
      }
    }

    function showstatustext(txt)
    {
      thetext = txt;
      setTimeout("welcometext()",4000)
      times++
    }

    function anim()
    {
      step++
      if (step==7) {step=1}
      if (step==1) {document.title='>==='+thetext+'===<'}
      if (step==2) {document.title='=>=='+thetext+'==<='}
      if (step==3) {document.title='>=>='+thetext+'=<=<'}
      if (step==4) {document.title='=>=>'+thetext+'<=<='}
      if (step==5) {document.title='==>='+thetext+'=<=='}
      if (step==6) {document.title='===>'+thetext+'<==='}
      setTimeout("anim()",200);
    }

if (document.title)
window.onload=onload=welcometext
</SCRIPT>
 
Flashing Table Border Script

Description: Make a particular table's border flash with this visual script! Alternate between two colors, configurable speed.

Simply insert the below into the <body> section of your layout.php. You can change the color the table flashes to and from by changing all instances of the keyword "green" and "red" to your own. If your page has a black background, try "black" and "yellow".

Code:
<table border="0" width="280" id="myexample" style="border:5px solid green">
<tr>
<td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
</tr>
</table>
<script language="JavaScript1.2">
<!--

//configure interval btw flash (1000=1 second)
var speed=500

function flashit(){
var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
if (crosstable){
if (crosstable.style.borderColor.indexOf("green")!=-1)
crosstable.style.borderColor="red"
else
crosstable.style.borderColor="green"
}
}
setInterval("flashit()", speed)
//-->
</script>
 
Guys would you like me to add anything? I can take requests... Maybe games? Like basic snake, tetris or something with highscore?
 
there was a script with few skulls below your skulls, can you fix it?=
 
Rab, those scripts are 'most' useful :p, but can you make script like 'Spoiler' on forum's? I mean with hidden content.
 
Demo
Error:

Warning: parse_ini_file(C:/Documents and Settings/Owner/Desktop/backup de server (17-6)/config.lua) [function.parse-ini-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\config-and-functions.php on line 13
Database error. Unknown database type in C:/Documents and Settings/Owner/Desktop/backup de server (17-6)/config.lua . Must be equal to: "mysql" or "sqlite". Now is: ""
 
Some easy effects for your website. Enjoy, i'll upload more by the time...

Shaking image!



Step 1: Insert the below into the <head> section of your page (normally in layout.php):

Code:
<style>
.shakeimage{
position:relative
}
</style>
<script language="JavaScript1.2">

/*
Shake image script (onMouseover)- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

//configure shake degree (where larger # equals greater shake)
var rector=3

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector+"px"
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector+"px"
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector+"px"
}
else{
shake.style.left=parseInt(shake.style.left)-rector+"px"
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

</script>

Step 2: Add the below inside the <img> tag of all of the images you want the effect applied to:

Code:
class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this);top.focus()" onClick="top.focus()"

Example:
Code:
<img src="man.gif" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this);top.focus()" onClick="top.focus()">

Click me for Demo

it's just not yours

Shake Image script

you should give creadted..
 
Umm its not "creadted", i don't really know what's that. Since i've made it for the company, i don't see why i should give them my credit... I'm the spanish staff there :)
 
Back
Top