Introduction to XTEND Music

Thank you for purchasing our script.

This guide should answer all your questions about how to use this script, you can browse the document using the navigation sidebar on the left.

Description

XTEND Music System is built in object oriented PHP 5 with a MySQL database that allows you to promote your music through your website and to monetize it at the same time through Adsense or other Affiliate Networks. Along with a free Free File Hosting portal like Zippyshare, well promoted social networks like Facebook, Google, Twitter and Pinterest and well promoted Youtube Channel this system proved it's worth. Is lightweight, flexible, customizable and simple application to use with small steps.

Some of the features include:
  • Installation wizard
  • Very compact
  • Easy customization of templates
  • Works in all major browsers
  • WYSIWYG text editor with web file manager included
  • 100% Object Oriented
  • Email templates
  • Responsive theme for both Front and Admin Panel
  • Facebook and Disqus Comment System integrated
  • Social Authentication System integrated with Facebook, Google +, Linkedin, Twitter and Yahoo
  • Multiple sources for mixes like Youtube, Vimeo, Soundcloud, Mixcloud and ZippyShare
  • Included RSS feed
  • Included dinamic multilanguage sitemap
  • Included robots.txt file
  • Included .htaccess file
  • Multilanguage
  • SEO Optimized
  • SMO Optimized
  • Monetizable (Adsense Optimized)

Installation

  • Unzip the package in an empty directory and upload everything.
  • Open a browser and go to the url where you put the XTEND Music files.
    • If you are running on a your own computer http://localhost/example/install/
    • If on a live server http://www.example.com/install/
  • Just follow the instructions and fill in the fields required to properly install the XTEND Music.

Upgrade for 1.x to 1.x+1

These may include bug fixes or enhancements, and you may or may not wish to upgrade. It's always a good idea to backup everything up before you upgrade, especially if you have made any changes to the files, as the upgrade will overwrite all files.

  • Backup your existing application files and database before making any changes.
  • Delete the old files and folders, except config folder.
  • Upload the new contents in your root directory, except config folder.
  • Clear any cookies and your browser cache to avoid errors.
  • Open a browser and go to the url where you put the XTEND Music files.
    • If you are running on a your own computer http://localhost/example/install/upgrade.php
    • If on a live server http://www.example.com/install/upgrade.php
  • Just follow the instructions to update your XTEND Music.

NOTE:

  • Always make a backup of your files and database first.
  • It is strongly recommended not to upgrade your live website, make a copy of your website to another server and try to upgrade it first.
  • If you have made any modifications in some files, your changes will be lost. Compare the new and old files and replace the necessary parts of code manually.

Directory Structure

Database EER Diagram

Basic Usage Examples

Admin panel is accessible on a live server via http://www.example.com/admin/ url. Once authenticated common operations like inserting,deleting or updating data follow the same steps. In sidebar different informations organized as a list like in the following image can be accessed through a simple click.

Below are represented basic steps in order to finish basic operations over a list of mixes.

Insert information

Update information

Delete information

Advanced Usage Examples

If you want you can use another CSS framework and if you know CSS you can create custom design. The XTEND Music uses the simple template engine to separate layout and PHP logic. Template files will be written in pure HTML with some PHP calls for display the data, below are some examples.

Create a simple PHP file (example.php) which loads the template with available variables and outputs the result.

			<?php
			
			//Include the common file
			require_once('common.php');

			//Partners
			$partners = array();

			foreach ($db->query("SELECT * FROM " . cfg('base', 'table_partners') . " ORDER BY partner_id DESC LIMIT " . cfg('base', 'per_page_catalog') . "") as $row) {
				
				$partners[] = array(
					'partner_image'     => $row['partner_image'],
					'partner_url' 	    => $row['partner_url'],
					'partner_name' 		=> $row['partner_name']
				);

			}

			//Template values
			$tpl->set('partners', $partners);

			//Display the template
			$tpl->display('template_name');
			
			?>

Create your template file (template_name.tpl) and save it in the templates folder with the tpl extension.

			<!DOCTYPE html>
			<html>

			<head>
				
				<title>Title</title>
							
			</head>

			<body>

			<?php foreach ($partners as $row): ?>
						
				<a href="<?php echo $row['partner_url']; ?>" target="_blank">
				
				<img src="<?php echo cfg('base', 'site_url'); ?>uploads/images/<?php echo $row['partner_image']; ?>" alt="<?php echo $row['partner_name']; ?>" />
				
				<?php echo $row['partner_name']; ?>

				</a>

			<?php endforeach; ?>

			</body>

			</html>

You can include external templates, useful for include header and footer if they are the same in all page of your website.

			<?php require_once('header' . cfg('template', 'template_extension')); ?>

			<p></p>

			<?php require_once('footer' . cfg('template', 'template_extension')); ?>

Is very simple to use, for more details see the source files in the package downloaded.

Authorizing users

Check if the user is logged in.

<?php if (!$authentication->loggedIn() || !$authentication->isGroup('user')) header("Location: login.php"); ?>
Function example
Create a new user account
Function Parameters    
createUser() User email - varchar required
User password - varchar required
Additional data array - array optional
   

Usage

			$authentication->createUser('email@example.com', 'password', array());
			
			$authentication->createUser('email@example.com', 'password', NULL);

Authentication configuration

Database tables
Description Value
The users table $config['table_users']
The groups table $config['table_groups']
The user profiles table $config['table_profiles']
Website details
Description Value
The title of your website $config['site_title']
The site url of your website $config['site_url']
The absolute path of your server $config['absolute_path']
Administrator email address $config['admin_email']
Registration settings
Description Value
Default ID of user group $config['default_group']
Default ID of admin group $config['admin_group']
Enables or disables email activation $config['email_activation']
Set true to be approved by the admin $config['approve_registration']
Time for user activation $config['email_activation_expire']
How long to remember the user (seconds) $config['user_expire']
Welcome message $config['email_subject_1']
Send new password $config['email_subject_2']
New user registered $config['email_subject_3']
General settings
Description Value
Secret word of the token $config['secret_word']

Base configuration

Database tables
Description Value
The categories table $config['table_categories']
Website details
Description Value
The title of your website $config['site_title']
The site url of your website $config['site_url']
The absolute path of your server $config['absolute_path']

Database configuration

Description Value
The hostname of your database server $config['hostname']
The username used to connect to the database $config['username']
The password used to connect to the database $config['password']
The name of the database you want to connect to $config['dbname']
The database type. Currently supported: mysql $config['driver']
The character set used in communicating with the database $config['char_set']

Language configuration

Description Value
The absolute path of your language files $config['language_path']
The default website language $config['site_language']

Template configuration

Description Value
The site url of website $config['site_url']
The absolute path of your server $config['absolute_path']
The extension of your templates $config['template_extension']

Upload configuration

Description Value
The path for the upload $config['upload_path']
Files allowed for upload $config['allowed_filetypes']
The maximum size (bytes) $config['max_filesize']
The maximum width of thumbnail (in pixels) $config['max_width_thumbnail']
The maximum height of thumbnail (in pixels) $config['max_height_thumbnail']
The maximum width (in pixels) $config['max_width']
The maximum height (in pixels) $config['max_height']
Crop thumbnail to exact dimensions
true = Enabled
false = Disabled
$config['crop_thumbnail']

Manual configuration

A multi-lingual website requires translation of URL, page layout and content. While translation of content can be made easy from admin panel, page layout and url translation require a few manual steps in order to achive desired result.

  • Go to templates/admin/assets/plugins/kcfinder/conf/config.php and edit the file like in example:
    				'uploadURL' => "upload",
    				URL path to main directory for file uploads. In the example above the path is relative to KCFinder main directory. 
    				Other examples:
    				/files/upload - relative to the site root
    				../upload - 'upload' directory located in KCFinder parent directory
    				httр://yourdomain.com/upload - absolute URL path.
    
    				'uploadDir' => "",
    				This setting is used when KCFinder can't automatically detect its local filesystem path to the folder specified in uploadURL setting. 
    				Change this setting when KCFinder can't fetch the local filesystem path automatically. 
  • Edit robots.txt file and replace domain.com with your domain path
  • Edit htacces file and replace domain.com with your domain path and if php files aren't in root folder("public_html" or "www" usually) but in a subdirectory add subdirectory name in front of php file like in example RewriteRule ^blog$ xtend/blog.php
  • Replicate one of the existing language file in languages directory (for example language.en.php) and rename using language code as in patern: language.__code__.php where __code__ can be fr,de,es...
  • In language file translate values of each element from $lang array with desired one.
  • Add language code and values of URL elements from language file in .htacces file like in the following example:
No. of languages .htaccess content Language Files Variable Values
1 RewriteRule ^en$ $1/ [R=301,L]
RewriteRule ^en/(.*)$ $2?lang=$1&%{QUERY_STRING} [L]
RewriteRule ^dj-mixes $ dj-mixes.php
Rewriterule ^dj-mixes/(.*)$
http://www.domain.com/en/dj-mixes$1 [r=301,L]
lang.en.php $lang['URL_DJMIXES'] dj-mixes
2 RewriteRule ^(en|ro)$ $1/ [R=301,L]
RewriteRule ^(en|ro)/(.*)$ $2?lang=$1&%{QUERY_STRING} [L]
RewriteRule ^(dj-mixes|mixuri-dj) $ dj-mixes.php
Rewriterule ^dj-mixes/(.*)$
http://www.domain.com/en/dj-mixes$1 [r=301,L]
Rewriterule ^mixuri-dj/(.*)$
http://www.domain.com/en/mixuri-dj$1 [r=301,L]
lang.en.php
lang.ro.php
$lang['URL_DJMIXES'] dj-mixes
mixuri-dj

In ./templates/admin/assets/plugins/kcfinder/conf/config.php replace 'uploadURL' =>"value_to_replace" with url to ./uploads directory like in example 'uploadURL' =>"http://www.domain.com/uploads".

Email templates

Email templates are used for the emails sent (using HTML) from your website. You can customize the templates using your text. All templates are inside the folder templates/mail/, below the welcome template as an example:

			<html>
				<head>
					<title>%%SITE_TITLE%%</title>
				</head>
				<body>
				
					<p>Hello %%FIRST_NAME%% %%LAST_NAME%%!</p>

					<p>Welcome and thank you for registering at %%SITE_TITLE%%!</p>

					<p>Here are your account details:</p>
					
					<p>
						Name: %%FIRST_NAME%% %%LAST_NAME%%<br />
						Email address: %%EMAIL%%<br />
						Password: *hidden*
					</p>
					
					<p>
						Thanks,<br />
						%%SITE_TITLE%%
					</p>
					
					<p>* Do not respond to this email  *</p>
					
					<p>
						This is  an automatic email  sent from our support  system.<br />
						Do not respond to this email, you will not receive any response!
					</p>
					
					<p><a href="%%SITE_URL%%" target="_blank">%%SITE_TITLE%%</a></p>
					
				</body>
			</html>

You may notice text that looks like this %%EMAIL%%. This is called a token and is used by the system to fill in information to be put in the email. In this case %%EMAIL%% is the token to display the user email.

Requirements

  • Operating System
    • Linux
  • Web server
    • Apache
  • MySQL 5+
  • PHP 5.3+ (PDO extension and GD library required)
  • PHP Settings
    • File uploads: On
    • Session: On
    • Register Globals: Off

Files included

  • Installer
  • Core library
  • Database tables
  • jQuery library
  • jQuery UI
  • jQuery plugin: Select2
  • jQuery plugin: Fancybox
  • jQuery plugin: Nicescroll
  • jQuery plugin: FlexSlider
  • jQuery plugin: FluidVids
  • Javascript validation library: Parsley
  • CKEditor WYSIWYG editor
  • Web file manager: KCFinder
  • Bootstrap wysihtml5 editor
  • Bootstrap plugin: Date/Time Picker
  • Bootsrap plugin: Tags Input
  • Bootstrap plugin: File Input
  • Social share plugin
  • Social authentication library: HybridAuth
  • Custom JS files
  • Custom CSS files

Changelog

v2.0 (27/10/2014)
* New: More audio players: soundcloud, mixcloud
* New: Option to add mix videos from youtube or vimeo
* New: Image and video galleries
* New: Mix category management
* New: Mix sending form
* New: Social login with Facebook, Twitter, Google +, Linkedin, Yahoo
* New: Authentication system
* New: User registration
* New: User management
* Few more fixes and enhancements

v1.0 (21/08/2014)
* Initial release

Credits

Support notes

We may receive many emails and requests for support than we can manage quickly. For those we will try to answer the same day but for others it will take longer.

Before you send a request for support make sure you have done the following things:

  • Read the full documentation file.
  • Check if your question is not already in the Item Discussion section.

To be able to help solve a problem quickly, please read our Daniel Rusu or Alin Hort profile page. We will do our best to help.