inherit
133488
0
Mar 28, 2024 15:54:40 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2019 18:22:54 GMT -8
At least I have the forum back with the admin learn something every day but when I put the code in The Vanilla theme the same thing happens. I get the white screen
I am going in the right place/Themes/Layout Templates/Forum Wrapper.
|
|
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 18:23:00 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> I put the code that you provided above in a test forum and I got the same result. A blank white screen with the lone words "The Witching Hour" in the upper left corner, and locked out of the forum. This is how the code was installed:
So what do you think I am doing wrong?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,768
January 2015
msg
|
Post by Lynx on Mar 2, 2019 20:19:24 GMT -8
toetapping and Violette, I just tested on my forum using a vanilla theme and it works. If you're testing on a vanilla theme, remember to REPLACE the entire forum wrapper code ( Admin > Themes > Layout Templates > Forum Wrapper) with this (best done on a vanilla theme so it doesn't ruin any custom theme, since you'll be replacing the entire code): <!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]. <span id="liveclock"></span> {/if} {else} <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> <span> $[current_user.name].</span> $[logout_link] <span id="liveclock"></span> {/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>
If there's anything stray in there, it can cause it to break. The above code is the ENTIRE forum wrapper code for a vanilla theme with Scott's code added in. EDIT: toetapping - I registered on your test forum and it looks like you've taken the code back out. I'm going to bed shortly, but I'll check back tomorrow if someone else doesn't get to it first. (I live in USA - Eastern Time Zone) Violette - I went to your test forum and saw that it's in Maintenance Mode, so I wasn't able to register to take a look. As stated above, I'm going to bed shortly but I'll check back tomorrow.
|
|
inherit
133488
0
Mar 28, 2024 15:54:40 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2019 20:53:48 GMT -8
I did take the code out MSG but it is back in now and using a default theme.
As you will see have the same problem as Violette.
|
|
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 22:59:37 GMT -8
What do you mean "vanilla theme" in this context?
|
|
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 23:14:50 GMT -8
Ultra basic Violette, like what you get when you click the, 'Reset to Default' button.
|
|
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 23:26:10 GMT -8
I just swapped out the entire Forum Wrapper with the one MSG provided, and got the same blank white page. I give up. It's a cute code. But I can't get it to work.
|
|
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 23:36:38 GMT -8
I am starting to wonder if something in the header or footer is having problems with the script!
|
|
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 3, 2019 0:21:26 GMT -8
Found this script in the header of Violette's Beach Cottage forum was the culprit for it not workintg on that forum. So for those of you that don't have it working, look for something similar in your Global Header. Not sure what it is for. <script type="text/javascript"> $(function(){ var ad = $("#ad1"); var elements = $("#wrapper header, #wrapper a.recent-threads-button, #wrapper #navigation-tree"); if(ad && elements.length){ elements.insertAfter(ad); } }); </script>
|
|
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 3, 2019 0:34:26 GMT -8
Found this script in the header of Violette's Beach Cottage forum was the culprit for it not workintg on that forum. So for those of you that don't have it working, look for something similar in your Global Header. Not sure what it is for. <script type="text/javascript"> $(function(){ var ad = $("#ad1"); var elements = $("#wrapper header, #wrapper a.recent-threads-button, #wrapper #navigation-tree"); if(ad && elements.length){ elements.insertAfter(ad); } }); </script> LOL...I don't know what it's for either. I plead that I don't remember putting it there.
|
|
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 3, 2019 0:55:03 GMT -8
Nscalerr 🐺, do you want to see if you can get it to work on the Beach Cottage?
I see it is on The Beach Cottage! I just changed the theme I was using and can see it now! I love it!
|
|
inherit
223590
0
May 17, 2023 9:13:21 GMT -8
Kitty Katt
My Username is @kittykatt (with 2 t's in katt)
819
July 2015
kittykatt
|
Post by Kitty Katt on Mar 3, 2019 6:48:01 GMT -8
Found this script in the header of Violette's Beach Cottage forum was the culprit for it not workintg on that forum. So for those of you that don't have it working, look for something similar in your Global Header. Not sure what it is for. <script type="text/javascript"> $(function(){ var ad = $("#ad1"); var elements = $("#wrapper header, #wrapper a.recent-threads-button, #wrapper #navigation-tree"); if(ad && elements.length){ elements.insertAfter(ad); } }); </script> Hello. If my memory serves me correctly, that was the replacement code that Peter gave when ProBoards made some changes and a plugin of his that moved the banner below the ad stopped working. I believe that code was the fix for that. If I am incorrect, please feel free to correct me.
|
|
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 3, 2019 8:15:11 GMT -8
Hello, Kitty Katt. I looked that up and you are absolutely correct! Thank you so much for letting us know.
|
|
inherit
133488
0
Mar 28, 2024 15:54:40 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 3, 2019 11:42:38 GMT -8
The above isn't the reason mine isn't working. I had that code in.
|
|
inherit
223590
0
May 17, 2023 9:13:21 GMT -8
Kitty Katt
My Username is @kittykatt (with 2 t's in katt)
819
July 2015
kittykatt
|
Post by Kitty Katt on Mar 3, 2019 11:44:51 GMT -8
Thank you for confirming that, Violette. ==^,.,^==
|
|