How to Setup Github Pages Hosting for your SWF'S

Results 1 to 2 of 2
  1. #1
    Enthusiast ahmedprince22 is offline
    MemberRank
    Jun 2015 Join Date
    28Posts

    note How to Setup Github Pages Hosting for your SWF'S

    Git-hub Pages Hosting Tutorial



    Introduction:

    Prerequisites



    • A Git-hub Account
    • Git-hub Desktop
    • SWF Files to be used
    • Patience



    Hello, And Welcome to my first Rage-zone tutorial.
    Ill be teaching you today how to setup Git-hub Pages to Host your SWF's on there instead of your server.


    Common FAQ:


    Q: Why would you want this in the first place?
    A: Git-hub has fast loading times so your hotel wont feel sluggish especially if you have low speeds.

    Q: What about Copyright?
    A: You have a higher chance for your Host taking down your VPS than Git-hub giving a Damn about your swfs, iv been using this for a good while and its been great

    Q: Any benefit to using this other than my VPS?
    A: Yes, as said above you will have a lower chance to be taken down, and its much faster.

    Q: Any Downsides to using this other than my VPS?
    A: Yes, Due to limitations, there is approximately a 10~ Min Delay on edits / Deletions / Additions, so plan your SWF'S Carefully, furthermore idk if this happens for anyone else, but you have to clear cache when loading new SWF'S due to the nature of Caching.

    Q: I dont want to do this, is there already a Pre-hosted one?
    A: Yes, but its completely stock and based on WULEZ R2.
    Link to the SWFS: https://ahmedprince22.github.io/
    Link to Wulez R2: http://forum.ragezone.com/f353/wulez...turus-1150202/



    Step 1: Setting up your Git-hub Pages Account


    Firstly, you want to make a new repository with the following name

    USERNAME.GITHUB.IO

    Make sure to replace username with ur git-hub username this is a crucial Step to get Git-hub pages working.

    Secondly, Open Github Desktop and clone your repository,
    as shown here :Screenshot by Lightshot

    Step 2: Setting up your Git-hub Pages Repsoitory
    Now you want to make a new folder on your desktop and create a index.html file, this is to make pages work, and you just want to put random garbage in there (html grabage), but here is what i put in it.

    Code:
    <!DOCTYPE html>
    <html>
    
    <body>
        <h1>Index</h1>
        <p>Index for the people who want to know where everything is hidden</p>
    
        <table style="width:50%; text-align: left">
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\external_variables.txt">External Variables</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\external_flash_texts_en.txt">External Flash Texts English</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io/gamedata/external_flash_texts_br.txt">External Flash Text Brazilian</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\Productdata_en.txt">Productdata English</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\Productdata_br.txt">Productdata Brazilian XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gordon\PRODUCTION-201904011212-888653470\hotlooks.xml">Hotlooks XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gordon\PRODUCTION-201904011212-888653470\HabboAvatarActions.xml">HabboAvatarActions XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\Furnidata.xml">Frunidata XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\Figuremap.xml">Figuremap XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\FigureData.xml">FigureData XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gordon\PRODUCTION-201904011212-888653470\effectmap.xml">EffectMap XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gordon\PRODUCTION-201904011212-888653470\cofnig_habbo.xml">Config Habbo XML</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\override\External_Flash_Override_Texts_en.txt">External Flash Override Texts English</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gamedata\override\External_Flash_Override_Texts_br.txt">External Flash Override Texts Brazilian</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io\gordon\PRODUCTION-201904011212-888653470\Habbo.swf">Habbo.swf</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://github.com/ahmedprince22/ahmedprince22.github.io">Github Repository</a></th>
        <tr>
        <td>
        </tr>
        </td>
    <th><a href="https://ahmedprince22.github.io/">Github Pages Link</a></th>
        <tr>
        <td>
        </tr>
        </td>
        </table>
     
    <script type="text/javascript">
    this.blankwin = function(){
            var dlists = new Array();  
     dlists[0] = 'forum.ragezone.com'; 
    
    	var hostname = window.location.hostname;
    	hostname = hostname.replace("www.","").toLowerCase();
    	var a = document.getElementsByTagName("a");	
    	this.check = function(obj){
    		var href = obj.href.toLowerCase();
                    var dbopcount = 0;
                    if (href.indexOf("http://")!=-1)
                    {
                       for (jdi = 0; jdi <= dlists.length; jdi++)
                       {
                          if (href.indexOf(dlists[jdi]) == -1)
                          {
                             //alert("NO MATCH " + dlists[jdi] + " " + href);
                             dbopcount = dbopcount;  //Do nothing
                          }
                          else
                          {
                             //alert("match " + dlists[jdi] + " " + href);
                             dbopcount++;
                          }
                       } 
                       if (dbopcount > 0)
                         return true; //If this link URL was an internal URL
                       else  //there were no matches to any internal domain, so leave it external
                         return false;
                    }
                    else
                    {
                      return false;
                    }
    		//return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? false : true;				
    	};
    	this.set = function(obj){
    		obj.target = "_self";
    	};	
    	for (var i=0;i<a.length;i++){
    		if(check(a[i])) set(a[i]);
    	};		
    };
    
    // script initiates on page load. 
    
    this.addEvent = function(obj,type,fn){
    	if(obj.attachEvent){
    		obj['e'+type+fn] = fn;
    		obj[type+fn] = function(){obj['e'+type+fn](window.event );}
    		obj.attachEvent('on'+type, obj[type+fn]);
    	} else {
    		obj.addEventListener(type,fn,false);
    	};
    };
    addEvent(window,"load",blankwin);
    </script>
    </body>
    
    </html>


    make sure to edit that code before using it, since it has my links.

    save that file in the Folder we just created, and move all your swf folders there

    Step 3: Setting up your SWF'S
    MAKE SURE TO EDIT YOUR GAME DATA TO DIRECT TO THE CORRECT FILES


    • C_images
    • DCR
    • Game
    • GameData
    • Gordon



    Step 4: Uploading to Github Pages


    once you do that, drag all of them including the index.html file into the left side of the Github desktop app as shown below.

    Screenshot by Lightshot


    Then you want to give the commit a name a the bottom left, and press commit to master as shown


    Screenshot by Lightshot


    Then click on Fetch Origin once it finishes Commiting to master, and give it a bit of time for it to upload then youre ready to roll,
    http://prntscr.com/njwlvl

    Step 5: Verifying and Setting CMS up
    itl take a moment to update on github pages side, but once its done go to

    USERNAME.GITHUB.IO

    and youl find your index.html, once thats loaded, try to go to your habbo.swf

    like

    USERNAME.GITHUB.IO/gordon/productonxxxx/habbo.swf

    if that loads, you did everything correctly.

    now edit your cms and replace all SWF links to your Github pages URL and congratulations, you have a CDN hosted SWF package.



    if you have any questions, please discord me at SenpaiDipper#9580 if i dont respond to this thread. thanks for watching :)
    Last edited by ahmedprince22; 03-05-19 at 02:12 PM. Reason: fixed some mistakes


  2. #2
    Apprentice Fibfbi is offline
    MemberRank
    May 2019 Join Date
    20Posts

    Re: How to Setup Github Pages Hosting for your SWF'S

    Good tutorial, keep posting man.



Advertisement