● HSX 2017 Halloween script

Thu Nov 23, 2017 12:12 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3029 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 32.4hrs.
Total Played: 62hrs.


  
Is this your job?
Reputation: 7363.5
votes: 7
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
Nuke Dev / Coder
3029 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 32.4hrs.
Total Played: 62hrs.


  
Is this your job?
Reputation: 7363.5
votes: 7
updated the first post, the PHP code got stropped of all the HTML.


 
Sun Dec 03, 2017 8:19 am
Blabbing Noob
98 Posts
Reputation: 460.1
thanks corpse

i have downloaded for next halloween
Forums ©