IMPORTANT

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

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Apr 2018, 11:43

» 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

» Numbering of messages in the topic
by SLGray Mon 04 Dec 2017, 22:40

Recent Tutorials
Top posting users this month
Who is online?
In total there are 13 users online :: 2 Registered, 0 Hidden and 11 Guests :: 2 Bots

alla13, STBW

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Code Christmas lights stopped working.

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

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

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

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

Postsmurfavr on 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.


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;');
  }
})});
avatar
Valoish
Graphic Designer
Gender : Female
Age : 21
Posts : 3669
Points : 4985
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Opera Forum Version : Forum Version : phpBB2
View user profile http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish on 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.

--------

"I was afraid. And my own insecurity crushed him." - Youku x Boku SS
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on Wed 26 Oct 2016, 15:35

Thanks.
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>
avatar
Ace 1
Valued Member
Gender : Unspecified
Age : 18
Posts : 2153
Points : 3154
Reputation : 92
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on 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>
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on 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.
avatar
Ace 1
Valued Member
Gender : Unspecified
Age : 18
Posts : 2153
Points : 3154
Reputation : 92
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Mon 31 Oct 2016, 08:07

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

Postsmurfavr on Tue 01 Nov 2016, 03:19

Everything works well. The topic does not concludes to see how it will work on smartphones.
avatar
Valoish
Graphic Designer
Gender : Female
Age : 21
Posts : 3669
Points : 4985
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Opera Forum Version : Forum Version : phpBB2
View user profile http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish on 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:

--------

"I was afraid. And my own insecurity crushed him." - Youku x Boku SS
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on 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.

avatar
Ange Tuteur
Administrator
Gender : Male
Age : 22
Posts : 4730
Points : 9818
Reputation : 2365
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on 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

--------

Ange Tuteur
Tips and TricksContact Me

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

Postsmurfavr on Thu 03 Nov 2016, 12:08

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

Postsmurfavr on Thu 03 Nov 2016, 12:12

avatar
Ange Tuteur
Administrator
Gender : Male
Age : 22
Posts : 4730
Points : 9818
Reputation : 2365
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 03 Nov 2016, 12:32

I see. Remove that for now then. I'll take a closer look in a bit. Salute

--------

Ange Tuteur
Tips and TricksContact Me

avatar
Ace 1
Valued Member
Gender : Unspecified
Age : 18
Posts : 2153
Points : 3154
Reputation : 92
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on 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.
avatar
Ange Tuteur
Administrator
Gender : Male
Age : 22
Posts : 4730
Points : 9818
Reputation : 2365
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 03 Nov 2016, 13:51

Ooooh I didn't notice that ! Face palm

--------

Ange Tuteur
Tips and TricksContact Me

avatar
Ace 1
Valued Member
Gender : Unspecified
Age : 18
Posts : 2153
Points : 3154
Reputation : 92
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Thu 03 Nov 2016, 14:07

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

Postsmurfavr on 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.
avatar
Ace 1
Valued Member
Gender : Unspecified
Age : 18
Posts : 2153
Points : 3154
Reputation : 92
Location : USA
Language : English ?
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on 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.
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on Thu 03 Nov 2016, 14:27

I removed it and returned to the original position.
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on 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?
avatar
smurfavr

Gender : Male
Posts : 66
Points : 1116
Reputation : 0
Language : Bulgarian
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
View user profile http://smurfa.bulgarianforum.net/

Postsmurfavr on 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.
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