[Request] Join Time

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Pokeon
Registered User
Posts: 12
Joined: Sat Apr 20, 2002 11:47 pm

[Request] Join Time

Post by Pokeon »

Can someone make a Joined Time editor?

User avatar
arkia
Registered User
Posts: 78
Joined: Thu Feb 14, 2002 4:50 am

Post by arkia »

just edit the MySQL database

here is a script (put it in a html page) that will let you turn normal date into one you can use for phpBB2:

Code: Select all

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
<title>UNIX Date-Time Converter</title> 
<script LANGUAGE="JavaScript">function Calculate() 
  { 
    if(document.form1.switcher.value == "=>") 
      timeToHuman(); 
    else if(document.form1.switcher.value == "<=") 
      humanToTime(); 
  } 
  function timeToHuman() 
  { 
    var theDate = new Date((document.form1.timeStamp.value - 86400)*1000); 
    dateString = theDate.toGMTString(); 
    arrDateStr = dateString.split(" "); 
    document.form1.inMon.value = getMonthNum(arrDateStr[2]); 
    document.form1.inDay.value = arrDateStr[1]; 
    document.form1.inYear.value = arrDateStr[3]; 
    document.form1.inHr.value = arrDateStr[4].substr(0,2); 
    document.form1.inMin.value = arrDateStr[4].substr(3,2); 
    document.form1.inSec.value = arrDateStr[4].substr(6,2); 
  } 
  function humanToTime() 
  { 
    var humDate = new Date(Date.UTC(document.form1.inYear.value, 
          (stripLeadingZeroes(document.form1.inMon.value)-1), 
          stripLeadingZeroes(document.form1.inDay.value), 
          stripLeadingZeroes(document.form1.inHr.value), 
          stripLeadingZeroes(document.form1.inMin.value), 
          stripLeadingZeroes(document.form1.inSec.value))); 
    document.form1.timeStamp.value = ((humDate.getTime()/1000) + 86400); 
  } 
  function pointRight() 
  { 
    document.form1.switcher.value="=>"; 
  } 
  function pointLeft() 
  { 
    document.form1.switcher.value="<="; 
  } 
  function stripLeadingZeroes(input) 
  { 
    if((input.length > 1) && (input.substr(0,1) == "0")) 
      return input.substr(1); 
    else 
      return input; 
  } 
  function getMonthNum(abbMonth) 
  { 
    var arrMon = new Array("Jan","Feb","Mar","Apr","May","Jun", 
          "Jul","Aug","Sep","Oct","Nov","Dec"); 
    for(i=0; i<arrMon.length; i++) 
    { 
      if(abbMonth == arrMon[i]) 
        return i+1; 
    } 
  } 
</script> 
</head> 
<body> 
   <form name="form1"> 
      <table border="0"> 
         <tr> 
            <th>   Unix timestamp (secs): 
            </th> 
            <td valign="bottom" rowspan="2">                
               <input type=button name=switcher value="=>" onClick="Calculate();"> 
            </td> 
            <th>   Mon: 
            </th> 
            <th> 
            </th> 
            <th>   Day: 
            </th> 
            <th> 
            </th> 
            <th>   Year: 
            </th> 
            <th> 
            </th> 
            <th>   Hr: 
            </th> 
            <th> 
            </th> 
            <th>   Min: 
            </th> 
            <th> 
            </th> 
            <th>   Sec: 
            </th> 
            <th> 
            </th> 
         </tr> 
         <tr> 
            <td align="center">                
               <input type=text size=14 maxlength=11 name=timeStamp onKeyUp="pointRight();"> 
            </td> 
            <td>                
               <input type=text size=4 maxlength=2 name=inMon onKeyUp="pointLeft();"> 
            </td> 
            <th>   / 
            </th> 
            <td>                
               <input type=text size=4 maxlength=2 name=inDay onKeyUp="pointLeft();"> 
            </td> 
            <th>   / 
            </th> 
            <td>                
               <input type=text size=4 maxlength=4 name=inYear onKeyUp="pointLeft();"> 
            </td> 
            <th>   at 
            </th> 
            <td>                
               <input type=text size=4 maxlength=2 name=inHr onKeyUp="pointLeft();"> 
            </td> 
            <th>   : 
            </th> 
            <td>                
               <input type=text size=4 maxlength=2 name=inMin onKeyUp="pointLeft();"> 
            </td> 
            <th>   : 
            </th> 
            <td>                
               <input type=text size=4 maxlength=2 name=inSec onKeyUp="pointLeft();"> 
            </td> 
            <th>   GMT 
            </th> 
         </tr> 
      </table> 
   </form> 
</body> 
</html>
I am not the original author of this code. Please do not ask me for help. I would give full credit to the owner but I dont know who the owner is.
~Drakia~

Mods:
Level in Memberlist

Pokeon
Registered User
Posts: 12
Joined: Sat Apr 20, 2002 11:47 pm

Post by Pokeon »

i mean like the post count editor

Post Reply

Return to “[2.0.x] MOD Requests”