php forum
php mysql forum
php mysql smarty
 
Page 2 of 2 < 1 2
Topic Options
#36614 - 02/28/00 02:40 AM Re: Greetings to user by time - release.
Derek Johnson Offline
Junior Member

Registered: 02/15/00
Posts: 8
Loc: ....
I knowwhat the problem is to get rid of the error, some code was left out...

FIND THIS:
______________________________
function display_title() {
date = new Date();
var hours = date.getHours();
var message = '';

if (hours >= 6) { time_of_day = '<b>Good morning$CookieGreet</b>'; message='Morning Message';}
if ((hours >= 12) && (hours < 17)) { time_of_day = 'Good afternoon$CookieGreet</b>'; message='Afternoon Message'}
if (hours >= 17) { time_of_day = '<b>Good evening$CookieGreet</b>'; message='Evening Message';}

REPLACE WITH:
________________________________
function display_title() {
date = new Date();
var hours = date.getHours();
var message = '';
var time_of_day = '';

if (hours >= 6) { time_of_day = '<b>Good morning$CookieGreet</b>'; message='Morning Message';}
if ((hours >= 12) && (hours < 17)) { time_of_day = '<b>Good afternoon$CookieGreet</b>'; message='Afternoon Message';}
if (hours >= 17) { time_of_day = '<b>Good evening$CookieGreet</b>'; message='Evening Message';}

I hope this fixes it.

Top
#36615 - 02/28/00 03:20 AM Re: Greetings to user by time - release.
Derek Johnson Offline
Junior Member

Registered: 02/15/00
Posts: 8
Loc: ....
that fixes the error for me, but it still doesnt make anything write to the page... i dont see
"good evening, (name) " or anyhing like that, al I see is the "you last visited" http://r6.vortexq.com/cgi-bin/Ultimate.cgi?action=intro
I followed the instructions...

Top
#36616 - 02/29/00 01:53 AM Re: Greetings to user by time - release.
Derek Johnson Offline
Junior Member

Registered: 02/15/00
Posts: 8
Loc: ....
here is a better fix, replace the function with this one:

<SCRIPT language=JavaScript><!--
// begin script

function display_title() {
date = new Date();
var hours = date.getHours();
var message = '';
var time_of_day = '';

if ((hours < 6) &#0124; &#0124; (hours >= 6)) { time_of_day = '<b>Good morning$CookieGreet</b>'; message = 'Morning Message';}
if ((hours >= 12) && (hours < 17)) { time_of_day = '<b>Good afternoon$CookieGreet</b>'; message = 'Afternoon Message';}
if (hours >= 17) { time_of_day = '<b>Good evening$CookieGreet</b>'; message = 'Evening Message';}

document.write('' + time_of_day + '');
// document.write('' + message + '');

}
// end display title
// --></SCRIPT>

Top
#36617 - 03/03/00 01:01 PM Re: Greetings to user by time - release.
wondergurl Offline
Junior Member

Registered: 02/26/00
Posts: 8
Great hack! So far, I haven't had the error.

However, can Ilya or anyone else confirm if the above fix for the "time_of_day" Javascript error works? I haven't gotten the error yet but I want to make sure Derek's change is the correct fix so that I don't get it!

Top
#36618 - 03/04/00 07:45 PM Re: Greetings to user by time - release.
Grim*Talez Offline
Junior Member

Registered: 02/08/00
Posts: 5
Loc: Draperstown
If you're cutting and pasting straight from this thread in the discussion forum, then make sure that you always put the &#0124; &#0124;'s together.

If you look at Derek's post, you'll see that the line starting: if (hours < 6)
has a space between the &#0124; &#0124;'s.

This may be causing the time_of_day error.

Hope this helps.

Shane.

Top
#36619 - 03/04/00 08:22 PM Re: Greetings to user by time - release.
ilya Offline
Junior Member

Registered: 06/03/00
Posts: 9
You're right.
UBB adds spaces between the |'s.
_________________________
Hmmm. I used to have about 1200 posts.. Now i have one?

Top
#36620 - 03/05/00 01:35 AM Re: Greetings to user by time - release.
ilya Offline
Junior Member

Registered: 06/03/00
Posts: 9
UBBmaster has found a bug in the hack, that at 12:00 AM you always get a javascript error. I hope the code bellow will fix it:

In the hack, replace
Code:
code:


with
Code:
code:


I hope that fixes the problem.
_________________________
Hmmm. I used to have about 1200 posts.. Now i have one?

Top
#36621 - 03/07/00 02:38 PM Re: Greetings to user by time - release.
Derek Johnson Offline
Junior Member

Registered: 02/15/00
Posts: 8
Loc: ....
you need to use &#0124; &#0124; not && just like my post said... i use it on my page and it enver has problems i emailed it to the webmaster of this site and he still hasnt put it on the page, so i dont know what the problem is with poeple around here. I give a fix and no one takes it...

------------------

Top
#36622 - 03/08/00 12:57 AM Re: Greetings to user by time - release.
LazyMonk Offline
Junior Member

Registered: 02/24/00
Posts: 17
Johnson is right...use the | instead of && ..then you will have no error

Top
#36623 - 03/20/00 02:39 PM Re: Greetings to user by time - release.
hunter Offline
Member

Registered: 03/17/00
Posts: 39
I wasn't getting a javascript error it just wasn't showing the greeting between the hour of midnight and 1AM.

thanks for the fix. &#0124; &#0124; works.

hunter

Top
#36624 - 03/22/00 05:10 PM Re: Greetings to user by time - release.
Donnyroe Offline
Junior Member

Registered: 01/06/00
Posts: 14
Can someone post the hack text again with the changes implemented please, thanks for all your help.
_________________________
Sometimes being dead to someone is a good thing.

Top
#36625 - 03/23/00 04:51 PM Re: Greetings to user by time - release.
Greg Hard Offline
Member

Registered: 02/21/00
Posts: 5533
Loc: My Room
Thanx guys. Works like a charm.
See it on my board. http://www.h-realms.com/lild/cgi-bin/Ultimate.cgi
WORKS PERFECT WITH THE PATCH.

Top
#36626 - 03/25/00 09:37 AM Re: Greetings to user by time - release.
katgyrl.com Offline
Junior Member

Registered: 02/07/00
Posts: 8
Loc: toronto, canada
i dunno mastermind, it doesn't seem to run perfectly when i visit your ubb... maybe it's just me but i always get something that looks like this at yours:

You last visited:  Good afternoon

i've only seen it run to perfection on 5.38 versions.

------------------

Top
#36627 - 03/26/00 02:29 PM Re: Greetings to user by time - release.
ilya Offline
Junior Member

Registered: 06/03/00
Posts: 9
Looks fine to me on MM's ubb

------------------
Thanks for reading!
Ilya
Administrator of Ubb Code Hackers Hideout
Moderator of UBB Hacks Finished
_________________________
Hmmm. I used to have about 1200 posts.. Now i have one?

Top
#36628 - 03/26/00 03:26 PM Re: Greetings to user by time - release.
The Team Offline
Moderator

Registered: 08/11/00
Posts: 182
Loc: yes
ilya the fix isnt working you may want to take a look at the code and try to fix it on this board.

------------------
President and Webmaster of UBB Hackers Hideout.

Contact Me at:

ICQ: 33326211
AIM:SpazJCC
Email: ubbmaster@ubbcodehacking.com

Top
#36629 - 03/27/00 11:04 AM Re: Greetings to user by time - release.
ilya Offline
Junior Member

Registered: 06/03/00
Posts: 9
Will do

------------------
Thanks for reading!
Ilya
Administrator of Ubb Code Hackers Hideout
Moderator of UBB Hacks Finished
_________________________
Hmmm. I used to have about 1200 posts.. Now i have one?

Top
Page 2 of 2 < 1 2



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks