![]() |
Nicer Greeting On NavBar
Ok i can't take too much credit for it, the original concept was by omgli3k back on the vb3 days i think and even then back at RC stages :o anyway as a thank you check out his site http://empathogen.net/
Onto the hack, this hack changes the greeting and it's all done automatically and sweetly. it takes your users timezone and gives a greeting dependant on that: "Good Morning, $username.", "Good Afternoon. $username." or "Good Evening, $username.". shweet huh ;) lol ok without further ado here you go. upload as a product. Thanks again to omgli3k for leading the way on this one :) |
Not working :( It doesn't show up
|
I like this
* christianb clicks install |
Quote:
|
Call to undefined function bcadd() error
|
Quote:
because bcadd is a stock function |
PHP Version 5.0.5
|
ouch at php5
ok could you try this make a php file (that's just a text file with a .php extention instead) with the contents being this PHP Code:
edit: heh i just noticed i'm running 5.0.4 on my localhost and it works there :( |
have you got a screenshot? will install this later thanx
|
Great hack, used to use this on my old VB3.0.1 way back when.
However, I found that i had to change a line in the code to keep the font smaller on the navbar. I changed this HTML Code:
<div style="padding: 0.5em;" nowrap="nowrap"> HTML Code:
<div class="smallfont"> |
i would suggest
HTML Code:
<div style="padding: 0.5em;" nowrap="nowrap" class="smallfont"> |
ah thay tidies it up a bit, thanks :)
|
Just one problem, it is 3PM here and it is still saying Goodmorning. Any thought?
|
Quote:
what's the server offset? and last but not least what's your personal usertime offset? |
/me installs
|
Quote:
|
What is the time cut off for saying good evening?
My server is in London, I'm on GMT at 11:10pm and set my profile to 12 hours in advance making it 11.10am and it still said good evening. However it worked fine when I went backwards 12 hours |
I uninstalled untill bugs fixed!
|
Quote:
|
One thing that doesn't make sense to me...
PHP Code:
in the fourth (or fifth depending on if you count the blank line): $ng_serveroffset |
Quote:
|
It seems sabe has made a typo :)
Try replacing that variable that christianb reported and see if that may fix your error - As for a call to an undefined function, not sure how that could be corrected :ermm: Chris |
Quote:
|
Great work, installed nice, works on the forum but now it doesn't show any greating in vBa portal.
|
Quote:
|
Quote:
|
tell me when you upload a fixed file cause i sytill getting the
Fatal error: Call to undefined function: bcadd() in global.php(356) : eval()'d code on line 49 |
Quote:
|
If I get a chance this morning, I may break the code and see what I can do.
PHP Code:
PHP Code:
PHP Code:
|
this installed fine, but no matter what time it is, all it says is good morning
Good Morning, Ice. You last visited: Today at 12:02 PM Private Messages: Unread 0, Total 545. |
What time was it when you saw the greeting?
|
This * might * fix it:
Find: PHP Code:
PHP Code:
This is what I have from working on it: PHP Code:
|
Quote:
Good Morning, Water. You last visited: Today at 01:03 PM Private Messages: Unread 0, Total 2 |
Here's my latest edits (in case someone else wants to try it):
I've somewhat modified the instructions: first off go to your navbar template and find: ============================================== <div style="padding: 0.5em;" nowrap="nowrap"> <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br /> ============================================== and replace that with <div style="padding: 0.5em;" nowrap="nowrap"> <strong>$ng_greeting</strong><br /> PHP Code:
|
nice work, christianb, i'll look that over as soon as i get a chance.
as for people with the bcadd() problem. ask your host to enable bcmath in your configuration. you can check if it's enabled or not via your phpinfo. |
still getting the error after Techs has installed php-bcmath-5.0.4-1mdk.i586.rpm on your server.
|
just a thought on the bcadd issue...
replacing this: PHP Code:
PHP Code:
Edit (forgot to remove ")") |
Update: The welcome changed today fro 'Good Morning' to 'Good Afternoon' only it was still morning do I changed 12 to 18 and 18 to 12 and I got the 'Good Morning' message. Will wait til later today or tomorrow to see if it changes correctly.
|
Only curiuos...
Where is the server in location to your website? If it is in a different time zone, this will have to be taken into consideration. |
It is in Japan
|
All times are GMT. The time now is 01:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|