Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Nicer Greeting On NavBar Details »»
Nicer Greeting On NavBar
Version: 1.01, by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 11-16-2005 Last Update: 11-17-2005 Installs: 80
Uses Plugins Template Edits
 
No support by the author.

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 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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 01-25-2006, 03:17 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #133  
Old 02-07-2006, 02:39 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #134  
Old 02-07-2006, 03:28 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #135  
Old 02-08-2006, 11:56 PM
Raydar Raydar is offline
 
Join Date: Dec 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #136  
Old 02-09-2006, 01:32 AM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #137  
Old 02-09-2006, 02:11 AM
AFMichael AFMichael is offline
 
Join Date: Sep 2004
Location: Florida
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #138  
Old 02-09-2006, 04:40 AM
Raydar Raydar is offline
 
Join Date: Dec 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #139  
Old 02-09-2006, 08:26 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #140  
Old 02-09-2006, 10:23 AM
Raydar Raydar is offline
 
Join Date: Dec 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #141  
Old 02-09-2006, 10:49 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:38 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.13528 seconds
  • Memory Usage 2,339KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (14)bbcode_code
  • (5)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete