inherit
140147
0
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
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
Sept 16, 2019 17:45:18 GMT -8
ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ
beans on toast
125
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
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
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
Sept 16, 2019 17:45:18 GMT -8
ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ
beans on toast
125
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
Support Staff
224482
0
Member is Online
1
Mar 28, 2024 12:17:00 GMT -8
Scott
23,130
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
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Feb 12, 2019 6:57:53 GMT -8
Installed and working well. Changed two of the messages.
|
|
Violette
Full Member
Chocolate Makes My Day
Posts: 901
inherit
199370
0
Sept 2, 2013 10:32:50 GMT -8
Violette
Chocolate Makes My Day
901
September 2013
violette
|
Post by Violette on Mar 2, 2019 3:39:10 GMT -8
Help Scott! I tried this on a forum and I got a blank screen and I cannot logout or do anything with the forum. I did something wrong.
Can the forum be restored?
Thanks,
Violette
|
|
inherit
140147
0
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Mar 2, 2019 3:44:50 GMT -8
|
|
Violette
Full Member
Chocolate Makes My Day
Posts: 901
inherit
199370
0
Sept 2, 2013 10:32:50 GMT -8
Violette
Chocolate Makes My Day
901
September 2013
violette
|
Post by Violette on Mar 2, 2019 3:53:32 GMT -8
nscalerr, you are a lifesaver! Got it back! Thank you so much! Big hug for helping me!
|
|
inherit
140147
0
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Mar 2, 2019 4:05:10 GMT -8
Big hugs back Violette. Now this is what the relevant part of the default template should look like after adding in the script. <p id="welcome"> {if !$[current_user.is_member]} Welcome Guest. {if $[login_link] || $[register_link]} Please $[login_link]{if $[login_link] && $[register_link]} or {/if}$[register_link]. {/if} {else} <script type="text/javascript"> /* Greetings script */ document.write("<span>"); var day = new Date(); var hr = day.getHours(); if (hr == 0) {document.write("The Witching Hour");} if (hr == 1) {document.write("You survived the Witching Hour");} 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 very early");} if (hr == 7) {document.write("It's still early");} if (hr == 8) {document.write("Good morning");} if (hr == 9) {document.write("Don't be late");} if (hr == 10) {document.write("Time for a morning break");} if (hr == 11) {document.write("Morning");} if (hr == 12) {document.write("Good afternoon");} if (hr == 13) {document.write("Don't forget to grab lunch");} if (hr == 14) {document.write("Afternoon");} if (hr == 15) {document.write("Take a break and stretch");} if (hr == 16) {document.write("Afternoon tea time");} if (hr == 17) {document.write("It's happy hour");} if (hr == 18) {document.write("Good evening");} if (hr == 19) {document.write("Dinner time");} if (hr == 20) {document.write("Time to relax");} if (hr == 21) {document.write("The night is still young");} if (hr == 22) {document.write("Time for bed");} if (hr == 23) {document.write("You're up late");} document.write("</span> —"); </script><span> $[current_user.name].</span> $[logout_link] {/if} </p>
|
|
Violette
Full Member
Chocolate Makes My Day
Posts: 901
inherit
199370
0
Sept 2, 2013 10:32:50 GMT -8
Violette
Chocolate Makes My Day
901
September 2013
violette
|
Post by Violette on Mar 2, 2019 7:16:06 GMT -8
Thank you for posting that code. I'll try that on a different test forum. My Violette's Notebook is too important to me to be trying out new codes. Appreciate your help so much, Nscalerr 🐺. Love the code...I can see it on the Beach theme. I switched from the green one to the beach one. The code is pretty neat.
|
|
inherit
133488
0
Mar 27, 2024 11:49:58 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2019 16:40:31 GMT -8
I was wondering if some one could help me. This is what I have done.
<!DOCTYPE HTML> $[tag.html.open] <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>$[title] | $[forum.name]</title> $[head] </head> <body> {if $[maintenance_mode]} <div class="maintenance-header"> {if $[can.disable_maintenance]}<p>Finished with maintenance? $[disable_maintenance_link].</p>{/if} </div> {/if} <div id="wrapper"> <header> <div id="banner-container" role="banner"> <h2 id="banner"> $[forum.title] </h2> </div> <a id="navigation-skip" href="#content" accesskey="s" class="aria-hidden" title="Skip Navigation">Skip Navigation</a> <a href="#" accesskey="d" title="Open Menu" onclick="proboards.hotkeys.activate(Keys.d); return false;"></a> <div id="navigation-menu" class="ui-helper-clearfix"> <ul role="navigation"> {foreach $[navigation.menu]} <li> <a{if $[navigation.menu.active]} class="state-active"{/if} href="$[navigation.menu.href]"{if $[navigation.menu.accesskey]} accesskey="$[navigation.menu.accesskey]"{/if}> $[navigation.menu.name] {if $[navigation.menu.notification.total]} <div class="tip-holder" onclick="window.location='$[navigation.menu.notification.href]'; return false;"> <div class="tip-number">$[navigation.menu.notification.total]</div> <span class="tip"></span> </div> {/if} </a> </li> {/foreach} </ul> <p id="welcome"> {if !$[current_user.is_member]} Welcome Guest. {if $[login_link] || $[register_link]} Please $[login_link]{if $[login_link] && $[register_link]} or {/if}$[register_link]. {/if} {else} <script type="text/javascript"> /* Greetings script */ document.write("<span>"); var day = new Date(); var hr = day.getHours(); if (hr == 0) {document.write("The Witching Hour");} if (hr == 1) {document.write("You survived the Witching Hour");} 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 very early");} if (hr == 7) {document.write("It's still early");} if (hr == 8) {document.write("Good morning");} if (hr == 9) {document.write("Don't be late");} if (hr == 10) {document.write("Time for a morning break");} if (hr == 11) {document.write("Morning");} if (hr == 12) {document.write("Good afternoon");} if (hr == 13) {document.write("Don't forget to grab lunch");} if (hr == 14) {document.write("Afternoon");} if (hr == 15) {document.write("Take a break and stretch");} if (hr == 16) {document.write("Afternoon tea time");} if (hr == 17) {document.write("It's happy hour");} if (hr == 18) {document.write("Good evening");} if (hr == 19) {document.write("Dinner time");} if (hr == 20) {document.write("Time to relax");} if (hr == 21) {document.write("The night is still young");} if (hr == 22) {document.write("Time for bed");} if (hr == 23) {document.write("You're up late");} document.write("</span> —"); </script><span> $[current_user.name].</span> $[logout_link] {/if} </p><span> $[current_user.name].</span> $[logout_link] {/if} </p> </div> </header> $[participated_threads_link] {if $[navigation.tree]} <div id="navigation-tree"> $[navigation.tree] </div> {/if} $[header] <div id="content" role="main"> {if $[notice]} <div class="container"> <div class="title-bar"><h2>$[notice.title]</h2></div> <div class="content pad-all cap-bottom"> $[notice.message] </div> </div> {/if} $[content] $[shoutbox] </div> $[footer] </div> {if $[is_mobile_browser]} <br /><p class="center">Switch to the $[mobile_switch_link].</p> {/if} </body> </html> </a> </li> {/foreach} </ul> <p id="welcome"> {if !$[current_user.is_member]} Welcome Friend. Please $[login_link] or $[register_link]. {else} <script type="text/javascript">
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,768
January 2015
msg
|
Post by Lynx on Mar 2, 2019 17:55:51 GMT -8
toetapping, There are a number of errors in your code - like having <p id="welcome"> in there twice (ID's cannot have more than 1 occurrence on the same page) and having an open <script> tag at the bottom with nothing after, including no closing </script> tag. Here's the Forum Wrapper template from a vanilla theme with the code added: <!DOCTYPE HTML> $[tag.html.open] <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>$[title] | $[forum.name]</title> $[head] </head> <body> {if $[maintenance_mode]} <div class="maintenance-header"> {if $[can.disable_maintenance]}<p>Finished with maintenance? $[disable_maintenance_link].</p>{/if} </div> {/if} <div id="wrapper"> <header> <div id="banner-container" role="banner"> <h2 id="banner"> $[forum.title] </h2> </div> <a id="navigation-skip" href="#content" accesskey="s" class="aria-hidden" title="Skip Navigation">Skip Navigation</a> <a href="#" accesskey="d" title="Open Menu" onclick="proboards.hotkeys.activate(Keys.d); return false;"></a> <div id="navigation-menu" class="ui-helper-clearfix"> <ul role="navigation"> {foreach $[navigation.menu]} <li> <a{if $[navigation.menu.active]} class="state-active"{/if} href="$[navigation.menu.href]"{if $[navigation.menu.accesskey]} accesskey="$[navigation.menu.accesskey]"{/if}> $[navigation.menu.name] {if $[navigation.menu.notification.total]} <div class="tip-holder" onclick="window.location='$[navigation.menu.notification.href]'; return false;"> <div class="tip-number">$[navigation.menu.notification.total]</div> <span class="tip"></span> </div> {/if} </a> </li> {/foreach} </ul> <p id="welcome"> {if !$[current_user.is_member]} Welcome Guest. {if $[login_link] || $[register_link]} Please $[login_link]{if $[login_link] && $[register_link]} or {/if}$[register_link]. {/if} {else} <script type="text/javascript"> /* Greetings script */ document.write("<span>"); var day = new Date(); var hr = day.getHours(); if (hr == 0) {document.write("The Witching Hour");} if (hr == 1) {document.write("You survived the Witching Hour");} 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 very early");} if (hr == 7) {document.write("It's still early");} if (hr == 8) {document.write("Good morning");} if (hr == 9) {document.write("Don't be late");} if (hr == 10) {document.write("Time for a morning break");} if (hr == 11) {document.write("Morning");} if (hr == 12) {document.write("Good afternoon");} if (hr == 13) {document.write("Don't forget to grab lunch");} if (hr == 14) {document.write("Afternoon");} if (hr == 15) {document.write("Take a break and stretch");} if (hr == 16) {document.write("Afternoon tea time");} if (hr == 17) {document.write("It's happy hour");} if (hr == 18) {document.write("Good evening");} if (hr == 19) {document.write("Dinner time");} if (hr == 20) {document.write("Time to relax");} if (hr == 21) {document.write("The night is still young");} if (hr == 22) {document.write("Time for bed");} if (hr == 23) {document.write("You're up late");} document.write("</span> —"); </script><span> $[current_user.name].</span> $[logout_link] {/if} </p> </div> </header> $[participated_threads_link] {if $[navigation.tree]} <div id="navigation-tree"> $[navigation.tree] </div> {/if} $[header] <div id="content" role="main"> {if $[notice]} <div class="container"> <div class="title-bar"><h2>$[notice.title]</h2></div> <div class="content pad-all cap-bottom"> $[notice.message] </div> </div> {/if} $[content] $[shoutbox] </div> $[footer] </div> {if $[is_mobile_browser]} <br /><p class="center">Switch to the $[mobile_switch_link].</p> {/if} </body> </html>
Under where you have the $[footer] template variable, these lines don't seem to belong: </a> </li> {/foreach} </ul> <p id="welcome"> {if !$[current_user.is_member]} Welcome Friend. Please $[login_link] or $[register_link]. {else} <script type="text/javascript">
|
|
inherit
133488
0
Mar 27, 2024 11:49:58 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2019 18:06:31 GMT -8
I will give it a try but at the moment I am waiting on support as I have lost my test forum trying it so hoping it can be restored.
Thank you so much for your help. Will let you know how I go when I can.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,768
January 2015
msg
|
Post by Lynx on Mar 2, 2019 18:09:42 GMT -8
I will give it a try but at the moment I am waiting on support as I have lost my test forum trying it so hoping it can be restored. Thank you so much for your help. Will let you know how I go when I can. You should be able to go to your forum's URL and add /admin at the end to get to your admin panel. If it's the same URL in your support thread, then you'd want: testingsssss.proboards.com/admin
|
|