Simple Media Script A simple media script by KBRmedia

Table of Content

Introduction

Thank you for purchasing this awesome script! This documentation will help you get familiar with this script. Please don't forget to leave this script a good rating and we would really appreciate if you can also leave us a good rating. If this script did not meet your expectation, please before leaving a low rating, contact us and hopefully, we can fix any issues you are having.

An up-to-date documenation is available online 24/7 and can be access via our portal.

Useful Links

Customer Portal

Follow us on Envato

Follow us on Twitter

Like our page on Facebook

Dedicated Support Portal

License (learn more)

Two types of license are available: Regular or Extended. If you are using this script for multiple websites, you must buy a license for each of them.

Items purchased under a Regular or Extended License may NOT be redistributed or resold "as-is" or as part of any other collection of image resources or files. You do not own the software but simply own a license to operate it therefore the author of this item has full rights on this item.

Regular License Examples (from Envato)

The Regular License could be used for the following:

  • Single website (commercial, personal, or non-profit).
  • Single website for a client (commercial, personal, or non-profit).
  • Single intranet site project.

Extended License Examples (from Envato)

The Extended License could be used for any of the following:

  • An online service where the file can be displayed on multiple users' pages.
  • Part of a software package for sale.

Support

If you stumble upon an issue or if you need help you may contact via my codecanyon profile and I would be happy to help you.

Installation

This script is powered by Youtube's Data API version 3.0. So before installation, you will need to register with Google for an API key.

Google API Key

  1. Login with your Google Account at https://console.developers.google.com
  2. Follow images below

Setup

  1. Open includes/Config.php and fill in all the empty fields. The most important fields are: key and url. The rest of the fields are optional but make sure to fill them for better experience.
  2. You can view a video if you have trouble filling them out: http://www.screenr.com/sRMN
  3. Once all of that is done, save it and that is it.

Sample Config File

<?php 
	/**
	 * App Configuration
	 * @var array
	 */
	$config = array(
	    // Your Site URL
	    "url" => "http://yoursite.com",
	    // Your Site Title
	    "title" => "Easy Site",
	    // Your Site Description
	    "description" => "A quick description of my site...",
	    // Youtube API Key
	    "key" => "YourGoogleAPIKey",
	    // Google Analytics ID
	    "ga" => "",
	    // Ad Codes
	    "ad728" =>"Your Adcode",
	    "ad468" =>"Your Adcode",
	    "ad300" =>"Your Adcode",

	    // Theme folder name
	    "theme" => "default",
	    
	    // Commenting system
	    "comment" => array( // Facebook is default
	            "facebook" => "", 
	            "disqus" => ""
	        ),

	    // Server's timezone for more accurate data
	    "timezone" => "America/Montreal",
	    
	    // Cache Data - If you notice anomalies, disable this. You should enable this when you get high hits
	    "cache" => FALSE,

	    // Enable mode_rewrite? e.g. user/login instead of index.php?a=user/login
	    "mod_rewrite" => TRUE,

	    // Enable Compression? Makes your website faster
	    "gzip" => TRUE,

	    "debug" => 0, 
	  );

	// Include core.php
	include ('Core.php');					
				

Configuration

Youtube API

An API key is required to query Youtube and fetch videos. Once you created your API key, open includes/Config.php and paste in the right side of the field below:

"key" => "YourGoogleAPIKey",

Custom Videos

You can add custom videos by simply opening the file includes/custom.php and adding one Youtube video ID per line. These will show up under "Featured Videos" in the homepage.

Google Analytics ID

You can track your visitors by adding your GA ID in the right side of the code below:

"ga" => "YourGoogleAnalyticsID",

Advertisement

You can advertisments by simply adding your adcodes in the following fields. Each of the fields below is associated with a specific size.

"ad728" =>"Your Adcode",
"ad468" =>"Your Adcode",
"ad300" =>"Your Adcode",					
Due to PHP rules your ad code cannot contain a double quote ". Make sure to replace all of the double quotes " by a single quote ' or add a slash right before it e.g. \"

Theme

You can switch theme by simply changing the following configuration in the config file. The value for theme is the name of the name of the theme folder.

"theme" => "default"

Comments

The default commenting system is Facebook because it doesn't require any extra info, though it is highly recommended to add your APP ID to track your users. If you want to enable Disqus then simply add your Disqus username to the field below to enable it.

"comment" => array( // Facebook is default
    "facebook" => "YOURAPPID", // Insert YOUR APP ID here
    "disqus" => "YOURDISQUSUSERNAME" // Insert your disqus username here
),	

Timezone

To better represent the time, it is recommended to add your timezone here. You can get the list of your timezone from https://php.net/manual/en/timezones.php

Mod Rewrite

To enable clean URls, enabled this option. This option is enabled by default however not that this require the Mod Rewrite module to be enabled. If you don't have that module enalbed, set this to FALSE

"mod_rewrite" => TRUE,

Caching

Caching is an excellent way to speed up loading of your site. This is turned on by default. Make sure tha /cache exists and is writable. If you want to turn it off, set the config below to FALSE

"cache" => TRUE,

Customization

Style Generator

This theme includes two LESS files that you can use to generate custom styles. LESS is dynamic CSS processor that is very easy to work with. You cannot directly use LESS because it requires its JS library however you will need to process it using a LESS processor. Once you have done all of your changes, you can use any of the online processors to generate CSS files. Below is a list of LESS along with description.

Main Stylesheet: style.less

This file has all of the style clauses that your will find in style.css. You can change this file if you want to change the layout and other stuff.

How to use LESS

You don't need to have a very good knowledge of LESS to work with it. If you open one of the files in a text editor, you will see right at beginning the following. The following is what you can use to generate different styles. All you need to do is to change hex colors in the right side and then copy everything and paste into the LESS processor that you can easily find online.