vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Nicer Greeting On NavBar (https://vborg.vbsupport.ru/showthread.php?t=100993)

Vizionz 11-23-2005 11:16 PM

that one is - 8 instead of +8

C_P 11-23-2005 11:20 PM

Good Morning, CP even after logging out and then in. I am soooo sorry man. I do not know.

Vizionz 11-23-2005 11:21 PM

me either i tried all the fixes in this thread different times + and minus i would just uninstall it till somneone else has a clue why i am sorry i tried all i could

C_P 11-23-2005 11:25 PM

You did more than try! Thank you very much for the personal service but not sure what the issue is. I know you are probably wondering if I really did remove, and upload each new one and I did allowing to overwrite each time just in case. T o prove it, here is the file I upped last:

C_P 11-24-2005 01:33 AM

Vizionz you are a master helper! After multiple tries we got it!
Back to clicking install! This is great!

Vizionz 11-24-2005 01:42 AM

glad i could help now offf to see the wizard the wizard of sleep

C_P 11-25-2005 01:20 AM

Well, unfortunately, it said Good Evening all day long and now in evening on this hack and never changed from Good Evening, CP :(

amykhar 11-25-2005 02:13 AM

I'm going to share the one I'm testing on my board now. (I was always getting good morning too with this one)

Mine is very simple code.

First, it gets the user's time.
Code:

$nghourdiff = $vbulletin->options['hourdiff'];
$ng_time = TIMENOW -$nghourdiff;

Then, it gets it as the hour in a 24 hour format
Code:

$ng_result = date('G',$ng_time);
Then, it goes on to figure out if this is morning, afternoon or night.

The product is attached.

C_P 11-25-2005 02:32 AM

Amy, I uninstalled and installed yours and right away it shows (with a little text addition):
Welcome Back & Good Evening, CP
Considering my time time now is 08:30 PM .... it looks like yours may rock from the start as do most of your excellent modifications (I do not like to call them hacks because it devalues all you coders hard work) on my site!!

*I'll update this in the morning to know for sure..

amykhar 11-25-2005 02:41 AM

I should know in about 15 minutes if it's working. It's about to be midnight here. I'm crossing my fingers :)

C_P 11-25-2005 02:53 AM

I'll await your word..

amykhar 11-25-2005 03:02 AM

It's saying good morning now.

C_P 11-25-2005 03:05 AM

I rest my case, You Rock!
I'll let ya know tomorrow on my site but I am sure Amy, your products never seem to fail me!

MThornback 11-25-2005 11:58 AM

Quote:

Originally Posted by amykhar
It's saying good morning now.


Amy thanks :) saved me from losing this...cause I really liked it :D

and thanks to sabret00the for the concept :D

Detomah 11-25-2005 12:46 PM

Quote:

Originally Posted by amykhar
I'm going to share the one I'm testing on my board now. (I was always getting good morning too with this one)

Working perfectly for me now. :)

C_P 11-25-2005 04:37 PM

Quote:

Originally Posted by C_P
I rest my case, You Rock!
I'll let ya know tomorrow on my site but I am sure Amy, your products never seem to fail me!

Well Amy as suspected......
I worked like a Charm!
A nice Welcome Back & Good Morning, CP was there to say hello this morning to me!
*Is there a addition you could add to include knowing what day of the week it is for the user as well? This way, it would display things like T.G.I.F for Fridays, and Happy Hump Day for Wednesdays, and Monday morning back to work, and Saturday time to play, etc?

amykhar 11-25-2005 06:48 PM

That's easy. You would just need to do a
Code:

$ng_day = date('l',$ng_time);
After the
Code:

$ng_result = date('G',$ng_time);
and use
Code:

$ng_day
in the template.

Amy

C_P 11-25-2005 11:36 PM

Thanks very much for the reply and how to but I better wait for the pros to do that modification with the xml as I am excellent at screwing things up and terrible at implimenting.
I do have a question Amy, my navbar shows Good Afternoon, CP and the time now is 05:35 PM. Shouldn't the 5 pm time turn it to Good Evening?

C_P 11-26-2005 12:06 AM

6 pm looks like when evening announcement kicks in..

Noonster 12-08-2005 08:15 AM

In the install it says:
Code:

                                        <div style="padding: 0.5em;" nowrap="nowrap">
                                                $ng_greeting<br />

But all I can find thats similar is:
Code:

                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

Any ideas?? Thanks!

davidw 12-08-2005 09:52 AM

The second part is supposed to be replaced by the first part.

sabret00the 12-09-2005 11:48 AM

Quote:

Originally Posted by amykhar
I'm going to share the one I'm testing on my board now. (I was always getting good morning too with this one)

Mine is very simple code.

First, it gets the user's time.
Code:

$nghourdiff = $vbulletin->options['hourdiff'];
$ng_time = TIMENOW -$nghourdiff;

