FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

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

Recent Tutorials
Top posting users this month

Who is online?
In total there are 13 users online :: 0 Registered, 0 Hidden and 13 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

Code Christmas lights stopped working.

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Sat 28 May 2016, 14:38

First topic message reminder :

@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;');
  }
})});

smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Wed 26 Oct 2016, 15:26

I deleted a row from appearing 2 button and be fine.

I would like button? with which to update the lamps.
Code Christmas lights stopped working. - Page 2 Captu223

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;');
  }
})});
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 27
Posts : 3671
Points : 7110
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Wed 26 Oct 2016, 15:31

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.
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Wed 26 Oct 2016, 15:35

Thanks.
Everything works. He stayed only lights move a little to the right.

Code Christmas lights stopped working. - Page 2 SsssssssUFHb3uC_sredna

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>
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5280
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Wed 26 Oct 2016, 19:10

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>
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 27 Oct 2016, 11:29

thank you Ace 1.

Please topic is not locked to see whether there will be problems with the code.
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5280
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Mon 31 Oct 2016, 08:07

@smurfavr Did it work?
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Tue 01 Nov 2016, 03:19

Everything works well. The topic does not concludes to see how it will work on smartphones.
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 27
Posts : 3671
Points : 7110
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Wed 02 Nov 2016, 11:18

I just checked your forum on my Samsung Galaxy S6 (Android version 6.0.1) and it works fine for me c:
Code Christmas lights stopped working. - Page 2 Screen10
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 03 Nov 2016, 04:36

On Android 4.4.2 will not display correctly. On the right side there are no lights. What I wanted to wait to see if all users will see better lamps.

Code Christmas lights stopped working. - Page 2 8951608X
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 03 Nov 2016, 11:55

@smurfavr the classic version doesn't appear to be optimized well for mobile.. Think

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>
Save and publish the template.

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. tongue
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 03 Nov 2016, 12:08

@Ange Tuteur With this code, the lights became half.
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 03 Nov 2016, 12:12

Code Christmas lights stopped working. - Page 2 8952002V
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 03 Nov 2016, 12:32

I see. Remove that for now then. I'll take a closer look in a bit. Salute
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5280
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Thu 03 Nov 2016, 13:02

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.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 03 Nov 2016, 13:51

Ooooh I didn't notice that ! Face palm
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5280
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Thu 03 Nov 2016, 14:07

Yeah I tried using the calc() thing. Sometimes I forget about the mobile version Razz
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 03 Nov 2016, 14:09

Ace 1 wrote:
Ace 1 wrote:

Code:
<div id="lights" style="left: 20px; width: calc(100% - 20px);">
  <!-- lights go here -->
 </div>

This code currently have it in index.html.
Ace 1
Ace 1
Valued Member
Gender : Unspecified
Age : 24
Posts : 2153
Points : 5280
Reputation : 95
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://fmdesign.forumotion.com/u190

PostAce 1 Thu 03 Nov 2016, 14:13

Yes, just remove this:

Code:
 style="left: 20px; width: calc(100% - 20px);"

And try what Ange Tuteur told you.
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Thu 03 Nov 2016, 14:27

I removed it and returned to the original position.
Code Christmas lights stopped working. - Page 2 8951608X
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Sat 03 Dec 2016, 06:53

I do not know what happened, but the files are uploaded to the host from 1-2 weeks did not work.
I deleted the files and upload them again, but again do not work. What caused the problem?
smurfavr
smurfavr

Gender : Male
Posts : 66
Points : 3239
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://smurfa.bulgarianforum.net/

Postsmurfavr Tue 06 Dec 2016, 06:56

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


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. Code Christmas lights stopped working. - Page 2 1f610
Sponsored content

PostSponsored content

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum