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)

bayard88 01-22-2006 08:50 AM

works great for me, many thanks, sabret00the. ;)

Eagle Creek 01-22-2006 10:46 AM

Quote:

Originally Posted by christianb
on the line: $ng_hour = date('G');

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

Edited - went wrong direction.

So do I have to change this? Or is this wrong?

davidw 01-22-2006 12:53 PM

Try changing it to $ng_hour = date('G') - 1; and see if that works.

Originally I wrote + instead of -.

Eagle Creek 01-22-2006 01:04 PM

Quote:

Originally Posted by christianb
Try changing it to $ng_hour = date('G') - 1; and see if that works.

Originally I wrote + instead of -.

I will :).

davidw 01-24-2006 11:42 PM

Did this work?

Eagle Creek 01-25-2006 08:49 AM

Quote:

Originally Posted by christianb
Did this work?

Quote:

Good Afternoon, Eagle Creek.
All times are GMT +1. The time now is 11:48.
Guess not..

davidw 01-25-2006 11:29 AM

I'm thinking something here.

Can you paste here what code is listed where it says:

Code:

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

I want to see what actual code provides this statement.

Eagle Creek 01-25-2006 11:35 AM

Quote:

Originally Posted by christianb
I'm thinking something here.

Can you paste here what code is listed where it says:

Code:

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

I want to see what actual code provides this statement.

I don't understand? What code do I have to post?
The source from my webbrowser?

davidw 01-25-2006 02:47 PM

It's located in your navbar template. For example, the instructions suggest to replace a certain part of your navbar template with this code:

Code:

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

- I need to know what is listed 1-2 lines before and after that in the template.

Eagle Creek 01-25-2006 03:13 PM

Code:

        <if condition="$show['member']">
       
                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        $ng_greeting<br />
                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
                        <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
                </div>


davidw 01-25-2006 03:17 PM

What code are you using (and where) to produce this statement:

Code:

All times are GMT +1. The time now is 11:48.
I don't see it in the code you posted earlier, nor in this recent code from the navbar template.

Eagle Creek 02-07-2006 02:39 PM

Quote:

Originally Posted by christianb
What code are you using (and where) to produce this statement:

Code:

All times are GMT +1. The time now is 11:48.
I don't see it in the code you posted earlier, nor in this recent code from the navbar template.

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

What code exact do you want to view?

davidw 02-07-2006 03:28 PM

Whatever it is that produces the statement "All times are GMT +1. The time now is 17:38"
It sounds like it is working, but is off by an hour or two. We need to find out where the hour offset is coming from.

Raydar 02-08-2006 11:56 PM

Hi

The code we are supposed to remove is not in my navbar template.

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />


I have something similar to that code.


Code:

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


Is it safe to remove this code and add the hack even though it is slightly different?

Thanks

Reg

davidw 02-09-2006 01:32 AM

My suggestion on that would be to first copy this part to something like notepad or somewhere that is accessable and then remove the code and add the hack as you suggested. :) - The original code to be removed is from the default style I believe and your style, as mine, will differ. If it doesn't work, just replace what you removed with what you copied out. :)

AFMichael 02-09-2006 02:11 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.


This absolutely worked! Thanks very much!

Raydar 02-09-2006 04:40 AM

Thanks Christianb. Good Idea. Yeah it worked but the new font is larger than the original and looks strange.

Which part of the code should I modify to keep the same font sizes?

Thanks again

Reg

Luggruff 02-09-2006 08:26 AM

doesn't seem that you have updated the readme according to what has been written in this thread.

About the smallfont class on the <div style="padding: 0.5em;" nowrap="nowrap"> etc.

And since my code is:
PHP Code:

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

then this doesn't make any sence to me:

PHP Code:

<div style="padding: 0.5em;" nowrap="nowrap">
<
strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br /> 

or this:

PHP Code:

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

and I tried to replace the <phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br /> with $ng_greeting<br />, then uploading the plugin.. but all that happened was that my forum shut down and gave me the message:

Quote:

Fatal error: Call to undefined function: bcadd() in /home/virtual/hlforum.net/public_html/global.php(349) : eval()'d code on line 24
I've tested this:
PHP Code:

 <php

$ng_hour 
date('G');
$ng_now bcadd($ng_hour4);
$ng_result bcadd($ng_now5); 

?> 

..and get no error there.

Raydar 02-09-2006 10:23 AM

Hi Luggruf,

The install.txt document that came in the zip file for this download, says that this code is to be removed -

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

But I don't have matching code for that. I have this -

Code:

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

I may have slightly different code because I have a flashing gif image for when people receive private messages.

Once I removed that code and replaced it with this code which is the replacement code in the install.txt document that comes in the zip folder for this pluggin.

Code:

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

It seems to work but the font is larger. I want it to look the same as it did before. But I'm not sure what code needs to be changed to make the font the same size.

I don't get any error messages.

Also, I'm not sure what you mean by this code.

Code:

<php

$ng_hour = date('G');
$ng_now = bcadd($ng_hour, 4);
$ng_result = bcadd($ng_now, 5); 

?>

Thanks

Reg

Luggruff 02-09-2006 10:49 AM

Quote:

Originally Posted by Reg Car
Hi Luggruf,

The install.txt document that came in the zip file for this download, says that this code is to be removed -

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