Then, it gets it as the hour in a 24 hour format
Code:

$ng_result = date('G',$ng_time);
Then, it goes on to figure out if this is morning, afternoon or night.

The product is attached.

you should release it amy, i'll redirect everyone from here to your thread.

Noonster 12-09-2005 07:53 PM

Quote:

Originally Posted by christianb
The second part is supposed to be replaced by the first part.

Sorry not following you ??

Noonster 12-09-2005 08:02 PM

^^ Forget the above sorted it....

Installed - great :D

davidw 12-09-2005 08:03 PM

:D good

Devil Woman 01-11-2006 11:50 AM

is there a way to get this to work with 3.5.2 as the code i have to look for to replace is different to what says in the template navbar

Thanks

Club3G 01-12-2006 03:10 PM

Quote:

Originally Posted by Vizionz
thanks that worked :)

i attached the fixed version for bcad

That's working on 3.5.3. Thanks to all. :)

[high]* Club3G clicks install[/high]

amykhar 01-12-2006 03:31 PM

Quote:

Originally Posted by sabret00the
you should release it amy, i'll redirect everyone from here to your thread.

Go ahead and take it Saber. :) It's just your hack with a bug fix.

Amy

Club3G 01-12-2006 08:30 PM

Eep, I spoke too soon.

It's working great on my forums, but on my portal, there's nothing there at all.

(Searched this thread for "portal", didn't see a fix).

Club3G 01-15-2006 02:33 AM

Uninstalling. Great mod, but no portal support is no good.

Masked Crusader 01-16-2006 08:35 PM

Alright, having a problem here. All I can get the mod to do is state "Good Morning, [Username]"...what am I do wrong? It does not change at ALL!

Club3G 01-16-2006 09:37 PM

Quote:

Originally Posted by shanejeffery86
Alright, having a problem here. All I can get the mod to do is state "Good Morning, [Username]"...what am I do wrong? It does not change at ALL!

Read the whole thread.

https://vborg.vbsupport.ru/showpost....6&postcount=88

https://vborg.vbsupport.ru/showpost....8&postcount=51

Eagle Creek 01-20-2006 08:59 AM

Hi!

I installed it, I like it. But.. It doesn't seem to work very well. At about 11 am it says 'good afternoon' and it says already 'good evening' at , about, 4 pm..

So it doesn't fits with the time. Is this a setting to be made?

davidw 01-20-2006 10:40 AM

Is your sever time different than your board's time? If so, you'll need to compensate +/- 1 or 2 hours depending on the time difference.

Eagle Creek 01-20-2006 10:42 AM

Quote:

Originally Posted by christianb
Is your sever time different than your board's time? If so, you'll need to compensate +/- 1 or 2 hours depending on the time difference.

No it isn't. The server and the board are both on GMT+1, DTS automatic.
But I'll check the server time, just to be sure.

davidw 01-20-2006 10:50 AM

One reason I ask is that one time I noticed that my server time was reporting a 2 hour difference although they were both located in the same room. Another time I had a 1 hour difference before that because the server was located in Canada (GMT-5) and I was in central US (GMT-6).

Eagle Creek 01-21-2006 02:11 PM

Look:

Good Evening, Eagle Creek.
All times are GMT +1. The time now is 17:11.

In my opinion you start to say evening when it's + 6.PM//18.00 hour.

davidw 01-21-2006 03:13 PM

What do you have in your xml file? Can you paste that here?

Eagle Creek 01-21-2006 11:47 PM

Quote:

Originally Posted by christianb
What do you have in your xml file? Can you paste that here?

What do I have to post exactly?

Quote:

// Nicer Greeting On NavBar

$ng_tz_serveroffset = $vbulletin->options['timeoffset'];
$ng_tz_useroffset = $vbulletin->userinfo['timezoneoffset'];

$ng_hour = date('G');
$ng_now = bcadd($ng_hour, $ng_tz_serveroffset);
$ng_result = bcadd($ng_now, $ng_tz_useroffset);

$ng_greeting = "<strong>" . $vbphrase[ng_goodevening] . " " . $vbulletin->userinfo[username] . ".</strong>";

if ($ng_result < 18)
{
$ng_greeting = "<strong>" . $vbphrase[ng_goodafternoon] . " " . $vbulletin->userinfo[username] . ".</strong>";
}

if ($ng_result < 12)
{
$ng_greeting = "<strong>" . $vbphrase[ng_goodmorning] . " " . $vbulletin->userinfo[username] . ".</strong>";
}
// Nicer Greeting On NavBar

davidw 01-22-2006 12:08 AM

on the line: $ng_hour = date('G');

try changing it to: $ng_hour = date('G') - 1;

Edited - went wrong direction.


All times are GMT. The time now is 08:35 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
  • Page Generation 0.01400 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete