Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 30 users online :: 0 Registered, 0 Hidden and 30 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Code Christmas lights stopped working.
Page 2 of 2 • Share
Page 2 of 2 • 1, 2
First topic message reminder :
@Ange Tuteur Code Christmas lights that you make stopped working. Can you fix it?
@Ange Tuteur Code Christmas lights that you make stopped working. Can you fix it?
- Code:
$(function(){$(function(){
var padTop = true,
frame = document.createElement('IFRAME'), body = document.body, s = '';
frame.setAttribute('style','position:absolute;left:0;right:0;top:0;width:100%;height:100px;border:none;z-index:1000;');
frame.src = 'http://opensource.olympe.in/lights/?size=tiny';
frame.id = 'schillmania-lights';
body.insertBefore(frame, body.firstChild);
if (document.getElementById('fa_toolbar')) {
frame.style.top = '28px';
document.getElementById('fa_hide').onclick = function() { frame.style.top = '0px' };
document.getElementById('fa_show').onclick = function() { frame.style.top = '28px' }
}
if (padTop == true) {
if (body.getAttribute('style')) s = body.getAttribute('style');
body.setAttribute('style',s + 'padding-top:100px !important;');
}
})});
I deleted a row from appearing 2 button and be fine.
I would like button? with which to update the lamps.
I use this js code. Must be of js code can be set to move the lights to the right?
I would like button? with which to update the lamps.
I use this js code. Must be of js code can be set to move the lights to the right?
- Code:
$(function(){$(function(){
var padTop = true,
frame = document.createElement('IFRAME'), body = document.body, s = '';
frame.setAttribute('style','position:absolute;left:0;right:0;top:0;width:100%;height:80px;border:none;z-index:1000;');
frame.src = 'http://hl-club.net16.net/lights/?size=tiny';
frame.id = 'schillmania-lights';
body.insertBefore(frame, body.firstChild);
if (document.getElementById('fa_toolbar')) {
frame.style.top = '28px';
document.getElementById('fa_hide').onclick = function() { frame.style.top = '0px' };
document.getElementById('fa_show').onclick = function() { frame.style.top = '28px' }
}
if (padTop == true) {
if (body.getAttribute('style')) s = body.getAttribute('style');
body.setAttribute('style',s + 'padding-top:80px !important;');
}
})});
For the question mark (?) to appear under the lights like they do in the screenshot, please copy the code I gave you in my previous post and paste it in your index.html file (The same file you edited earlier to get rid of the tiny, small, big, etc text).
As for centering the lights, I'm not too sure. I looked at the CSS and nothing I tried worked. I'd rather not mess with the js code since I don't have a lot of experience with it.
Maybe @Ace 1 can help. If not, Ange might know.
As for centering the lights, I'm not too sure. I looked at the CSS and nothing I tried worked. I'd rather not mess with the js code since I don't have a lot of experience with it.
Maybe @Ace 1 can help. If not, Ange might know.
Thanks.
Everything works. He stayed only lights move a little to the right.
http://vracatestforum.bulgarianforum.net/forum
my js
my index.html
Everything works. He stayed only lights move a little to the right.
http://vracatestforum.bulgarianforum.net/forum
my js
- Code:
$(function(){$(function(){
var padTop = true,
frame = document.createElement('IFRAME'), body = document.body, s = '';
frame.setAttribute('style','position:absolute;left:0;right:0;top:0;width:100%;height:80px;border:none;z-index:1000;');
frame.src = 'http://hl-club.net16.net/lights/?size=tiny';
frame.id = 'schillmania-lights';
body.insertBefore(frame, body.firstChild);
if (document.getElementById('fa_toolbar')) {
frame.style.top = '28px';
document.getElementById('fa_hide').onclick = function() { frame.style.top = '0px' };
document.getElementById('fa_show').onclick = function() { frame.style.top = '28px' }
}
if (padTop == true) {
if (body.getAttribute('style')) s = body.getAttribute('style');
body.setAttribute('style',s + 'padding-top:80px !important;');
}
})});
my index.html
- Code:
<html>
<head>
<title>Smashable Christmas Lights</title>
<link rel="stylesheet" media="screen" href="christmaslights.css" />
<script type="text/javascript" src="soundmanager2-nodebug-jsmin.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&2.6.0/build/animation/animation-min.js"></script>
<script type="text/javascript" src="christmaslights.js"></script>
<script type="text/javascript">
var urlBase = './';
soundManager.url = './';
</script>
</head>
<body>
<div>
<div id="loading">
<h1>Christmas Light Smashfest 2008: Prototype</h1>
<h2>Rendering...</h2>
</div>
<div id="lights">
<!-- lights go here -->
</div>
<div style="position: absolute; width: auto; left: 10px; top: 55px; font-weight: bold;"><a href="javascript:window.location.reload();">?</a></div>
</div>
</body>
</html>
Find this in the index.html
And replace it with this:
- Code:
<div id="lights">
<!-- lights go here -->
</div>
And replace it with this:
- Code:
<div id="lights" style="left: 20px; width: calc(100% - 20px);">
<!-- lights go here -->
</div>
@smurfavr the classic version doesn't appear to be optimized well for mobile..
Try the following :
Go to Admin Panel > Display > Templates > General > overall_header
Find :
and replace it with this :
From your screenshot the forum appears to be zoomed out. This meta tag should correct that. I'm not sure if it'll fix the lights or not though. Only one way to find out.
Try the following :
Go to Admin Panel > Display > Templates > General > overall_header
Find :
- Code:
</head>
and replace it with this :
- Code:
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
From your screenshot the forum appears to be zoomed out. This meta tag should correct that. I'm not sure if it'll fix the lights or not though. Only one way to find out.
Ace 1 wrote:Find this in the index.html
- Code:
<div id="lights">
<!-- lights go here -->
</div>
And replace it with this:
- Code:
<div id="lights" style="left: 20px; width: calc(100% - 20px);">
<!-- lights go here -->
</div>
@Ange Tuteur This probably has something to do with the lights being cut in half.
For now, @smurfavr try doing what Ange told you and replacing the code I gave you with the first one you had.
I wrote the host of the problem and told me the following.
I uploaded my files in, HTML file, but they no longer work. The files are Christmas lights on my website. The lights worked 10 days and then stopped and gives me the following error. http://error404.000webhost.com/cpu-limit-reached.html
What caused the problem and how to fix it?
the problem is that you "reached cpu limit"
This likely means your script has a bad loop or something that is causing it to use an unusual amount of resources, likely javacript.
review the script & follow all the loops & find the problem, you can use this script to time the processing..
put the top part at the top & the bottom part at the end of your page & change the extension to .php
I do not understand what to do.
I uploaded my files in, HTML file, but they no longer work. The files are Christmas lights on my website. The lights worked 10 days and then stopped and gives me the following error. http://error404.000webhost.com/cpu-limit-reached.html
What caused the problem and how to fix it?
the problem is that you "reached cpu limit"
This likely means your script has a bad loop or something that is causing it to use an unusual amount of resources, likely javacript.
review the script & follow all the loops & find the problem, you can use this script to time the processing..
put the top part at the top & the bottom part at the end of your page & change the extension to .php
- Code:
<?php
// Insert this block of code at the very top of your page:
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ("Page Processed in <b> %f seconds </b>", $totaltime);
?>
I do not understand what to do.
- Sponsored content
Page 2 of 2 • 1, 2
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum