Author Topic: Christmas theme  (Read 3973 times)

Offline FreeK

  • a-LeeK
  • Acidmods Alumni
  • E = MC² Mad Scientist
  • *
  • Posts: 1980
  • Post quality +3/-0
  • Gender: Male
  • Team CYBER for life
Christmas theme
« on: December 12, 2010, 12:09:28 PM »
I like the concept and all, but on a low-spec gaming PC running 1080p res, all it does is causes lag (like 1FPS while typing a post).

I just wanted to say something about it for those who maybe don't have a decent computer.

Anyone else having similar problems?
« Last Edit: December 12, 2010, 12:11:22 PM by FreeK »

Offline FOOKz™

  • Hardware Modder
  • Research & Development
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: Christmas theme
« Reply #1 on: December 12, 2010, 04:44:01 PM »
i've got a crappy on-board video card running 25fps @ 60hz  (makes it look crappy) but no big performance issues

Follow my Instagram and subscribe to my YouTube

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #2 on: December 12, 2010, 11:59:51 PM »
What browser are you using?

Offline Modded Matt

  • Site Owner
  • Administrator
  • Around the block
  • *
  • Posts: 4649
  • Post quality +65/-3
  • Gender: Male
Re: Christmas theme
« Reply #3 on: December 13, 2010, 06:37:24 AM »
a gaming pc with 1080p res should have no problems displaying this.

Offline Famas

  • Granny Spanker
  • *
  • Posts: 403
  • Post quality +1/-8
  • Acidmods User
Re: Christmas theme
« Reply #4 on: December 13, 2010, 06:47:22 AM »
yea my pc is making it lag like scroling down the page :(

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #5 on: December 13, 2010, 08:54:15 AM »
Hey sorry it's been lagging for your guys. I will take a look into it and see if i can make it so that you can turn it on and off using a button.

It's not to bad running on an iPad so it should be ok on most other computers. Doesn't seem to lag the page much it just the snow seems a bit slower. In the vid it look a bit lagy but that's because I'm running a screen capture software on my iPad ath the same time.

Acidmods Christmas theme snowing iPad


i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline whitetop

  • E = MC² Mad Scientist
  • *
  • Posts: 1910
  • Post quality +39/-12
  • Gender: Male
  • im not in the ass kissing team
Re: Christmas theme
« Reply #6 on: December 13, 2010, 09:12:00 AM »
no lag on my side and mines just a casual pc but yeah a on/off button would be great for slow pc specs

acidmods snow theme
come to the rite place if you kiss admins as they promote you to admin.

Offline jacobia jacob

  • E = MC²
  • *
  • Posts: 329
  • Post quality +3/-0
  • Gender: Male
  • come at me bro
Re: Christmas theme
« Reply #7 on: December 13, 2010, 11:48:55 AM »
i miss the snow :(

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #8 on: December 13, 2010, 04:20:07 PM »
yeah i have disabled it until i can work out a way that works to load a .js file on click or to stop a .js file on click either will do (even better if it can be used to toggle it). as long as its done in html or javascript or php

i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #9 on: December 13, 2010, 04:21:49 PM »
I can probably make you a php control for it... Probably have to edit the CSS too.

Offline FOOKz™

  • Hardware Modder
  • Research & Development
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: Christmas theme
« Reply #10 on: December 13, 2010, 04:26:41 PM »
the snow should just be JavaScript, i've seen similar scripts on dynamic drive. It just would just have to check a variable (yes/no) via a button to let the main part run.

Follow my Instagram and subscribe to my YouTube

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #11 on: December 13, 2010, 04:42:55 PM »
Right. This SHOULD work, in theory. It might be a little ugly though. Replace the indicated square brackets section in this code with the script tag which points to the snow JavaScript file. Then, put this code where that script tag was. Simples? :)



<script type="text/css">
#jssnowcontroller {
position: absolute;
bottom: 0;
left: 0;
background-color: #444;
color: #fff;
}
</script>

<div id="jssnowcontroller">
  <form action="index.php" method="GET">
    Snow On&nbsp<input type="radio" name="snow" value="true" />
    Snow Off&nbsp<input type="radio" name="snow" value="false" />
    <input type="submit" value="Make it Snow!" />
  </form>
</div>

<?php

$snow = $_GET['snow'];

if (!$snow) {
$snow = false;
};

if ($snow==true) {
echo "[PUT THE JAVASCRIPT COMMAND THAT YOU HAVE ALREADY HERE MINUS THE SQUARE BRACKETS]";
};

?>


Post Merge: December 13, 2010, 04:47:11 PM
One Other thing: make sure  it isnt inside any other tags. Put it all right before the final </body> tag. Otherwise wierd crap may occur.
« Last Edit: December 13, 2010, 04:47:11 PM by HiddenVenom »

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #12 on: December 13, 2010, 05:00:02 PM »
tried that hidden but it diddnt work - this is the js file https://www.acidmods.com/forum/snowstorm.js

i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #13 on: December 13, 2010, 05:11:32 PM »
Okay, give this a try.

Tell me if:

1- the form does not appear
2- if the form doesn't change anything
3- if an error message appears
4- if no snow appears




<script type="text/css">
#jssnowcontroller {
position: absolute;
bottom: 0;
left: 0;
background-color: #444;
color: #fff;
}
</script>

<div id="jssnowcontroller">
  <form action="index.php" method="GET">
    Snow On&nbsp<input type="radio" name="snow" value="on" />
    Snow Off&nbsp<input type="radio" name="snow" value="off" />
    <input type="submit" value="Make it Snow!" />
  </form>
</div>

<?php

if (!$snow) {
$snow = "on"
};

if ($snow=="on") {
echo "<script type='text/javascript' src='snowstorm.js' />";
};

?>

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #14 on: December 13, 2010, 05:23:54 PM »
hmm - still not working - you on msn hidden

i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #15 on: December 13, 2010, 05:32:46 PM »
I know the problem. I'm not on msn. Will be tomorrow afternoon so if it still isn't working I'll help you then.

1. Don't move the style or the form. They are fine.
2. Take the entire php section and move it to be at the bottom of the HTML file just above </body>. Nothing else below it. If you are still having issues, email me / pm me a copy of this page.

Post Merge: December 13, 2010, 05:34:01 PM
Last note: I'm about to get to sleep. If I don't answer that's why lol :)
« Last Edit: December 13, 2010, 05:34:01 PM by HiddenVenom »

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #16 on: December 13, 2010, 05:44:39 PM »
You don't need

if (!$snow) {
$snow = "on"
};

because all that does is say "if $snow is false, turn it on. No matter what it would set to on. Also, you can't do if(!$snow) because $snow is on/off. A boolean statement is true/false or 1/0, not on or off. If you change it to true/false like in your original code, it would function properly (not sure if it would run though).

Another thing you forgot, in that new code you didn't add the $snow=$_GET['snow'] anywhere. You have no $snow variable.

The form is fine. Use this for php:

<?
$snow = $_GET['snow'];
if($snow)
{
     echo '<script type="text/javascript" src="snowstorm.js"></script>';
}
?>

This should be good. You'd need an option to turn it off then.
« Last Edit: December 13, 2010, 05:45:35 PM by PspKicks316 »

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #17 on: December 13, 2010, 05:55:32 PM »

<?
$snow = $_GET['snow'];
if($snow)
{
     echo '<script type="text/javascript" src="snowstorm.js"></script>';
}
?>

This should be good. You'd need an option to turn it off then.

My bad lol been working with Bools all day.

<?
$snow = $_GET['snow'];
if(isset($snow)==false)
{
$snow = "on";
};

if($snow=="on")
{
     echo '<script type="text/javascript" src="snowstorm.js" />';
};

?>



