 |
 |
 |
 |
#199702 - 03/21/04 05:49 PM
Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
|
Master Hacker
Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
|
Sub, if you ever want to turn the times into a format that is adjusted via users preference, I wrote this js function that takes the normal 12-31-2004 08:42PM and turns it into something workable. <script language="Javascript" type="text/javascript">
<!--
function formatTime(input) {
var tippy = input;
var tippy_array = tippy.split("-");
var month = parseInt(tippy_array[0]) - 1;
var day = parseInt(tippy_array[1]) + 0;
if(tippy_array[2] != null && tippy_array[2] != '') {
var new_array_tippy = tippy_array[2].split(" ");
var year = parseInt(new_array_tippy[0]);
var newer_array_tippy = new_array_tippy[1].split(':');
hour = parseFloat(newer_array_tippy[0]);
if(new_array_tippy[2] == 'PM'){ hour += 12; }
var minutes = parseInt(newer_array_tippy[1]);
document.write('<span class="time">');
document.write(timestamp(new Date(year,month,day,hour,minutes,0), dfrm, null, 0, 0, 0, 0), "at ");
document.write(timestamp(new Date(year,month,day,hour,minutes,0), null, tfrm, 0, 0, 0, 0), '</span>');
}
}
//-->
</script>
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#199704 - 03/22/04 10:27 AM
Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
|
Admin Emeritus
Developer
Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
|
Originally posted by Ian Spence: I just don't see any reason why it's printing out the <html><body></body></html> and nothing else. I can't find anywhere in the code where it tells it to print that out If there is no query string found, it bugs out and outputs nothing. It seems that IE/Moz like to invent tags when none exist. I've PM'd Eric with a different (and less cluttered) method of fetching the query string to see if that cures the problem.
_________________________
http://thegeeksinc.com [img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#199709 - 03/22/04 04:12 PM
Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
|
Wizard
Registered: 01/10/00
Posts: 5131
Loc: Portland, OR, USA
|
Originally posted by Sub Zero:</font><hr /> So how do I determine what is a graemlin, and what is not without knowing what graemlins exist? <hr /></blockquote> <blockquote><font class="small">Originally posted by Ian Spence: [qb] work at it this way. IMG tags only allow full urls, and graemlins use relative paths. Do something like $message = pregreplace("/src="Graemlins//", "src="$NonCGIURL/Graemlins/", $message);That's untested, and should only work with custom graemlins. You could also try something like $message = pregreplace("/src="biggrin.gif/", "src="$NonCGIURL/biggrin.gif", $message);for each of the built in graemlins. [/qb]
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|