vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - Goodmorning/Goodafternoon/Goodevening Username (https://vborg.vbsupport.ru/showthread.php?t=139312)

EnIgMa1234 02-12-2007 10:00 PM

Goodmorning/Goodafternoon/Goodevening Username
 
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

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

Quote:

Originally Posted by Noonster (Post 1181613)
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

Quote:

Originally Posted by taydu (Post 1181713)
which time does it use, the server time or the user time???

usertime

EnIgMa1234 02-13-2007 06:40 PM

Quote:

Originally Posted by taydu (Post 1181722)
:( 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

Quote:

Originally Posted by Jeordie015 (Post 1181885)
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

Quote:

Originally Posted by TheBlackPoet (Post 1181981)
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/showthrea...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

Quote:

Originally Posted by Jeordie015 (Post 1181885)
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

Quote:

Originally Posted by Jeordie015 (Post 1181885)
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

Quote:

Originally Posted by taydu (Post 1182160)
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:
PHP Code:

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.

PHP Code:

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

Code:

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

Quote:

Originally Posted by Soliloquy (Post 1182939)
Code:

XML Error: mismatched tag at Line 21

I got that too.

Quote:

Originally Posted by taydu (Post 1183003)
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:

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[afternoon_x]")
}
else
{
document.write("<b>$vbphrase[goodevening_x]")
}
</script></phrase></strong>

Find:

Code:

document.write("<b>$vbphrase[afternoon_x]")
Replace with:

Code:

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


All times are GMT. The time now is 06:08 PM.

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.01360 seconds
  • Memory Usage 1,826KB
  • 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
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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