View Full Version : Forum Home Enhancements - Goodmorning/Goodafternoon/Goodevening Username
EnIgMa1234
02-12-2007, 10:00 PM
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:
<strong><phrase 1="$bbuserinfo">$vbphrase[welcome_x]</phrase></strong>
Replace With V.1:
<strong><phrase 1="$bbuserinfo"><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 [U]V.1.1
<strong><phrase 1="$bbuserinfo"><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
[U]I Will Only Give Support To Those That Click Install
[U]
V.3 - 80% Done
EnIgMa1234
02-13-2007, 03:33 PM
Reserved
Reeve of shinra
02-13-2007, 04:03 PM
This is cool. Thanks for sharing!
EnIgMa1234
02-13-2007, 04:04 PM
no problem. thanks for liking it :p
Noonster
02-13-2007, 04:14 PM
Can you make is only say good morning from 12am but before 12pm and then good afternoon from then till 6pm, then 6pm to 12am it would say good evening.
Making the full cycle??
EnIgMa1234
02-13-2007, 04:15 PM
yes i will release that soon in the next version
EnIgMa1234
02-13-2007, 04:42 PM
Can you make is only say good morning from 12am but before 12pm and then good afternoon from then till 6pm, then 6pm to 12am it would say good evening.
Making the full cycle??
its ready now
taydu
02-13-2007, 06:18 PM
which time does it use, the server time or the user time???
taydu
02-13-2007, 06:30 PM
:( not working for me, i'm using v.1.1
mamashid
02-13-2007, 06:34 PM
installed great! :)
EnIgMa1234
02-13-2007, 06:37 PM
which time does it use, the server time or the user time???
usertime
EnIgMa1234
02-13-2007, 06:40 PM
:( not working for me, i'm using v.1.1
please make sure you followed the steps correctly. try reinstalling it. if that doesnt work, could you pm me a link to you site & the code for the navbar your using
Jeordie015
02-13-2007, 10:13 PM
I know someone is going to request this, so it may as well be me.
How about making it so there's a period of time for "good morning," a period of time for "good afternoon," and a period of time for "good evening?" So like, from 6:00AM to 12:00AM, it would be "good morning." From 12:00AM to 5:00PM it would be "good afternoon." And from 5:00PM to midnight it would be "good evening." Or something like that. Making the times customizable in the admin CP would be cool too.
Smoothie
02-14-2007, 12:40 AM
I know someone is going to request this, so it may as well be me.
How about making it so there's a period of time for "good morning," a period of time for "good afternoon," and a period of time for "good evening?" So like, from 6:00AM to 12:00AM, it would be "good morning." From 12:00AM to 5:00PM it would be "good afternoon." And from 5:00PM to midnight it would be "good evening." Or something like that. Making the times customizable in the admin CP would be cool too.There's a mod, posted long before this one, that already does that.
TheBlackPoet
02-14-2007, 01:37 AM
that mode didnt work so well...... the one before this one... this one seems to work great... thanks for bringing this one out..
Smoothie
02-14-2007, 01:42 AM
that mode didnt work so well...... the one before this one... this one seems to work great... thanks for bringing this one out..If you link me I can tell which one it is. I have this one installed and it works great:
https://vborg.vbsupport.ru/showthread.php?t=100993&highlight=nicer+greeting
Snake
02-14-2007, 05:40 AM
Thanks, looks nice! :D
chkdgate
02-14-2007, 05:58 AM
Very nice mod. Thank you.
chkdgate
02-14-2007, 06:07 AM
I know someone is going to request this, so it may as well be me.
How about making it so there's a period of time for "good morning," a period of time for "good afternoon," and a period of time for "good evening?" So like, from 6:00AM to 12:00AM, it would be "good morning." From 12:00AM to 5:00PM it would be "good afternoon." And from 5:00PM to midnight it would be "good evening." Or something like that. Making the times customizable in the admin CP would be cool too.
This would be a great little update.
taydu
02-14-2007, 07:14 AM
Ok it's work now. But how come it still say welcome between 12 PM to 6 PM??
EnIgMa1234
02-14-2007, 10:29 AM
I know someone is going to request this, so it may as well be me.
How about making it so there's a period of time for "good morning," a period of time for "good afternoon," and a period of time for "good evening?" So like, from 6:00AM to 12:00AM, it would be "good morning." From 12:00AM to 5:00PM it would be "good afternoon." And from 5:00PM to midnight it would be "good evening." Or something like that. Making the times customizable in the admin CP would be cool too.
this is already done. its in v1.1 & product v.2
EnIgMa1234
02-14-2007, 10:29 AM
Ok it's work now. But how come it still say welcome between 12 PM to 6 PM??updating that now
JsnakeJ
02-14-2007, 02:04 PM
v1.2 product aint workin, i fixed it for you man. Its attatched
EnIgMa1234
02-14-2007, 02:21 PM
sorry i didnt have enough time to test this. thanks m8
JsnakeJ
02-14-2007, 02:31 PM
lol its just fixing your coding. Take a look at the code in both of em. In yours theres unclosed tags and unneeded ones.
I got errors importing yours so I did a little editing and now it works perfect.
chkdgate
02-14-2007, 05:05 PM
I'm getting errors on the update.
Robru
02-14-2007, 05:06 PM
XML Error: Mismatched tag at Line 20
chkdgate
02-14-2007, 05:34 PM
Line 20 didn't have < before: phrase name="goodafternoon_x"><![CDATA[Good Afternoon, {1}.]]></phrase>
Since fixing that I'm now getting an error on line 21. I'll wait until you update.
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="goodmorning" active="1">
<title>Goodmorning/Welcome Username V.2</title>
<description>Shows Good Morning In Navbar If It Is 12 O'Clock Or Under</description>
<version>1.1</version>
<url />
<versioncheckurl />
<dependencies>
</dependencies>
<codes>
</codes>
<phrases>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="goodmorning_x"><![CDATA[Good Morning, {1}.]]></phrase>
</phrasetype>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="goodevening_x"><![CDATA[Good Evening, {1}.]]></phrase>
</phrasetype>
<phrase name="goodafternoon_x"><![CDATA[Good Afternoon, {1}.]]></phrase>
</phrasetype>
</phrases>
</product>
EnIgMa1234
02-14-2007, 05:49 PM
updated
chkdgate
02-14-2007, 06:25 PM
Let me give it a second go around.
chkdgate
02-14-2007, 06:33 PM
It's not showing now.
Soliloquy
02-15-2007, 02:21 AM
XML Error: mismatched tag at Line 21
taydu
02-15-2007, 05:11 AM
for some reason the goodafternoon_x or afternoon_x (depend on which xml file you use) didn't get added to the phase manager. Go to the phase Manager and add goodafter_x of afternoon_x then it should be fine.
chkdgate
02-15-2007, 08:50 AM
XML Error: mismatched tag at Line 21
I got that too.
for some reason the goodafternoon_x or afternoon_x (depend on which xml file you use) didn't get added to the phase manager. Go to the phase Manager and add goodafter_x of afternoon_x then it should be fine.
Can we just get an update that corrects these issues?
EnIgMa1234
02-15-2007, 10:50 AM
its all working now. sorry about that. didnt have time to test. :D
chkdgate
02-15-2007, 11:12 AM
Now, that's what I call an update.:up:
EnIgMa1234
02-15-2007, 01:56 PM
thanks for installing. if you have any problems, dont be shy about asking me :D
Robru
02-15-2007, 02:46 PM
V1.1:
<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[afternoon_x]")
}
else
{
document.write("<b>$vbphrase[goodevening_x]")
}
</script></phrase></strong>
Find:
document.write("<b>$vbphrase[afternoon_x]")
Replace with:
document.write("<b>$vbphrase[goodafternoon_x]")
taydu
02-15-2007, 04:20 PM
Just curious why there is no </b> tag after goodafternoon and goodevening?
EnIgMa1234
02-15-2007, 04:21 PM
i'll add one in now
Soliloquy
02-15-2007, 05:03 PM
Installed; so far so good this time!
EnIgMa1234
02-15-2007, 05:13 PM
good :D
chkdgate
02-15-2007, 06:02 PM
That's good. For a second there, it wasn't working but then taydu's post fixed this problem. Thanks.
Charlie98902
02-15-2007, 06:54 PM
I never had a prior version installed so what do I need to do as I imported the xml and it installed with no change?
EnIgMa1234
02-15-2007, 06:57 PM
did you do the template changes?
chkdgate
02-15-2007, 07:06 PM
I never had a prior version installed so what do I need to do as I imported the xml and it installed with no change?
Just perform the Navbar template mod from above and you're done.
rjmjr69
02-16-2007, 06:56 AM
Very easy install works just fine in 3.6.4 with tons of mods.... Thanks
WEBDosser
02-16-2007, 07:32 AM
Nice hack..
Tralala
02-16-2007, 01:14 PM
Nice mod!
/clicks install
Note, if you want to make this greeting clickable, so it takes the user to their profile, then in the navbar template put
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">
right before
<phrase 1="$bbuserinfo[username]"><script type="text/javascript">
EnIgMa1234
02-16-2007, 02:01 PM
what would everyone like to see in the next version of this?
chkdgate
02-16-2007, 02:21 PM
Note, if you want to make this greeting clickable, so it takes the user to their profile, then in the navbar template put
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">
right before
<phrase 1="$bbuserinfo[username]"><script type="text/javascript">
Thank you for this little add on
what would everyone like to see in the next version of this?
Most definitely!
EnIgMa1234
02-16-2007, 02:24 PM
i was thinking of using vbulletin options too
chkdgate
02-16-2007, 02:30 PM
Is there a way to where we can have this show the message on line 1 then the last log in information on line 2 and finally the PM info on line 3? It just looks too long. See screen cap below.
EnIgMa1234
02-16-2007, 02:58 PM
just add <br /> after the template edit
chkdgate
02-16-2007, 03:23 PM
Nice mod!
/clicks install
Note, if you want to make this greeting clickable, so it takes the user to their profile, then in the navbar template put
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">
right before
<phrase 1="$bbuserinfo[username]"><script type="text/javascript">
Any way to just make the greeting and username clickable instead of the entire line that also includes the last login info?
Tralala
02-16-2007, 05:00 PM
what would everyone like to see in the next version of this?
-Admin prefs to change the actuall text of each of the greetings
-Admin prefs to change the times they are invoked
-Three graphics to associate: bright sun, medium sun (?) and moon
I'd also like the greeting to be a separate phrase on it's own in the xml (distinct from the username which would reside in the navbar template.) That way I could make just the username itself clickable, and not the entire line, or make it bolder or a different size or color or whatever.
EnIgMa1234
02-16-2007, 05:51 PM
yes i will do that
Tralala
02-16-2007, 05:53 PM
sweet!
chkdgate
02-16-2007, 07:45 PM
-Admin prefs to change the actuall text of each of the greetings
-Admin prefs to change the times they are invoked
-Three graphics to associate: bright sun, medium sun (?) and moon
I'd also like the greeting to be a separate phrase on it's own in the xml (distinct from the username which would reside in the navbar template.) That way I could make just the username itself clickable, and not the entire line, or make it bolder or a different size or color or whatever.
These are some great suggestions!
Rickeo
02-16-2007, 08:18 PM
This is one sweet mod works fine on this end
apiasto
02-19-2007, 06:34 AM
how can i get v 1.2 need that good after noon please
Tralala
02-19-2007, 12:47 PM
-Admin prefs to change the actuall text of each of the greetings
Along these lines, I'd like to see a Admin pref for a "temporary override" ... so, for example, I could type in "Merry Christmas!" on December 25. Give that temporary override an expiration date, so it knows when to resume with the normal greetings, and you got yourself a winner. Maybe even a Mod of the Month. :)
Add a bunch of customizable fields with start/end dates, and we can pre-fill them up with upcoming holidays!
EnIgMa1234
02-19-2007, 01:02 PM
yes thats a good idea. i will look into it
Tralala
02-19-2007, 01:33 PM
yes thats a good idea. i will look into it
Thanks! Would be nice way to celebrate holidays... I thought of it because today is President's Day.
:)
EnIgMa1234
02-21-2007, 12:21 PM
i am starting this project today
EnIgMa1234
02-21-2007, 03:53 PM
this project is nearly ready. just gotta fix 1 or 2 big problems
rjmjr69
02-21-2007, 07:03 PM
this project is nearly ready. just gotta fix 1 or 2 big problems
SWEET. I already have the original installed but with all these new features I can't wait till your done... Great work. I also would like the order of the lines changed and all these suggestions are awesome. custom text for holidays and such would be awesome. And admin control over it all via the cp would be great too
Tralala
02-22-2007, 07:15 PM
this project is nearly ready. just gotta fix 1 or 2 big problems
Excellent, EnIgMa1234... happy to hear you liked my suggestions. If you'd like me to test anything, feel free to let me know. :)
apiasto
02-28-2007, 03:41 PM
ok found the problem it was in navbar temp. working great thnx
EnIgMa1234
03-01-2007, 04:24 PM
my computer is broken so i will be finishing v3 when i get my computer back
chkdgate
03-02-2007, 05:28 PM
Has anyone tried it with 3.6.5 yet?
EnIgMa1234
03-04-2007, 02:49 PM
it works with 3.6.5
EnIgMa1234
03-04-2007, 03:36 PM
i have finally gotten around to release the new version
https://vborg.vbsupport.ru/showthread.php?t=141120
karabaja3
05-08-2008, 03:40 PM
anything for 3.7.0.?
Kinneas
05-09-2008, 10:13 AM
I have modified this for 3.7 :)
Find:
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
Replace with:
<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 < 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 />
You also need to edit the Phrases for Goodmorning_x, Goodafternoon_x and Goodevening_x, like so
Good Morning, {1}.
change to
Good Morning, <a href={2}>{1}</a>.
Obviously repeat this with the other 2.
ArjanU
06-07-2008, 07:54 AM
Is there an option to make:
Goodmorning
Goodafternoon
Goodevening
Goodnight?
Here in Europe we use Goodmorning from 06.00AM till 12.00, Goodafternoon from 12.00 till 06.00PM, Goodevening from 06.00PM till 0.00AM and Goodnight from 0.00 till 06.00AM
When it is 0.05AM there is standing Goodmorning, it is better here to say Goodnight :)
Thanks!
Welshy2008
08-08-2008, 04:36 PM
Brilliant - Thank You.
Welshy2008
08-08-2008, 06:02 PM
Slight Problem - Since adding this Hack - I have lost the "email" thingy under the usernames...
Please see attachment....
Welshy2008
08-08-2008, 06:10 PM
This has only happened on my account (Admin) and another account (Super Admin).
Welshy2008
08-09-2008, 09:24 AM
It has re-appeared on the Admin account. But NOT on the SuperAdmin account.
Does anyone know what is going on?
Outbackmark
10-06-2008, 02:19 AM
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
<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 /> <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&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
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.
SirFlash
10-13-2008, 12:20 AM
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):
<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:
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
and Replace with:
<!-- 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! :D
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!
Welshy2008
02-06-2009, 08:09 AM
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.
SirFlash
10-12-2009, 12:29 AM
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!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.