php forum
php mysql forum
php mysql smarty
 
Topic Options
#199536 - 03/11/03 07:13 AM [6.4 - 6.5] Display Times Without JavaScript
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Very simple script, suggested by gero:

Open ubb_lib_time.cgi.
Find:
Code:
	return qq~
<script language="JavaScript1.3" type="text/javascript">
document.writeln(timestamp(new Date($datestring), $dfrm, $tfrm, $dclass, $tclass, $rev, $noadj));
</script>~;
Replace with:
Code:
	my $noscript = $dfrm eq 'dfrm' && $tfrm eq 'tfrm'
	? &DateFormat($_[0]) . " " . &TimeFormat($_[1]) :
	$dfrm eq 'dfrm' ? &DateFormat($_[0]) :
	$tfrm eq 'tfrm' ? &TimeFormat($_[1]) : '';
	return qq~
<script language="JavaScript1.3" type="text/javascript">
document.writeln(timestamp(new Date($datestring), $dfrm, $tfrm, $dclass, $tclass, $rev, $noadj));
</script><noscript>$noscript</noscript>~;
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#199537 - 03/11/03 08:28 PM Re: [6.4 - 6.5] Display Times Without JavaScript
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
thanks LK, giving it a shot right now laugh
_________________________
- Allen wavey
- What Drives You?

Top
#199538 - 03/11/03 09:07 PM Re: [6.4 - 6.5] Display Times Without JavaScript
ADWOFF Offline
Content Queen

Registered: 05/07/01
Posts: 709
Loc: Pennsylvania
Question, would this prevent it from continuing to go out of whack--like it did the other day here at UBBDev? laugh
_________________________
Sue
adwoff.com

Top
#199539 - 03/11/03 09:57 PM Re: [6.4 - 6.5] Display Times Without JavaScript
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
this fixes it for your users using older copies of IE or IE with javascript turned off.
_________________________
- Allen wavey
- What Drives You?

Top
#199540 - 05/04/03 07:24 PM Re: [6.4 - 6.5] Display Times Without JavaScript
Mirek Offline
Member

Registered: 05/01/02
Posts: 35
I just upgraded to 6.5.. added a few hacks... everything is going fine and then people start telling me that they can't see the timestamps... I can see them fine in Mozilla.. but people with IE can't see them... anyone have any ideas?

I compared the html with ubbdev's and it looks the same (I can see it in ie 6 on ubbdev, but not on my page... none of the time stamps on any pages)

Tried this code, still doing the same thing... I am lost.


edit: seems that clearing out the cookies fixes it...


edit 2: or not... goes back to not displaying the dates, logging out and back in also seems to fix it... and it looks like it's not just ie, but Mozilla at times too


one more edit: going to your profile and updating the settings SEEMS to fix it...

Top
#199541 - 05/04/03 11:23 PM Re: [6.4 - 6.5] Display Times Without JavaScript
Charles Capps Offline
Admin Emeritus
Resident Code Hacker

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Aye... edit the profile, log out, clear the cookies, then log back in. That fixes most of the time problems.
_________________________
UBB.classic: Love it or hate it, it was mine.

Top


Moderator:  Charles, Gizmo 
Who's Online
1 registered (Bill B), 22 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks