HSX 2017 Halloween script

2

Thu Nov 23, 2017 12:12 pm
Clan Leader
Top Dog
2630 Posts
coRpSE
In-Game
State of Decay 2

Most Played:
This week: 90.4hrs.
Total Played: 135hrs.
  
I promised that I would release this if I got request, and I have had a few so here it is. If you like to have this on your site for next year, just download the attached files and install it on your site and follow these instructions. First, here is a preview.



Now, to install this script, it is very easy.
  1. Download the attached files and upload to your site keeping the folder path.

  2. Next, we need to do a bit of PHP coding.

    Open: public_html/includes/javascript.php

    Find:

    PHP:  [ Select all ]

    include_once(NUKE_INCLUDE_DIR.'styles.php'); 


    Add After:

    PHP:  [ Select all ]

    //  ################### HALLOWEEN #####################    
          
    global $userinfo;
        
    $yourname 'coRpSE';
        
    $cookietime 15;                     //Time between popups, (in miniutes). Set to 0 for no time between message showing up on page refreshes
        
    $cookie_name 'halloween';           //Cookie Name
        
    $cookie_value 'true';
        
    $uname2 $userinfo['username'];     //Only used if you want to target specific people or only your self for testing purposes
        
    $afdate date("md");                //Check to see if today is Halloween
    //############################################################    
    //    if ((!isset($_COOKIE[$cookie_name]) && $afdate == '1031') ||  $uname2 == $yourname){      //Use this for testing.
        
    if (!isset($_COOKIE[$cookie_name]) && $afdate == '1031'){                                 //Use this when not testing
            
    echo "<link rel=\"stylesheet\" href=\"./includes/custom_files/halloween/css/hwscript.css\" type=\"text/css\">";
            echo 
    '<div class="foreground"></div>
            <div class="midground">
              <div class="tuna"></div>
            </div>'
    ;
            echo 
    '<audio autoplay loop>
      <source src="./includes/custom_files/halloween/song/tih_song.ogg" type="audio/ogg">
      <source src="./includes/custom_files/halloween/song/tih_song.mp3" type="audio/mpeg">
    Your browser does not support the audio element.
    </audio>'
    ;
            
    //create cookie
            
    setcookie($cookie_name$cookie_valuetime() + (60 $cookietime), "/" );
            
    //cookie created
        

    // ################### END HALLOWEEN ###################### 

     
  3. Save & Close


Now, let's take a closer look at that code that you just put into the javascript file.
Watch the following video because I explain it there.



Enjoy...


Expand
Fri Dec 01, 2017 3:04 pm
Original Poster
Clan Leader
Top Dog
2630 Posts
coRpSE
In-Game
State of Decay 2

Most Played:
This week: 90.4hrs.
Total Played: 135hrs.
  
updated the first post, the PHP code got stropped of all the HTML.


 
Sun Dec 03, 2017 8:19 am
Blabbing Noob
85 Posts
thanks corpse

i have downloaded for next halloween
Forums ©