|
Post by tunescool on Jan 30, 2011 6:35:28 GMT -8
|
|
|
Post by Wormopolis on Jan 30, 2011 21:29:31 GMT -8
try the code he submitted in the submissions area. see if that one works.
|
|
|
Post by tunescool on Jan 30, 2011 22:20:08 GMT -8
thats the one i have in there
|
|
|
Post by Wormopolis on Jan 31, 2011 22:00:57 GMT -8
code stores in location field in the test on here, where did you set the code to store data?
|
|
|
Post by Wormopolis on Jan 31, 2011 22:01:55 GMT -8
I see it working on your site in FF.
|
|
|
Post by tunescool on Jan 31, 2011 22:45:11 GMT -8
i checked safari and it works fine, im having alot of weird browser problems and i just reinstalled my software and have the latest firefox. why would it not work for me but work on your firefox, a macintosh issue?
|
|
|
Post by Wormopolis on Feb 1, 2011 21:39:27 GMT -8
might be the latest firefox. do you see it working in my profile over there? <----
|
|
|
Post by tunescool on Feb 1, 2011 23:58:14 GMT -8
no, it looks like this. i have 3.6.13, do you think i should download a new one. like i said, i tried one of these codes months ago with the same result
|
|
|
Post by Wormopolis on Feb 4, 2011 15:17:25 GMT -8
put this into your address bar and post the results:
javascript: prompt('My Local Date Format',(new Date()).toLocaleString());
|
|
|
Post by tunescool on Feb 4, 2011 16:20:24 GMT -8
i got a prompt and then this page yesterday and today colors work on the main page thanks
|
|
|
Post by Wormopolis on Feb 4, 2011 22:38:48 GMT -8
I dont understand why apple had it put the time in the middle of the date string either...
Try changing:
utc=(new Date(utc)).toLocaleString() rt= "Local Time: "+(pbDateOffset.prototype.pbdiff[0]?"<a href='javascript:alert(pbDateOffset()[1])'>":"")+utc.split(' ')[0].replace(/(\w{3})[^,]+/,'$1')+' '+utc.split(/\s\d{4}\s/)[1]+(pbDateOffset.prototype.pbdiff[0]?'</a>':'')
to:
utc=(new Date(utc)) rt= "Local Time: "+(pbDateOffset.prototype.pbdiff[0]?"<a href='javascript:alert(pbDateOffset()[1])'>":"")+utc.toLocaleString().split(' ')[0].replace(/(\w{3})[^,]+/,'$1')+' '+utc.toLocaleTimeString()+(pbDateOffset.prototype.pbdiff[0]?'</a>':'')
|
|
|
Post by Wormopolis on Feb 4, 2011 23:16:11 GMT -8
testing attachment Attachments:
|
|
|
Post by tunescool on Feb 5, 2011 1:43:06 GMT -8
the first pic is safari, it just gives the month without a date, im unsure of how its supposed to show up now, but youd think thered be a date if it shows the month this is firefox, it shows the day, saturday, and military time without AM or PM or the time zone. id want them both to be like safari but with the date Feb 5th
|
|
|
Post by Wormopolis on Feb 6, 2011 7:20:14 GMT -8
This is the only thing left to try:
utc=(new Date(utc)) rt= "Local Time: "+(pbDateOffset.prototype.pbdiff[0]?"<a href='javascript:alert(pbDateOffset()[1])'>":"")+utc.toGMTString().split(' ')[0].replace(/(\w{3})[^,]+/,'$1')+' '+utc.toGMTString()+(pbDateOffset.prototype.pbdiff[0]?'</a>':'')
you might want to check to see if your browser lets you modify how dates are displayed. there is nbow way to wqrite the code to account for EVERY permutation of how someone has customized how dates are displayed on their computer.
|
|
|
Post by tunescool on Feb 6, 2011 9:54:04 GMT -8
it did this to both browsers, there isnt anything in firefox, and mac is just the day Sun 11;42 AM. all you can really do is take the day or AM and PM out, but i have it set like a normal 12 clock. it cant have anything to do with my forum settings, it worked or you. you can see its off by like 7 hours in military time i have all the spacing and code that you gave me copied rite? <script> /* @name Local Time in Profile - Eton */ var tz_storage = 'location' //where in profile to store data tz_errorColor = 'red' //field index where time should be inserted (-0=above displayname, 0=below displayname, -1=above rank, 1=below rank, etc...) (999=below storage field) tz_index = 999 pb_bias=0 //compensate for proboards date drift (1=enable, 0=disable)
var tz_re=/\[\xb1(\d)([+-][\d.]+)\]/, tz_re3=/(\w+\s\d{1,2},\s\d{4},\s\d+:\d+[ap]m)/ var a,b,c,d,mTD,i,dt=new Date() if(document.modifyForm){ a=document.modifyForm[tz_storage], b=document.modifyForm['timezone'], c=document.modifyForm['summertime'] if(a&&b&&c){ function tzedit(ev){ try{ if(document.getElementById('showlocaltime').selectedIndex<1)return true var d = arguments.callee.prototype.tzb.options[arguments.callee.prototype.tzb.selectedIndex].value; d=(d>=1)?'+'+d:d d='[\xb1'+arguments.callee.prototype.tzc.options[arguments.callee.prototype.tzc.selectedIndex].value+d+']' arguments.callee.prototype.tza.value+=d; }catch(e){return true} } mTD=c.offsetParent.parentNode.cloneNode(1) mTD.firstChild.lastChild.innerHTML='Show Local Time:' mTD.firstChild.nextSibling.lastChild.lastChild.name= mTD.firstChild.nextSibling.lastChild.lastChild.id= 'showlocaltime' mTD.lastChild.lastChild.innerHTML='Do you want your local time displayed in your profile?' c.offsetParent.parentNode.parentNode.appendChild(mTD) a.value=a.value.replace(tz_re,''); i=document.getElementById('showlocaltime') if(tz_re.test(RegExp['$_']))i.selectedIndex=1; else i.selectedIndex=0 if(a.maxLength<(a.value.length+9)){ i.style.outline=a.style.outline=tz_errorColor+" solid medium"; mTD.lastChild.lastChild.innerHTML +='<font color="'+tz_errorColor+'">(Not enough room in '+tz_storage+' field to use this feature! Please make room and refresh this page)</font>' i.selectedIndex=0; i.disabled=true; } tzedit.prototype.tza=a; tzedit.prototype.tzb=b;tzedit.prototype.tzc=c; i.onchange=function(){ var t=document.getElementById('showlocaltime') if(!t)return true if(t.selectedIndex>0){ if(document.modifyForm.addEventListener){ document.modifyForm.addEventListener('submit',tzedit,0); }else if(document.modifyForm.attachEvent){ document.modifyForm.attachEvent('onsubmit',tzedit) }else{ document.modifyForm.onsubmit=tzedit} }else{ if(document.modifyForm.removeEventListener){ document.modifyForm.removeEventListener('submit',tzedit,0); }else if(document.modifyForm.detachEvent){ document.modifyForm.detachEvent('onsubmit',tzedit) }else{ document.modifyForm.onsubmit=null} } } i.onchange() } } function pbDateOffset(index,bT){ if(arguments.callee.prototype.pbdiff) return arguments.callee.prototype.pbdiff; else arguments.callee.prototype.pbdiff=[0,''] index=isNaN(index)?2:index; var b= 'The detected difference between your computer time and this Proboards forum ' var a=document.getElementsByTagName('td')[index].innerHTML.match(tz_re3) if(a&&a.length){ a= (bT&&pb_username!='Guest')?new Date(a[0].replace(/([ap]m)$/,' $1')):dt; if(!isNaN(a)){ arguments.callee.prototype.pbdiff= [dt-a,b+'is approximately '+String((dt-a)/1000/60).replace(/(\.\d{2})\d+/,'$1')+' minutes'] return arguments.callee.prototype.pbdiff } } return [0,b+'could not be determined'] } if(location.href.match(/action=(display|goto|(?:user)?recent|search2|(pm)?viewp?)/i)|| (location.href.split(/\//).pop().match(/index.cgi\??/) && (document.body.innerHTML.match(/b>\d+\sresults found<\/b/i)|| document.title.match(/-\sPreview/)))){ mTD=document.getElementsByTagName('td'); pb_bias=pbDateOffset(2,pb_bias)[0] for(i=0;i<mTD.length;i++){ if(((mTD[i].width=="20%" && mTD[i].className.match(/windowbg2?/) && mTD[i].innerHTML.match(/Posts:/)) || (mTD[i].previousSibling && mTD[i].previousSibling.width=="25%")) && mTD[i].innerHTML.match(tz_re) ){ if(mTD[i].innerHTML.match(/Posts:/)){ b=mTD[i].innerHTML.split(/<br\s*\/?>/i) while(b[b.length-1]=='')b.pop(); for(c=0;c<b.length;c++){ if(b[c].match(tz_re)){ b[c]= b[c].replace(tz_re,function(m,p1,p2,p3){ var lt=dt.getTime(),lo=dt.getTimezoneOffset() * 60000,utc=lt+lo, ti=tz_index,rt; utc=utc + (3600000*(parseInt(p2)+parseInt(p1))) - pb_bias utc=(new Date(utc)) rt= "Local Time: "+(pbDateOffset.prototype.pbdiff[0]?"<a href='javascript:alert(pbDateOffset()[1])'>":"")+utc.toGMTString().split(' ')[0].replace(/(\w{3})[^,]+/,'$1')+' '+utc.toGMTString()+(pbDateOffset.prototype.pbdiff[0]?'</a>':'') if(ti!=999){ ti=ti%b.length if(ti>-1){b[ti]=(b[ti].length?b[ti]+'<br>':'')+rt;}else{ti=0-ti; b[ti]=rt+(b[ti].length?'<br>'+b[ti]:'')} return '' }else{return ((b[c].length?'<br>':'')+rt)} }); break; } } mTD[i].innerHTML=b.join('<br>') }else mTD[i].innerHTML=mTD[i].innerHTML.replace(tz_re,'') } } } </script>
|
|