#36594
02/25/2000 12:33 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
This hack greets user according to time of the day. Someone might have made this hack before, but i've never seen it, so decided to make one. Files needed to be edit: Ultimate.cgi Requirements: user must have a javascripts-supported browser. Documentation: 1) For those who have "Display category only on first page" turned off: in Ultimate.cgi find Right after that add Then down below find After that add 2) For those who have it turned on: in Ultimate.cgi find Right after that add Few lines below find and after that add ------------------ Thanks for reading! Ilya Administrator of Ubb Code Hackers Hideout Moderator of UBB Hacks Finished
|
|
|
#36595
02/25/2000 4:50 PM
|
Joined: Jan 2000
Posts: 47
Junior Member
|
Junior Member
Joined: Jan 2000
Posts: 47 |
Can I get a link of it in action? Need one for the WCH... ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/smile.gif) ------------------ http://su.ffgamers.net Joy! A hobby that only cost me $170.
|
|
|
#36596
02/25/2000 11:43 PM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
|
|
|
#36597
02/26/2000 12:11 AM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Not a bad idea...not much usefulness of course, but a good hack none_the_less.
------------------ I wish I were a Canuck All they have to do is drink beer, play hockey, and say "Eh"
* No offense meant to any Canadians
|
|
|
#36598
02/26/2000 12:24 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
Yeah, it's not much of a use, just to be nice to your visitors ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/smile.gif) In action: http://www.ubbcodehacking.com ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/wink.gif)
|
|
|
#36600
02/26/2000 12:34 AM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Hmm, does it still show the time?? Cause it didn't show when i went to the main page
Whoops, forgot that when i hit the logo at the top, it never does, my bad >:0) Will it when i first enter teh page though?
------------------ I wish I were a Canuck All they have to do is drink beer, play hockey, and say "Eh"
* No offense meant to any Canadians
|
|
|
#36601
02/26/2000 12:36 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
I don't quite understand what you mean, atom. This hack just welcomes the person by time of the day. Also, if he has a cookie "Username" set, it will greet him by his Username. The time (if you're talking about "You last visited: blah-blah-blah") still shows on the first page if a person has been on this board before. Also, remmber, that when you click on the logo you by pass the cookies.
|
|
|
#36602
02/26/2000 12:42 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
|
|
|
#36603
02/26/2000 12:44 AM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Yeah, the you last visted part is what i was talking about. I fig'ed it out after i realized i cliked on the logo to go to the main page, and therefore bypassed the cookie.
Well Done!
------------------ I wish I were a Canuck All they have to do is drink beer, play hockey, and say "Eh"
* No offense meant to any Canadians
|
|
|
#36604
02/26/2000 1:28 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
Thanks ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/smile.gif)
|
|
|
#36605
02/26/2000 12:49 PM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
Also if it doesn't work you may want to refresh your cookie in preferences. ------------------ President and Webmaster of UBB Hackers Hideout. Contact Me at: ICQ: 33326211 AIM:SpazJCC Email: ubbmaster@ubbcodehacking.com
|
|
|
#36606
02/26/2000 4:17 PM
|
Joined: Feb 2000
Posts: 1
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 1 |
Woult this hack work with 5.44 and 5.44a versions of UBB ?
I assume greetings can be translated into any language ?
|
|
|
#36607
02/26/2000 5:23 PM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
I think it should work on any version, since they all use the same cookie-reading method. And yes, it can be translated.
|
|
|
#36608
02/26/2000 9:43 PM
|
Joined: Feb 2000
Posts: 116
Member
|
Member
Joined: Feb 2000
Posts: 116 |
is this hack for the freeware version??
|
|
|
#36609
02/26/2000 11:44 PM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
I wrote it for full version, and don't think freeware will work, since i'm not sure it (freeware) supports cookies.
|
|
|
#36610
02/27/2000 12:24 AM
|
Joined: Jan 2000
Posts: 3
Junior Member
|
Junior Member
Joined: Jan 2000
Posts: 3 |
I can confirm - it works on 5.44a. See it here: http://www.coffeetalkin.com/cgi-bin/Ultimate.cgi ----(edit)---- Drat. This worked OK here on this forum and after I put it on my forum. Yet 10 minutes later I'm now getting a javascript error "time_of_day" undefined! I'm using IE v5.00.2919.6307 on Win98. Anybody got a clue? I'm now headed to the MS site to see if there's any updates but I wonder if this is going to hurt my users!?!?
|
|
|
#36611
02/27/2000 10:04 AM
|
Joined: Feb 2000
Posts: 62
Member
|
Member
Joined: Feb 2000
Posts: 62 |
Yep, same problem here 5.44a, 98SE,IE5, worked fine this afternoon, then suddenly, around 11:00pm I get IE5 error (bottom left) "done but with errors on page" Click on the "!" and I get: Line: 96 Char: 1 Error: "time_of_day" is undefined URL: http://www.guvner.com/cgi-bin/Ultimate.cgi?action=intro BTW - the "you last visited" time still shows correctly, just the member greeting has gone AWOL. Please advise, I do like this hack and my members are most impressed with the "personal touch" Mike
I'm depriving a village somewhere of an idiot.
|
|
|
#36612
02/27/2000 4:19 PM
|
Joined: Feb 2000
Posts: 62
Member
|
Member
Joined: Feb 2000
Posts: 62 |
Ok it's now 7:12am and all's fine. "good morning" but no user name, refreshed my cookie - no good - re-set general variables
- everything's fine (until tonight??).
Is the problem to do with passing thru midnight??
Over to you Ilya . . . .
I'm depriving a village somewhere of an idiot.
|
|
|
#36613
02/28/2000 2:05 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
The hack displays the username only if you have a username cookie. If you get a problem, try this (that's what i did): 1) Delete all cookies set by UBB 2) In preferences, check the 'store username/pass' box 3) Post a message. 4) Go to the first page of your forum.
I don't think midnight has anything to do with the problem.
|
|
|
#36614
02/28/2000 3:40 AM
|
Joined: Feb 2000
Posts: 5
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 5 |
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 = 'Good morning$CookieGreet'; message='Morning Message';} if ((hours >= 12) && (hours < 17)) { time_of_day = 'Good afternoon$CookieGreet'; message='Afternoon Message'} if (hours >= 17) { time_of_day = 'Good evening$CookieGreet'; 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 = 'Good morning$CookieGreet'; message='Morning Message';} if ((hours >= 12) && (hours < 17)) { time_of_day = 'Good afternoon$CookieGreet'; message='Afternoon Message';} if (hours >= 17) { time_of_day = 'Good evening$CookieGreet'; message='Evening Message';}
I hope this fixes it.
|
|
|
#36615
02/28/2000 4:20 AM
|
Joined: Feb 2000
Posts: 5
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 5 |
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... ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/frown.gif)
|
|
|
#36616
02/29/2000 2:53 AM
|
Joined: Feb 2000
Posts: 5
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 5 |
here is a better fix, replace the function with this one:
|
|
|
#36617
03/03/2000 2:01 PM
|
Joined: Feb 2000
Posts: 2
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 2 |
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! ![[Linked Image]](http://ubbcodehacking.com/ubb/smilies/wink.gif)
|
|
|
#36618
03/04/2000 8:45 PM
|
Joined: Feb 2000
Posts: 3
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 3 |
If you're cutting and pasting straight from this thread in the discussion forum, then make sure that you always put the | |'s together.
If you look at Derek's post, you'll see that the line starting: if (hours < 6) has a space between the | |'s.
This may be causing the time_of_day error.
Hope this helps.
Shane.
|
|
|
#36619
03/04/2000 9:22 PM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
You're right. UBB adds spaces between the |'s.
|
|
|
#36620
03/05/2000 2:35 AM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
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 with I hope that fixes the problem.
|
|
|
#36621
03/07/2000 3:38 PM
|
Joined: Feb 2000
Posts: 5
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 5 |
you need to use | | 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...
------------------
|
|
|
#36622
03/08/2000 1:57 AM
|
Joined: Feb 2000
Posts: 20
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 20 |
Johnson is right...use the | instead of && ..then you will have no error
|
|
|
#36623
03/20/2000 3:39 PM
|
Joined: Mar 2000
Posts: 20
Member
|
Member
Joined: Mar 2000
Posts: 20 |
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. | | works.
hunter
|
|
|
#36624
03/22/2000 6:10 PM
|
Joined: Jan 2000
Posts: 43
Junior Member
|
Junior Member
Joined: Jan 2000
Posts: 43 |
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.
|
|
|
#36626
03/25/2000 10:37 AM
|
Joined: Feb 2000
Posts: 7
Junior Member
|
Junior Member
Joined: Feb 2000
Posts: 7 |
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.
------------------
|
|
|
#36627
03/26/2000 3:29 PM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
Looks fine to me on MM's ubb ------------------ Thanks for reading! Ilya Administrator of Ubb Code Hackers Hideout Moderator of UBB Hacks Finished
|
|
|
#36628
03/26/2000 4:26 PM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
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
|
|
|
#36629
03/27/2000 12:04 PM
|
Joined: Jun 2000
Posts: 263
Junior Member
|
Junior Member
Joined: Jun 2000
Posts: 263 |
Will do ------------------ Thanks for reading! Ilya Administrator of Ubb Code Hackers Hideout Moderator of UBB Hacks Finished
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|