Simple Machine Codes
April 18, 2024, 11:55:22 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  
  Show Posts
Pages: [1]
1  Forum Coding / SMF For Free Codes / Re: Password Protect Topic on: December 31, 2007, 06:44:32 pm
please dont modify agent moose's codes he does not like it if ur gonna make a code u should get a base or some help or create a code from scratch!  Smiley Afro nice tho Wink

I asked if I could modify it, Moose said it was okay.
2  Forum Coding / SMF For Free Codes / Re: Always Online V2 on: December 01, 2007, 03:58:42 pm
What exactly does this do?
3  Forum Coding / SMF For Free Codes / Re: Password Protect Topic on: November 27, 2007, 06:46:23 pm
I didn't know you coded Stewie :O
I do some coding.

Works on both IE and FF???
It should work on both.
4  Forum Coding / SMF For Free Codes / Re: Password Protect Topic on: November 27, 2007, 05:00:15 pm
Thanks. But you deserve most of the credit.
5  Forum Coding / SMF For Free Codes / Password Protect Topic on: November 27, 2007, 04:49:45 pm
Modified version of Moose's Password Protect. Instead it protects topics.

Preview Password for Preview is 'Test'
Code:
<script>
var TopicPro = "TOPIC"
var PassPro = "PASSWORD"

var loc = window.location.href.split("/index.php")[0];
//Created by Agent Moose (smcodes.smfforfree3.com)
//Modified by Stewie343
function ChangeThing(){
$("a[name='b"+TopicPro+"']").each(function(){
$(this).parent().parent().next().html("")
});};
function PassProtected(){
if(location.href.match("/topic,"+TopicPro)){
$("#bodyarea").hide()
$("#bodyarea").after("<br><br><div class='tborder'><div class='catbg' style='padding: 6px; vertical-align: middle; text-align: center; '>Topic Protected</div><div><table border='0' width='100%' cellspacing='1' cellpadding='4' class='bordercolor'><tr><td class='windowbg2' width='100%'><center><br><i>Enter Password:<br>(Password is Case Sensitive)</i><br><input type='text' id='passprotected'/><br><br><input type='button' onclick='PressButton()' value='Enter'/></center></td></tr></table></div></div><br>")
};};
function PressButton(){
password = document.getElementById("passprotected");
if(password.value == PassPro){
window.location.href = loc+"/index.php/Protected/topic,"+TopicPro+".0."+PassPro+".html"
}else if(password.value == ""){
alert("Enter a Password");
}else{
alert("Password is incorrect");
};};
if(location.href.match("/Protected/topic,"+TopicPro+".0."+PassPro+".html")){
}else{
PassProtected();
ChangeThing();
};
</script>

TOPIC=Place the topic number that you want to protect
PASSWORD=Enter the password. Password case sensitive.
6  Forum Coding / SMF For Free Codes / Dail Pad Link on: November 10, 2007, 11:30:25 pm
This is pretty much useless, but fun. You type in a number and it takes you to a page.
Preview: Preview

Put it in you headers
Code:
<!-- --><form name="board">
//By Stewie343{Copyright Stewie343}
<center>
<table BORDER CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="135" BGCOLOR="#FF0000" >
<tr ALIGN=CENTER>
<td><input type=button value="    1    "onClick="but1(); window.focus()"></td>

<td><input type=button value="    2    "onClick="but2(); window.focus()"></td>

<td><input type=button value="    3    "onClick="but3(); window.focus()"></td>
</tr>

<tr ALIGN=CENTER>
<td><input type=button value="    4    "onClick="but4(); window.focus()"></td>

<td><input type=button value="    5    "onClick="but5(); window.focus()"></td>

<td><input type=button value="    6    "onClick="but6(); window.focus()"></td>
</tr>

<tr ALIGN=CENTER>
<td><input type=button value="    7    "onClick="but7(); window.focus()"></td>

<td><input type=button value="    8    "onClick="but8(); window.focus()"></td>

<td><input type=button value="    9    "onClick="but9(); window.focus()"></td>
</tr>

<tr ALIGN=CENTER>
<td COLSPAN="3">
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH="100%" >
<tr>
<td ALIGN=CENTER WIDTH="50%"><input type=button value="    0    "onClick="but0(); window.focus()"></td>

<td ALIGN=CENTER WIDTH="50%"><input type=button value="Reset"onClick="clearit(); window.focus()"></td>
</tr>
</table></center>
</td>
</tr>

<tr>
<td ALIGN=CENTER COLSPAN="3"><input type=text name=pn size="10"></td>
</tr>
</table></center>

<center></form>
<p><!-- --></center>

This in your footers
Code:
<script LANGUAGE="JavaScript">

var phone_num='';
var timerID = null;
var timerRunning = false;
function but1()
{
 
phone_num = phone_num + '1';
 chknum();
}
function but2()
{
 phone_num = phone_num + '2';
 chknum();
}
function but3()
{
 phone_num = phone_num + '3';
 chknum();
}
function but4()
{
 phone_num = phone_num + '4';
 chknum();
}
function but5()
{
 phone_num = phone_num + '5';
 chknum();
}
function but6()
{
 phone_num = phone_num + '6';
 chknum();
}
function but7()
{
 phone_num = phone_num + '7';
 chknum();
}
function but8()
{
 phone_num = phone_num + '8';
 chknum();
}
function but9()
{
 phone_num = phone_num + '9';
 chknum();
}
function but0()
{
 phone_num = phone_num + '0';
 chknum();
}
function chknum()
{

//ADD YOUR NUMBERS AND URLS HERE

if (phone_num=="NUMBER")
 document.location="URL HERE";
if (phone_num=="NUMBER")
 document.location="URL HERE";
if (phone_num=="NUMBER")
document.location="URL HERE";

document.board.pn.value=phone_num;
}
function clearit()
{
 phone_num = "";
 document.board.pn.value=phone_num;
}

</script>

You can add more links. Just add this under the other ones.
Code:
if (phone_num=="NUMBER")
 document.location="URL HERE";
7  Forum Coding / SMF For Free Codes / Re: Cursor Clock on: October 31, 2007, 10:10:58 am
Yeah, I made this code. But I didn't make the code that was on the link.
8  Forum Coding / SMF For Free Codes / Re: Spoiler Tags on: October 30, 2007, 10:15:53 pm
Yea, you're going to have to add it to each post. It was the only way I knew how to make it work.
9  Forum Coding / SMF For Free Codes / Spoiler Tags on: October 30, 2007, 07:41:51 pm
 I finally made a semi-working spoiler tag. I tried the code on this site, but it doesn't work. I'm guessing you need the HTML tags enabled. But it works on the preview.
It works on Firefox and IE.
Preview:http://testfourm.smfforfree3.com/index.php/topic,1.msg2.html#msg2
Put the code in your post.
Code:
[html]<span style="font-size:smaller; color:#666"> spoiler - highlight to read:</span><span style="background:#ddd; color:#ddd;border:1px dotted #666">YOUR SPOILER HERE </span></span>[/html]
If you think you can fix it go ahead and fix it.
10  Forum Coding / SMF For Free Codes / Cursor Clock on: October 29, 2007, 11:39:17 pm
Here is a clock I made. It follows your cursor. It follows the time on your computer. It displays the month, date and time. It currently only works on IE.
Preview: http://testfourm.smfforfree3.com/index.php
Here is the code:

It can go in your header or footers.
Code:
<SCRIPT language=JavaScript>
dCol='#FF0000';//date colour.
fCol='#0000FF';//face colour.
sCol='#FFFF00';//seconds colour.
mCol='#FF0000';//minutes colour.
hCol='#00FF00';//hours colour.
ClockHeight=50;
ClockWidth=50;
ClockFromMouseY=0;
ClockFromMouseX=100;

//Created by Stewie343
//Alter nothing below! Alignments will be lost!

days=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+days[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
clockH='...';
clockH=clockH.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
clkspeed=0.6;
ns=(document.layers);
ie=!ns;
Face=Face.split(' ');
faceLength=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/faceLength;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
if (ie && !(document.all)){
  step=0.09;
} else {
  step=0.06;
}

currStep=0;
clocky=new Array();clockx=new Array();clockY=new Array();clockX=new Array();
for (clki=0; clki < faceLength; clki++){clocky[clki]=0;clockx[clki]=0;clockY[clki]=0;clockX[clki]=0}
clockDy=new Array();clockDx=new Array();clockDY=new Array();clockDX=new Array();
for (clki=0; clki < D.length; clki++){clockDy[clki]=0;clockDx[clki]=0;clockDY[clki]=0;clockDX[clki]=0}
if (ns){
for (clki=0; clki < D.length; clki++)
document.write('<layer name="nsDate'+clki+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[clki]+'</font></center></layer>');
for (clki=0; clki < faceLength; clki++)
document.write('<layer name="nsFace'+clki+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[clki]+'</font></center></layer>');
for (clki=0; clki < S.length; clki++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[clki]+'</b></center></font></layer>');
for (clki=0; clki < M.length; clki++)
document.write('<layer name=nsMinutes'+clki+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[clki]+'</b></center></font></layer>');
for (clki=0; clki < clockH.length; clki++)
document.write('<layer name=nsHours'+clki+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+clockH[clki]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (clki=0; clki < D.length; clki++)
document.write('<div id="ieDate'+clki+'" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[clki]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (clki=0; clki < faceLength; clki++)
document.write('<div id="ieFace' + clki + '" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[clki]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (clki=0; clki < clockH.length; clki++)
document.write('<div id="ieHours' + clki + '" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+clockH[clki]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (clki=0; clki < M.length; clki++)
document.write('<div id="ieMinutes'+clki+'" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[clki]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (clki=0; clki < S.length; clki++)
document.write('<div id="ieSeconds'+clki+'" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[clki]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (!document.all)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (!document.all)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
document.getElementById("Od").style.top=window.document.body.scrollTop;
document.getElementById("Of").style.top=window.document.body.scrollTop;
document.getElementById("Oh").style.top=window.document.body.scrollTop;
document.getElementById("Om").style.top=window.document.body.scrollTop;
document.getElementById("Os").style.top=window.document.body.scrollTop;
}
for (clki=0; clki < faceLength; clki++){
 var F=(ns)?document.layers['nsFace'+i]:document.getElementById("ieFace" + clki ).style;
 F.top=clocky[clki] + ClockHeight*Math.sin(-1.0471 + clki*Split*Math.PI/180)+scrll;
 F.left=clockx[clki] + ClockWidth*Math.cos(-1.0471 + clki*Split*Math.PI/180);
 }
for (clki=0; clki < clockH.length; clki++){
 var HL=(ns)?document.layers['nsHours'+clki]:document.getElementById("ieHours"+clki).style;
 HL.top=clocky[clki]+HandY+(clki*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=clockx[clki]+HandX+(clki*HandWidth)*Math.cos(hrs);
 }
for (clki=0; clki < M.length; clki++){
 var ML=(ns)?document.layers['nsMinutes'+clki]:document.getElementById("ieMinutes"+clki).style;
 ML.top=clocky[clki]+HandY+(clki*HandHeight)*Math.sin(min)+scrll;
 ML.left=clockx[clki]+HandX+(clki*HandWidth)*Math.cos(min);
 }
for (clki=0; clki < S.length; clki++){
 var SL=(ns)?document.layers['nsSeconds'+clki]:document.getElementById("ieSeconds" + clki).style;
 SL.top=clocky[clki]+HandY+(clki*HandHeight)*Math.sin(sec)+scrll;
 SL.left=clockx[clki]+HandX+(clki*HandWidth)*Math.cos(sec);
 }
for (clki=0; clki < D.length; clki++){
 var DL=(ns)?document.layers['nsDate'+clki]:document.getElementById("ieDate" + clki).style;
 DL.top=clockDy[clki] + ClockHeight*1.5*Math.sin(currStep+clki*Dsplit*Math.PI/180)+scrll;
 DL.left=clockDx[clki] + ClockWidth*1.5*Math.cos(currStep+clki*Dsplit*Math.PI/180);
 }
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
clockDy[0]=Math.round(clockDY[0]+=((ymouse)-clockDY[0])*clkspeed);
clockDx[0]=Math.round(clockDX[0]+=((xmouse)-clockDX[0])*clkspeed);
for (clki=1; clki < D.length; clki++){
clockDy[clki]=Math.round(clockDY[clki]+=(clockDy[clki-1]-clockDY[clki])*clkspeed);
clockDx[clki]=Math.round(clockDX[clki]+=(clockDx[clki-1]-clockDX[clki])*clkspeed);
}
clocky[0]=Math.round(clockY[0]+=((ymouse)-clockY[0])*clkspeed);
clockx[0]=Math.round(clockX[0]+=((xmouse)-clockX[0])*clkspeed);
for (clki=1; clki < faceLength; clki++){
clocky[clki]=Math.round(clockY[clki]+=(clocky[clki-1]-clockY[clki])*clkspeed);
clockx[clki]=Math.round(clockX[clki]+=(clockx[clki-1]-clockX[clki])*clkspeed);
}
ClockAndAssign();
setTimeout('Delay()',30);
}

if (ns||ie) {
Delay();
}
</SCRIPT>
You can change the colors of the clock, by changing the color codes at the beginning  of the code.
I made it follow your cursor up to a certain point, so it would not get in your way when you're trying to read something.
Pages: [1]
Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy