Advertise Here

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Qub1

Pages: 1 2 3 [4] 5 6 7 ... 10
46
General Support / Ok, how do i do the Following?
« on: April 24, 2008, 09:38:04 am »
Ok, with SMFFORFREE updating and all, i need answers to a few questions:

- How do i sing up for SMFforfree 4 or 3? Everytime i type www.smfforfree4.com i get the singup for smfforfree 2.
- Where did the WIKI gone to? I need it for my new forum!
- And, will the Challange and Competitions for the Arcade come back?

Thanks for answering!

47
np  ;D  hope to be of assistance

48
yeah? Oh, yeah i tryed it and it didn't work! ? Strange...

49
Thanks, but be carefull, this code is superrrr long!

50
Forum Url: http://qub1test.smfforfree4.com
Here again, i used some of my older codes, pasted them together and voila! Here's The Wonder Age Calculator (Strange name huh :uglystupid2: )!
You can use it to let Users do the following stuff:

  • Calculate their Age
  • Calculate how long they live
  • Calculate when their next birthday will come (On the Millisecond! ;) )
  • And finally... here's a Previeuw

So paste this all in your Footers:
Code: [Select]
<body onload="start()">
<script language="JavaScript">


<!-- Begin
function start() {
document.form1.day.value = "";
document.form1.month.value = "";
document.form1.year.value = "";
document.form1.age.value = "";
document.form1.months.value = "";
document.form1.weeks.value = "";
document.form1.answer.value = "";
document.form1.hours.value = "";
document.form1.min.value = "";
document.form1.sec.value = "";
document.form1.bday.value = "";
document.form1.milli.value = "";
}
function run() {
var ap;
dd = document.form1.day.value;
mm = document.form1.month.value;
yy = document.form1.year.value;
with(document.form1) {
ap = parseInt(ampm.selectedIndex);
hr = parseInt(hrs.value);
if(hr <= 0 && hr >= 13) {
ap = null;
alert("asdf")
   }
}
main="valid";
if ((mm < 1) || (mm > 12) || (dd < 1) || (dd > 31) || (yy < 1) ||(mm == "") || (dd == "") || (yy == ""))
main = "Invalid";
else
if (((mm == 4) || (mm == 6) || (mm == 9) || (mm == 11)) && (dd > 30))
main = "Invalid";
else
if (mm == 2) {
if (dd > 29)
main = "Invalid";
else if((dd > 28) && (!lyear(yy)))
main="Invalid";
}
else
if((yy > 9999)||(yy < 0))
main = "Invalid";
else
main = main;
if(main == "valid") {
function leapyear(a) {
if(((a % 4 == 0) && (a % 100 != 0)) || (a % 400 == 0))
return true;
else
return false;
}
days = new Date();
gdate = days.getDate();
gmonth = days.getMonth();
gyear = days.getYear();
age = gyear - yy;
if((mm == (gmonth + 1)) && (dd <= parseInt(gdate))) {
age = age;
}
else {
if(mm <= (gmonth)) {
age = age;
}
else {
age = age - 1;
   }
}
if(age == 0)
age = age;
document.form1.age.value=" You are " + age+ " year(s) old &";
if(mm <= (gmonth + 1))
age = age - 1;
if((mm == (gmonth + 1)) && (dd > parseInt(gdate)))
age = age + 1;
var m;
var n;
if (mm == 12) { n = 31 - dd; }
if (mm == 11) { n = 61 - dd; }   
if (mm == 10) { n = 92 - dd; } 
if (mm == 9) { n = 122 - dd; }
if (mm == 8) { n = 153 - dd; }   
if (mm == 7) { n = 184 - dd; }   
if (mm == 6) { n = 214 - dd; } 
if (mm == 5) { n = 245 - dd; }
if (mm == 4) { n = 275 - dd; }
if (mm == 3) { n = 306 - dd; }
if (mm == 2) { n = 334 - dd; if(leapyear(yy)) n = n + 1; }
if (mm == 1) { n = 365 - dd; if (leapyear(yy)) n = n + 1; }
if (gmonth == 1) m = 31;
if (gmonth == 2) { m = 59;   if (leapyear(gyear)) m = m + 1; }
if (gmonth == 3) { m = 90;   if (leapyear(gyear)) m = m + 1; }
if (gmonth == 4) { m = 120;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 5) { m = 151;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 6) { m = 181;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 7) { m = 212;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 8) { m = 243;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 9) { m = 273;  if (leapyear(gyear)) m = m + 1; }
if (gmonth == 10) { m = 304; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 11) { m = 334; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 12) { m = 365; if (leapyear(gyear)) m = m + 1; }
totdays = (parseInt(age) * 365);
totdays += age / 4;
totdays = parseInt(totdays) + gdate + m + n;
document.form1.answer.value = "" + totdays +" days ";
months = age * 12;
months += 12 - parseInt(mm);
months += gmonth;
document.form1.months.value = months + " Months";
if (gmonth == 1) p = 31 + gdate;
if (gmonth == 2) { p = 59 + gdate;   if (leapyear(gyear)) m = m + 1; }
if (gmonth == 3) { p = 90 + gdate;   if (leapyear(gyear)) p = p + 1; }
if (gmonth == 4) { p = 120 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 5) { p = 151 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 6) { p = 181 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 7) { p = 212 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 8) { p = 243 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 9) { p = 273 + gdate;  if (leapyear(gyear)) p = p + 1; }
if (gmonth == 10) { p = 304 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 11) { p = 334 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 12) { p = 365 + gdate; if (leapyear(gyear)) p = p + 1; }
weeks = totdays / 7;
weeks += " weeks";
weeks = parseInt(weeks);
document.form1.weeks.value = weeks + " Weeks";
var time = new Date();
ghour = time.getHours();
gmin = time.getMinutes();
gsec = time.getSeconds();
hour = ((age * 365) + n + p) * 24;
hour += (parseInt(age / 4) * 24);
if(ap == 0)
hour = hour - hr;
else {
if(ap == 1) {
hour = hour - (11 + hr)
   }
}
document.form1.hours.value = hour + " Hours";
var min;
min = (hour * 60) + gmin;
document.form1.min.value = min + " Minutes";
sec = (min * 60) + gsec;
document.form1.sec.value = sec + " Seconds";
var millisec;
var gmil;
gmil = days.getMilliseconds();
millisec = (sec * 1000) + gmil;
document.form1.milli.value = millisec + " Milliseconds";
mm = mm - 1;
var r;
if(mm == 0) r = 1;
if(mm == 1) r = 31;
if(mm == 2) { r = 59;    if (leapyear(gyear)) m = m + 1; }
if(mm == 3) { r = 90;    if (leapyear(gyear)) r = r + 1; }
if(mm == 4) { r = 120;   if (leapyear(gyear)) r = r + 1; }
if(mm == 5) { r = 151;   if (leapyear(gyear)) r = r + 1; }
if(mm == 6) { r = 181;   if (leapyear(gyear)) r = r + 1; }
if(mm == 7) { r = 212;   if (leapyear(gyear)) r = r + 1; }
if(mm == 8) { r = 243;   if (leapyear(gyear)) r = r + 1; }
if(mm == 9) { r = 273;   if (leapyear(gyear)) r = r + 1; }
if(mm == 10) { r = 304;  if (leapyear(gyear)) r = r + 1; }
if(mm == 11) { r = 334;  if (leapyear(gyear)) r = r + 1; }
if(mm == 12) { r = 365;  if (leapyear(gyear)) r = r + 1; }
mm = mm + 1;
r = parseInt(r) + parseInt(dd);
if( mm > (gmonth + 1)) {
bday = r - m - gdate;
}
else {
if(mm == (gmonth + 1) && (gdate < dd)) {
bday = (r - m - gdate);
}
else {
if((leapyear(gyear)) && ((mm > 2) && (dd < 29))) {
a = 366;
}
else {
a = 365;
}
bday = a + (r - m - gdate);
   }
}
nhour = 24-parseInt(ghour);
nmin = 60 - parseInt(gmin);
nsec = 60 - parseInt(gsec);
go();
if(((bday == 366) && (leapyear(yy))) || ((bday == 365) && (!leapyear(yy)))) {
document.form1.bday.value = "today is your birthday";
alert("Happy Birthday");
} else {
document.form1.bday.value = bday + " days " + nhour + " hours " + nmin + " minutes " + nsec + " seconds";
setTimeout("run()", 1);
}
function go() {
function lyear(a) {
if(((a % 4 == 0) && (a % 100 != 0)) || (a % 400 == 0)) return true;
else return false;
}
mm = parseInt(mm);
dd = parseInt(dd);
yy = parseInt(yy);
if ((mm < 1) || (mm > 12) || (dd < 1) || (dd > 31) || (yy < 1) ||(mm == " ") || (dd == " ") || (yy == " "))  main="Invalid";
else
if (((mm == 4) || (mm == 6) || (mm == 9) || (mm == 11)) && (dd > 30)) main = "Invalid";
else
if (mm == 2) {
if (dd > 29)
main = "Invalid";
else
if(( dd > 28) && (!lyear(yy)))
main = "Invalid";
}
else main = main;
if(main == "valid") {
var m;
if (mm == 1) n = 31;
if (mm == 2) n = 59 + 1;
if (mm == 3) n = 90 + 1;
if (mm == 4) n = 120 + 1;
if (mm == 5) n = 151 + 1;
if (mm == 6) n = 181 + 1;
if (mm == 7) n = 212 + 1;
if (mm == 8) n = 243 + 1;
if (mm == 9) n = 273 + 1;
if (mm == 10) n = 304 + 1;
if (mm == 11) n = 334 + 1;
if (mm == 12) n = 365 + 1;
if((mm == 1)||(mm == 3)||(mm == 5)||(mm == 7)||(mm == 8)||(mm == 10)||(mm == 12))
n += 31 + dd;
else if((mm == 4)||(mm == 6)||(mm == 9)||(mm == 11))
n += 31 + dd + 1;
else if(mm == 2) {
if(lyear(yy)) n += 29 + dd - 3;
else if(!lyear(yy)) n += 28 + dd - 1;
}
fours = yy / 4;
hunds = yy / 100;
fhunds = yy / 400;
var day;
day = (yy + n + fours - hunds + fhunds) % 7;
day = parseInt(day)
switch(day)
{
case 1 : document.form1.age.value +=" you are born on a Sunday"
break
case 2 : document.form1.age.value +=" you are born on a Monday"
break
case 3 : document.form1.age.value +=" you are born on a Tuesday"
break
case 4 : document.form1.age.value +=" you are born on a Wednesday"
break
case 5 : document.form1.age.value +=" you are born on a Thursday"
break
case 6 : document.form1.age.value +=" you are born on a Friday"
break
case 7 : document.form1.age.value +=" you are born on a Saturday"
break
case 0 : document.form1.age.value +=" you are born on a Saturday"
break
   }
}
else {
document.form1.age.value += main + " Date";
      }
   }
}
else {
document.form1.age.value = main + " Date";
document.form1.months.value = "";
document.form1.weeks.value = "";
document.form1.answer.value = "";
document.form1.hours.value = "";
document.form1.min.value = "";
document.form1.sec.value = "";
document.form1.bday.value = "";
document.form1.milli.value = "";
   }
}
//  End -->
</script>

<p align="center"><br>
Fill your Birth-Date in in the below fields<br>
</p>

<form name="form1">
    <p align="center">Month<input type="text" size="3"
    name="month">  Day<input type="text" size="3" name="day">
      Year<input type="text" size="6" name="year">  Hour<input
    type="text" size="6" name="hrs" value="00"> <select
    name="ampm" size="1">
        <option selected>AM</option>
        <option>PM</option>
    </select> <input type="button" name="start" value="Calculate"
    onclick="run()"> <br>
    <br>
    <input type="text" size="55" name="age"
    value="This is where your Age will appear"> <br>
    <br>
    This is how long you live: <br>
    </p>
    <div align="center"><center><table border="0">
<TBODY>        <tr>
            <td>Months :</td>
            <td><input type="text" size="30" name="months"></td>
        </tr>
        <tr>
            <td>Weeks :</td>
            <td><input type="text" size="30" name="weeks"></td>
        </tr>
        <tr>
            <td>Days :</td>
            <td><input type="text" size="30" name="answer"></td>
        </tr>
        <tr>
            <td>Hours :</td>
            <td><input type="text" size="30" name="hours"></td>
        </tr>
        <tr>
            <td>Minutes :</td>
            <td><input type="text" size="30" name="min"></td>
        </tr>
        <tr>
            <td>Seconds :</td>
            <td><input type="text" size="30" name="sec"></td>
        </tr>
        <tr>
            <td>Milliseconds :</td>
            <td><input type="text" size="30" name="milli"></td>
        </tr>
</TBODY>    </table>
    </center></div><p align="center">Your next birthday is
    over: <br>
    <input type="text" size="40" name="bday"> </p>
</form>

Oh, i figured to make it non-editable, becuse it's waaaaay to long for that.

Happy birthday (Lol, just kidding!  :2funny: )!
- Qub1

51
Thanks, LL!  :D

52
Oops, i'll try to fix it!

53
SMF For Free Codes and Support / [CODE] Draggable Calculator! [Qub1]
« on: March 30, 2008, 02:19:01 pm »
Forum Url: http://qub1test.smfforfree4.com
Ok, all this code does is place a Draggable calculator at your site...
Oh, and heres a note for Simply Sibyl:
I've found a solution! With your draggable smileys, you needed to upload 2 js files, but i found a solution so you don't have to do so! Just see the code...
Ok, so this is how it looks:

Previeuw (The calculator is at the bottom, and it's draggable)

Now, paste this in your headers:
Code: [Select]
<script language="JavaScript1.2">
     var ie=document.all
     var ns6=document.getElementById&&!document.all

     var dragapproved=false
     var z,x,y

     function move(e)
     {
          if (dragapproved)
          {
               z.style.left=ns6? temp1+e.clientX-x: temp1+event.clientX-x
               z.style.top=ns6? temp2+e.clientY-y : temp2+event.clientY-y
               return false
          }
     }

     function drags(e)
     {
          if (!ie&&!ns6)
               return
          var firedobj=ns6? e.target : event.srcElement
          var topelement=ns6? "HTML" : "BODY"

          while (firedobj.tagName!=topelement&&firedobj.className!="drag")
          {
               firedobj=ns6? firedobj.parentNode : firedobj.parentElement
          }

          if (firedobj.className=="drag")
          {
               dragapproved=true
               z=firedobj
               temp1=parseInt(z.style.left+0)
               temp2=parseInt(z.style.top+0)
               x=ns6? e.clientX: event.clientX
               y=ns6? e.clientY: event.clientY
               document.onmousemove=move
               return false
          }
     }

     document.onmousedown=drags
     document.onmouseup=new Function("dragapproved=false")
   </script>


<style type='text/css'>.drag{position:relative;cursor:crosshair}</style>

And this in your Footers:
Code: [Select]
<div id="calc" class="drag">
  <form name="calculator">
   <table border="3" cellpadding="0" bordercolor="black" bgcolor="#CCFFCC" cellspacing="1" width="150">
    <tr>
     <td>
      <input type="text" size="20" length="19" value="" name="ans" style="background:black;color:lime;">
     </td>
    </tr>
   </table>

   <table border="3" cellpadding="2" bordercolor="black" cellspacing="2" width="150" bgcolor="#CCFFCC">
    <tr>
     <td align="center">
      <input type="button" value="  7  " name="seven" onMouseDown="document.calculator.ans.value+='7'">
     </td>
     <td align="center">
      <input type="button" value="  8  " name="eight" onClick="document.calculator.ans.value+='8'">
     </td>
     <td align="center">
      <input type="button" value="  9  " name="nine" onClick="document.calculator.ans.value+='9'">
     </td>
     <td align="center">
      <input type="button" value="  /  " name="divide" onClick="document.calculator.ans.value+='/'">
     </td>
    </tr>
    <tr>
     <td align="center">
      <input type="button" value="  4  " name="four" onClick="document.calculator.ans.value+='4'">
     </td>
     <td align="center">
      <input type="button" value="  5  " name="five" onClick="document.calculator.ans.value+='5'">
     </td>
     <td align="center">
      <input type="button" value="  6  " name="six" onClick="document.calculator.ans.value+='6'">
     </td>
     <td align="center">
      <input type="button" value="  *  " name="multiply" onClick="document.calculator.ans.value+='*'">
     </td>
    </tr>
    <tr>
     <td align="center">
      <input type="button" value="  1  " name="one" onClick="document.calculator.ans.value+='1'">
     </td>
     <td align="center">
      <input type="button" value="  2  " name="two" onClick="document.calculator.ans.value+='2'">
     </td>
     <td align="center">
      <input type="button" value="  3  " name="three" onClick="document.calculator.ans.value+='3'">
     </td>
     <td align="center">
      <input type="button" value="  -  " name="subtract" onClick="document.calculator.ans.value+='-'">
     </td>
    </tr>
    <tr>
     <td align="center">
      <input type="button" value="  C  " name="clear" onClick="document.calculator.ans.value=''">
     </td>
     <td align="center">
      <input type="button" value="  0  " name="zero" onClick="document.calculator.ans.value+='0'">
     </td>
     <td align="center">
      <input type="button" value="  =  " name="equal" onClick="document.calculator.ans.value=eval(document.calculator.ans.value)">
     </td>
     <td align="center">
      <input type="button" value="  +  " name="add" onClick="document.calculator.ans.value+='+'">
     </td>
    </tr>
   </table>
  </form>
  </div>

Ok, that was it (not editable, it's a wonder! lol :P)!
- Qub1

54
Forum Url: http://qub1test.smfforfree4.com
This Code will show your users how many Pages they have visited of your forum...
It'll look like this:

Previeuw

Just follow these instructions:

Paste this in your Headers:
Code: [Select]
<script language="Javascript"><!--
function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie(name) { var exp = new Date(); FixCookieDate (exp); exp.setTime (exp.getTime() - 1);  var cval = GetCookie (name); if (cval != null) document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } var expdate = new Date(); var hoevaak_bezocht; expdate.setTime(expdate.getTime() + (5*24*60*60*1000)); if (!(hoevaak_bezocht = GetCookie("hoevaak_bezocht"))) hoevaak_bezocht = 0; hoevaak_bezocht++; SetCookie("hoevaak_bezocht",hoevaak_bezocht,expdate);
// -->
</script>

And now, paste this in your footers (Editing instructions below code):
Quote
<center>
<script language="Javascript"> <!--
document.write("<b>You have visited "+hoevaak_bezocht+" page(s) of our Site.</b>");
//--></script>
You can edit the Red text as you wish, but leave the ''+hoevaak_bezocht+'' between it alone.

REALLY hope you enjoyed!
- Qub1

55
But how... Password field isn't a custom profile field...

56
Can someone make a Code so that i can paste text after the Part where you need to choose your Password in the Registering Tab?

57
SMF For Free Codes and Support / Re: [CODE] Last Forum Activity [Qub1]
« on: March 30, 2008, 01:31:56 pm »
Well, then you would need to code it  ;D

58
SMF For Free Codes and Support / Re: [CODE] Last Site Update [Qub1]
« on: March 30, 2008, 01:31:17 pm »
No Problem  :coolsmiley:

59
General Support / Re: URGENT: Total Forum Crash (ON TWO FORUMS!)
« on: March 07, 2008, 12:14:17 pm »
How do i turn off Java?

60
General Support / URGENT: Total Forum Crash (ON TWO FORUMS!)
« on: March 07, 2008, 11:55:42 am »
I've had this crash two times, it's that when i acces my Forum, my whole internet crashes. SMF For Free, could you please remove the Code Panel Code from these two Forums? Becuse i am sure it was that Code:

www.narutolounge.smfforfree4.com
www.forumadvertiser.smfforfree4.com

Thanks!

Pages: 1 2 3 [4] 5 6 7 ... 10