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

Reply
 
Thread Tools
Goodmorning/Goodafternoon/Goodevening Username Details »»
Goodmorning/Goodafternoon/Goodevening Username
Version: 1.2, by EnIgMa1234 EnIgMa1234 is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.4 Rating:
Released: 02-12-2007 Last Update: 02-14-2007 Installs: 89
Uses Plugins Template Edits
 
No support by the author.

Dont Copy This Hack

Description: This Will Add A Good Morning $username To Replace The Welcome $username If The Time Is 12:00PM To 11:59AM. If It Isnt In These Times, It WIll Have The Usual Welcome phrease

3 New Phrases
1 Template Edit

Install:

Find In Navbar:
Code:
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>

Replace With V.1:
Code:
<strong><phrase 1="$bbuserinfo[username]"><script type="text/javascript">
var d = new Date()
var time = d.getHours()

if (time < 18) 
{
document.write("<b>$vbphrase[goodmorning_x]</b>")
}
else 
{
document.write("<b>$vbphrase[welcome_x]")
}
</script></phrase></strong><br />
OR For V.1.1
Code:
<strong><phrase 1="$bbuserinfo[username]"><script type="text/javascript">
var d = new Date()
var time = d.getHours()

if (time < 12) 
{
document.write("<b>$vbphrase[goodmorning_x]</b>")
}
else if (time>=12 && time<18) 
{
document.write("<b>$vbphrase[goodafternoon_x]</b>")
}
else
{
document.write("<b>$vbphrase[goodevening_x]</b>")
}
</script></phrase></strong><br />
Then: Import The Product

History
- V.1.0 Released
- V1.1 Added Good Evening
- V1.2 Added New Phrase - Good Afternoon X

Future Developments
- Cache Template

Upgrading From V.1.1 => V.1.2
Reimport The Product - Overwrite Set To Yes
Redo The Template Edit

I Will Only Give Support To Those That Click Install

V.3 - 80% Done

Show Your Support

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

Comments
  #82  
Old 10-06-2008, 02:19 AM
Outbackmark's Avatar
Outbackmark Outbackmark is offline
 
Join Date: Jun 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have just installed this on a couple of 3.6.11 forums and had to fiddle a bit as some hacks that place info in this area of the navbar hook onto the {welcome_x} phrase will be affected by the template edit.
I lost my New Posts since last visit and had to do the following

Code:
<if condition="$show['member']">
	
		<td class="alt2" valign="top" nowrap="nowrap">
		<div class="smallfont">
			<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]
			<br />
      <script type="text/javascript">
var d = new Date()
var time = d.getHours()

if (time < 12) 
{
document.write("<b>$vbphrase[goodmorning_x]</b>")
}
else if (time>=12 && time<18) 
{
document.write("<b>$vbphrase[goodafternoon_x]</b>")
}
else
{
document.write("<b>$vbphrase[goodevening_x]</b>")
}
</script></phrase></strong><br />&nbsp;<if condition="$showinvisiblemode"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/<if condition="!$invisiblemode">in</if>visible.gif" alt="$vbphrase[ajax_invisible_mode]" onclick="requestMarkData('index.php?{$session[sessionurl]}do=doinvisiblemode&amp;userid={$invisiblemodeuser}','parseMark',this)" /></if><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>
			<if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>
		</div>
		</td>
		
	<else />
It now says
Quote:
Welcome, outbackmark.
2 New Posts since your last visit.
Good Afternoon, outbackmark.
You last visited: Today at 11:18 AM
Private Messages: Unread 0, Total 576.
Reply With Quote
  #83  
Old 10-13-2008, 12:20 AM
SirFlash's Avatar
SirFlash SirFlash is offline
 
Join Date: Feb 2007
Location: Canada
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I feel that saying "Good Evening" or even "Good Night" isn't appropriate for the hours between 12:00am and 05:00am, because: "Good evening" shouldn't refer to the early AM hours - that's simply not etymologically correct. If someone logs in to your forum at 1:00 am and you tell them "Good night!" it sounds like you're telling them to have a good night's sleep, as people normally say before they go to bed and close down for the day. I prefer a more welcoming term for the early AM caffeine-empowered individuals. 12-5am is a period I prefer to tell people "Good Early Morning"!

So I took the liberty of editing this hack so that it reads "Good Early Morning, Username", in which 'Username' will link to the member/users' profile page.

3-STEP INSTALLATION INSTRUCTIONS:

1) Upload the file product_goodmorning_welcome_v2.xml to your /includes/xml/ directory.

2) Go to your AdminCP / Manage Products / and click "Add/Import Product", and Import the XML File from your server, enter: ./includes/xml/product_goodmorning_welcome_v2.xml

and click import. Be sure to select "allow overwrite" if you have already installed this product.

3) Template Edit:

Go to AdminCP / Style Manager / Edit Templates (from the drop-down menu) / Navigation Breadcrumb Templates / navbar

Edit the "navbar" template

Find (for 3.6 and maybe 3.7 vbulletin versions):
Quote:
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>
OR if you are using a later 3.7 or 3.8 version of vbulletin, find this instead:

Quote:
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
and Replace with:
Quote:
<!-- START Welcome User Edit -->
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]"><script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time>=0 && time<=5)
{
document.write("<b>$vbphrase[goodearlymorning_x]</b>")
}
else if (time>=5 && time<12)
{
document.write("<b>$vbphrase[goodmorning_x]</b>")
}
else if (time>=12 && time<18)
{
document.write("<b>$vbphrase[goodafternoon_x]</b>")
}
else
{
document.write("<b>$vbphrase[goodevening_x]</b>")
}
</script></phrase></strong><br />

<!-- END Welcome User Edit -->
Done!

I have tested this hack on vb 3.6.x, 3.7.x, and am currently running it on vb3.8 BETA - it works on all of these. Enjoy!
Reply With Quote
  #84  
Old 02-06-2009, 08:09 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this on my 3.6.8 board.

I am upgrading it to a 3.8.1 at the weekend. Will this work on it please? I don't want to lose this fantastic add-on.
Reply With Quote
  #85  
Old 10-12-2009, 12:29 AM
SirFlash's Avatar
SirFlash SirFlash is offline
 
Join Date: Feb 2007
Location: Canada
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welchy - I just installed this modification with my modification to it so that it also says "Good Early Morning" (posted above your post) on vb 3.8.4 PL1, and it works perfectly.

Mind you, I installed my modification (the post above yours), the code difference between my modification of this modification shouldn't be an issue though, I'm pretty sure it'll work perfectly whichever hack you wish to use (the post before yours or the author's original release). Enjoy!
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 10:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04467 seconds
  • Memory Usage 2,256KB
  • Queries Executed 19 (?)
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
  • (4)bbcode_code
  • (4)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
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_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