inherit
140147
0
Feb 18, 2019 1:59:12 GMT -8
nscalerr
Avast me 'earties. I be the Pirate King. Arrrrr
1,408
May 2009
nscalerr
Salad
Cheesecake
|
Post by nscalerr on Feb 11, 2019 20:06:44 GMT -8
Forum URL: support.proboards.com/Just noticed a greetings message next to my username in Scott's(?) 'Life's a beach" theme and was wondering if it was a plugin or just a simple script and how it was done??
|
|
inherit
249320
0
Feb 17, 2019 21:23:10 GMT -8
ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ
beans on toast
123
September 2017
noodlestars
|
Post by ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ on Feb 11, 2019 20:29:22 GMT -8
hey nscalerr , it looks like he's just gone admin > themes > layout templates > forum wrapper and edited lines 44-51ish (on the default skin at least). i imagine line 50 looks something like:
<span>jhgdfjskh welcome message here $[current_user.name].</span> $[logout_link] the same sort of idea applies for the welcome guest part, which would be line 45-47 on default.
|
|
inherit
140147
0
Feb 18, 2019 1:59:12 GMT -8
nscalerr
Avast me 'earties. I be the Pirate King. Arrrrr
1,408
May 2009
nscalerr
Salad
Cheesecake
|
Post by nscalerr on Feb 11, 2019 21:04:59 GMT -8
Only the message changes depending on the time of day. We will see when he comes in to the office. 
|
|
inherit
249320
0
Feb 17, 2019 21:23:10 GMT -8
ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ
beans on toast
123
September 2017
noodlestars
|
Post by ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ on Feb 11, 2019 21:20:05 GMT -8
ahh didn't know that. honestly not sure in that case, probably uses script of some sort (i'm not aware of a time variable although it could exist?)
|
|
#e61919
224482
0
1
Feb 18, 2019 12:56:46 GMT -8
Scott
It's Thumb Appreciation Day! - Obviously I give this holiday a thumbs up.
12,268
August 2015
socalso
|
Post by Scott on Feb 12, 2019 5:00:59 GMT -8
nscalerr , lol was wondering if anyone was using my theme and noticed this. It's a script I added to the Forum Wrapper layout template. It changes the message based on the time (hourly). Look for this line: <span>Welcome $[current_user.name].</span> $[logout_link]
Remove the Welcome but leave the "space" so it looks like this: <span> $[current_user.name].</span> $[logout_link]
And literally right before the opening <span> tag, add this script: <script type="text/javascript"> document.write("<span>"); var day = new Date(); var hr = day.getHours(); if (hr == 1) {document.write("Do you ever sleep");} if (hr == 2) {document.write("Do you ever sleep");} if (hr == 3) {document.write("Are you a vampire");} if (hr == 4) {document.write("So you up early or late");} if (hr == 5) {document.write("You know the sun ain't up yet");} if (hr == 6) {document.write("You're up early");} if ((hr == 7) || (hr == 8) || (hr == 9)) {document.write("Good Morning!");} if (hr == 10) {document.write("Time for a morning break");} if (hr == 11) {document.write("Good Morning!");} if (hr == 12) {document.write("Don't forget to grab lunch");} if (hr == 13) {document.write("Good afternoon");} if (hr == 14) {document.write("Take a break and stretch");} if ((hr == 15) || (hr == 16)) {document.write("Good Afternoon!");} if ((hr == 17) || (hr == 18) || (hr == 19) || (hr == 20) || (hr == 21) || (hr == 22)) {document.write("Good Evening");} if (hr == 23) {document.write("Wow you're up late");} if (hr == 0) {document.write("Psst, it's past midnight");} document.write("</span>"); </script> The script is pretty straightforward so you should be able to adjust the message and times as desired. Let me know if you have any questions. Enjoy!
|
|
inherit
140147
0
Feb 18, 2019 1:59:12 GMT -8
nscalerr
Avast me 'earties. I be the Pirate King. Arrrrr
1,408
May 2009
nscalerr
Salad
Cheesecake
|
Post by nscalerr on Feb 12, 2019 6:57:53 GMT -8
Installed and working well. Changed two of the messages. 
|
|