But I don't have matching code for that. I have this -

Code:

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

I may have slightly different code because I have a flashing gif image for when people receive private messages.

Once I removed that code and replaced it with this code which is the replacement code in the install.txt document that comes in the zip folder for this pluggin.

Code:

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

It seems to work but the font is larger. I want it to look the same as it did before. But I'm not sure what code needs to be changed to make the font the same size.

I don't get any error messages.

Also, I'm not sure what you mean by this code.

Code:

<php

$ng_hour = date('G');
$ng_now = bcadd($ng_hour, 4);
$ng_result = bcadd($ng_now, 5); 

?>

Thanks

Reg


hmm, strange then.

Ahh, it was another user that wrote it:

Quote:

Originally Posted by sabret00the
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:

<php

$ng_hour 
date('G');
$ng_now bcadd($ng_hour4);
$ng_result bcadd($ng_now5); 

?> 

upload it and run it and tell me if you still get the undefined function error please.

edit: heh i just noticed i'm running 5.0.4 on my localhost and it works there :(


Raydar 02-09-2006 11:41 AM

Cool

Can anyone tell me wha the 0.5em in the code below does please?

Code:

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

Cheers

Luggruff 02-09-2006 11:50 AM

Quote:

Originally Posted by Reg Car
Cool

Can anyone tell me wha the 0.5em in the code below does please?

Code:

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

Cheers

sets the size of the padding.. it's the same as #px.. only another format

Sooner95 02-09-2006 12:24 PM

Works like a champ! Thx

Eagle Creek 02-09-2006 07:42 PM

Quote:

Originally Posted by christianb
Whatever it is that produces the statement "All times are GMT +1. The time now is 17:38"
It sounds like it is working, but is off by an hour or two. We need to find out where the hour offset is coming from.

But that's a normal vB function, build in.
I copy that indication from the bottom of my forum.

guvner 02-11-2006 03:53 AM

Quote:

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

Hi Amy - I used your code for this and whilst it works just fine - it seems to have affected the "You last visited" function on the line below the welcome - in other words the time of my last login only increments if I log out and back in again.

If I stay logged in - the time doesn't change, even though I might have been back and forth several times.

Any ideas?

Thanks - Mike :)

Saskia 02-11-2006 10:09 AM

This is a great hack! Thanks a lot for the great work. I had to use Amy's version, because it would say "Good Morning" at all times. I've added in a "Good Night" one for 12am-6am, if anyone's interested.

It's attached below.

Luggruff 02-11-2006 10:25 AM

haha ! It finally works! Thanks Saskia !
(dunno what's different with that xml file o_0)

davidw 02-11-2006 01:59 PM

Quote:

Originally Posted by Eagle Creek
But that's a normal vB function, build in.
I copy that indication from the bottom of my forum.

Have you tried Amy's version of the product to see if that fixes it - since her's uses a different approach than mine?

Sooner95 02-12-2006 03:26 PM

thank you Amy, applied your update as well and it works great now.

thelittleguy 02-15-2006 09:59 PM

Uhh yeah I downloaded this hack on my board once before but we ran into some server issues so we had to remove some hacks and I re downloaded the hack again and uploaded it and its stuck on good morning no matter the time I went through this tread and tried pretty much alll of the suggestions to fix it and noticed on this download only two lines of code for each section show and all the suggestions dont match any codes in this thread i have supplied a txt of the dl

davidw 02-15-2006 11:45 PM

You may want to find this:

$vbphrase[welcome_x]

and replace it with this:

$ng_greeting

Also, which (specifically) suggestions did you try - by post?

Eagle Creek 05-05-2006 01:08 PM

Quote:

Good Evening, Eagle Creek.
Alle tijden zijn GMT +2. De tijd is nu 16:06. (=4.04 PM)
Already???

A_N_K_A_R_A 06-24-2006 07:05 PM

very nice thanks

futuredood 06-28-2006 03:09 PM

how can we implement this in usercp?

sabret00the 08-20-2006 09:29 PM

Quote:

Originally Posted by futuredood
how can we implement this in usercp?

what do you mean?

LordDB 09-04-2006 01:32 AM

For v3.6 GOLD replace with this:

Code:

<td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase $ng_greeting<br />

Cheers!;)

steve1386 10-25-2006 11:59 AM

Is there a version of this for 3.6.2 please guys..

Saskia 01-01-2007 11:27 PM

The one Amy posted a couple pages back (and I posted a page back with a small edit) works fine on vB 3.6.x. I'm running 3.6.4 and it still works like a charm!

Quote:

Originally Posted by daPLAYBOY (Post 1067444)
For v3.6 GOLD replace with this:

Code:

<td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase $ng_greeting<br />

Cheers!;)

Actually, you got an error right there with an open phrase tag. :)

storpappa 02-16-2007 12:27 AM

Installed with the updated XMl from Saskia - thanks. I saw an update to this as code in style rather thena product, and rightly so got directed back to this mod.

Smoothie 02-16-2007 12:54 AM

I integrated this with the "Display Unread Posts" mod from Paul. :)


All times are GMT. The time now is 08:07 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.01474 seconds
  • Memory Usage 1,864KB
  • 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
  • (22)bbcode_code_printable
  • (5)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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