That should do it. The isset() function will detect if a value has been assigned to it, so we can make it "on" by default.

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #18 on: December 13, 2010, 06:06:39 PM »
I'm 99.9% sure you must escape the double quotes.

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #19 on: December 13, 2010, 06:14:19 PM »
It won't affect anything in the script, but yeah, it's a bad habit I picked up from visual basic... Which unfortunately I have to do for my computing a level.

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #20 on: December 13, 2010, 06:16:32 PM »
I *hate* VB =(

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #21 on: December 13, 2010, 06:45:54 PM »
tried


Code: [Select]
<script type="text/css">
#jssnowcontroller {
position: absolute;
bottom: 0;
left: 0;
background-color: #444;
color: #fff;
}
</script>

<div id="jssnowcontroller">
  <form action="index.php" method="GET">
    Snow On <input type="radio" name="snow" value="true" />
    Snow Off <input type="radio" name="snow" value="false" />
    <input type="submit" value="Make it Snow!" />
  </form>
</div>

<?
$snow = $_GET['snow'];
if(isset($snow)==false)
{
$snow = "on";
};

if($snow=="on")
{
     echo '<script type="text/javascript" src="https://www.acidmods.com/forum/snowstorm.js" />';
};

?>

but still no dice. thanks for trying though

i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #22 on: December 13, 2010, 07:25:31 PM »
Does it show the form? I just realized he's not using the <style> tag..

Post Merge: December 13, 2010, 07:54:01 PM
Here. Fully working.

Code: [Select]
<html>
<head>
<title>Untitled Document</title>
<?php
$snow
=$_GET['snow'];
if(!isset(
$snow))
{
$snow "true";
}
if(
$snow == "true")
{
echo '<script src="snowstorm.js"></script>';
}
?>

<style>
body{
background:#000;
color: #FFF;
};
</style>

</head>
<body>
<div id="f">
        <form action="index.php" method="get">
            Snow on: <input type="radio" name="snow" value="true"/><br />
             Snow off: <input type="radio" name="snow" value="false"/><br />
            <input type="submit" />           
            </form>
</div>
</body>
</html>
« Last Edit: December 13, 2010, 07:54:01 PM by PspKicks316 »

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #23 on: December 13, 2010, 11:58:28 PM »
I also detest vb.
Whoops lol did write that code at like 1am though :) and it would work without style anyway :). And the style you put is wrong- it needs to be:

#f {
position:absolute;
left:0;
bottom:0;
background: #777;
color: #fff;
}

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #24 on: December 14, 2010, 03:59:39 PM »
No, it works fine. I had sent Robin an updated code for him to add into the forum. That was just a demo that worked. The code Robin has is updated with a style for the form. I would've posted it here, but I kept getting that annoying 500 Internal Server error because it didn't like my post.

Offline robin1989

  • Site Owner - Site Maintenance & development
  • Administrator
  • Mad Bomber
  • *
  • Posts: 6272
  • Post quality +21/-0
  • Gender: Male
  • Site owner
    • Acidmods
Re: Christmas theme
« Reply #25 on: December 14, 2010, 07:04:22 PM »
ok so it didnt work - im probably tired and just pasting stuff in wrong area or something i dont know but for now i will just give up and leave the snow off - might put it back on new years eve till boxing day and just slow the fram rate on the snow down a bit and hopefully that will stop freeks problems

i am not responsible for what i do or my advice


Get the iPhone 4s from Three using Quidco and recieve £109 cashback

Offline PspKicks316

  • Acidmods Alumni
  • Mad Bomber
  • *
  • Posts: 5709
  • Post quality +5/-4
  • Gender: Male
Re: Christmas theme
« Reply #26 on: December 14, 2010, 07:27:36 PM »
Robin, check your PMs.

Offline HiddenVenom

  • Gone 'shopping
  • Acid Modder
  • *
  • Posts: 835
  • Post quality +2/-0
  • Gender: Male
  • Photoschlop.
    • Star Legion
Re: Christmas theme
« Reply #27 on: December 15, 2010, 06:32:49 AM »
Came up with a much better solution than my original one, much simpler. Easy to install too. Robin, check your PMs, I've sent it to you. :)

The way I've done it ensures no ugly php errors. Because it doesn't use php.

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal