Description:
Displays the welcome note depending on the time of day (You can add your own texts)
and
displays username with color of group
and
displays the text depending on the week day (You can add your own texts).
Author(s)/or Link: all4phone (I took advantage of an idea from 4seven's bbcode: Topic Viewer BBCode and from two others bbcodes: Quotes for every day and Greeting BBCode)
bbcode usage:
Code: Select all
[welcome][/welcome]
Code: Select all
<script type="text/javascript">d=new Date();time=d.getHours();if(time>5 && time<=11){document.write("Good morning!");}else if(time>=12 && time<18){document.write("Good afternoon!");}else if(time>=19 && time<=22){document.write("Good evening!");}else{document.write("Good night!");}</script> <strong>{L_TOPIC_VIEWER}</strong>, <SCRIPT LANGUAGE="JavaScript">
<!--
document.write()
now = new Date()
if (now.getDay() == 5)
document.write("finally friday ;)")
if (now.getDay() == 6)
document.write("you are not in a pub ? ;)")
if (now.getDay() == 0)
document.write("sunday rest :)")
if (now.getDay() == 1)
document.write("the beginning of week :|")
if (now.getDay() == 2)
document.write("what are you doing today ?")
if (now.getDay() == 3)
document.write("nice you spend your time ?")
if (now.getDay() == 4)
document.write("welcome on the board :)")
document.write()
//-->
</SCRIPT>
Code: Select all
[welcome][/welcome]
Code: Select all
[welcome][/welcome]
Open: language/en/viewtopic.php
Find:
Code: Select all
$lang = array_merge($lang, array(
Code: Select all
global $user;
Code: Select all
'TOPIC_VIEWER' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
Good evening! all4phone, sunday rest