Menu

Home

home (1)
john3825

OSK_Loader

OSK_Loader Light PHP Loader.

Project Home.

OSK_Loader

Details

Files - Files included.
HowToUse - How to use.
Developer - john3825
Volunteers - Volunteers for our project.

Files

OSK_Loader/
    LICENSE.txt     - GNU GPL.Lv.3 License
    OSK_Loader.php  - OSK_Loader Class File
    README.md       - ReadMe file

Follow README.md file for the detailed instruction.

HowToUse

How To Use

In a HTML head section with <?php ?> tag,
include OSK_Loader.php and call OSK_Loader::Load() public method statically with or without $file value, with data files or not, by calling OSK_Loader::Load($file); or make an instance of the class $OSK_Loader = new OSK_Loader(); OSK_Loader::Load($file); in the same <?php ..?> tag.

Example

<html>
<head>
<?php
include("OSK_Loader.php");
$JS = ( object ) array( "JS" => array( "test.js" ), "CSS" => ( "test.css") );

/* Alt: $JS = ( object ) array(
        "JS" => array( "test.js" ) ...,
        "CSS" => ( "test.css") ...,
        "RemoveTags" => true,
        "JSTag" => true
    );
    For Removing Script Tags After Load Completed And Use HTML 'Script' Tags To Load js Files Instead Of Using Plain Text Load Dynamically.
*/

$JS = @base64_encode( @json_encode( $JS ) );
$file = ( object ) array("Load_File" => $JS);
OSK_Loader::Load($file);
/* 
    Or 
    $OSK_Loader = new OSK_Loader( $file );
    $OSK_Loader::Load();
    Or 
    $OSK_Loader = new OSK_Loader();
    $OSK_Loader::Load( $file );
*/
?>
</head>
<body>
</body>
</html>

With data file

<html>
<head><?php
include("OSK_Loader.php");
OSK_Loader::Load();
?>
</head>
<body>
</body>
</html>

Include in head, and set $file -> Load_File object base64 and json encoded data or make a file of the data in OSK_Loader class property private static $Files_DATA = "Files_DATA.data";

Using Separate File:

Make /DATA/Files_DATA.data file in /Path/To/Root/Home/Installed-Dir/DATA/ after make /DATA/ directory in the installed directory by mkdir("/Path/To/Root/Home/Installed-Dir/DATA/", 0755); or manually. Save the data base64 json encoded as follwing.

YmFzZTY0X2... Base64-Encoded-DATA ...VuY29kZWQtZGF0
/* 
    File DATA: 
    @base64_encode( @json_encode(
        ( object ) array( "Load_File" => 
            @base64_encode( @json_encode(
                ( object ) array(
                     "JS" => array( "test.js" ),
                     "CSS" => ( "test.css"),
                     "RemoveTags" => true,
                     "JSTag" => true
                )
            ))
        )
    ));
*/

In HTML head tag.

<?php
include("OSK_Loader.php");
OSK_Loader::Load();
?>

In OSK_Loader.php file OSK_Loader class property, change data file path to

private static $Files_DATA = "DATA/Files_DATA.data";
/* Below class definition */
  • JS : JS files to load must be set in an array.
  • CSS : CSS files to load must be set in an array.
  • RemoveTags : Removes script tags after load completed.
  • JSTag : Uses script tags for loading JS files.
  • RemoveTags, JSTag options must be set in boolean true or false, otherwise omit them for regular loading.

Developer

The project is currently developed by john3825(SYSOP) )**john3825(SYSOP)Needed For Server.

Volunteers

OSK_Loader Project is recruiting volunteers for the project. Please post message to the comment or e-mail john3825(SYSOP). -- Some experience requested....

Download OSK_Loader
Download OSK_LoaderDownload OSK_LoaderProject-License

Download osk-loader