Premium URL Shortener A Premium URL shortener by KBRmedia

Table of Content

Upgrading to 5.0

Version 5.0 is perhaps the biggest update ever. Mant things have changed and new features were added. You will need to replace all files and follow the instructions below very carefully.

A new subscription module has been added that uses Stripe. To activate this feature you will need an active Extended License as per Envato's Licence terms.

  1. Backup your files and your database
  2. Upload new files to your server and overwrite your old files
  3. Run the file updater.php
  4. Once the update is completed, you should be able to use the new features

Upgrading to 4.3.2

Fixed an issue to prevent dublicates of the same URL. Replace the file incudes/Short.class.php.

Upgrading to 4.3.1

The updater has been fixed.

Upgrading to 4.3

Version 4.3 is another major update that includes many new features and improvements. A couple of bugs were fixed and performance was improved. Simply follow the instructions below to update to the latest version. If you want to upload on a file-by-file basis (not recommended), I suggest you don't update it because many files were updated/modified.

  1. Backup your files and your database
  2. Upload new files to your server and overwrite your old files
  3. Run the file updater.php
  4. Once the update is completed, you should be able to use the new features

Upgrading to 4.2.6

Some bugs were fixed. Make sure to upload all files below. Where a folder is specified, upload the whole folder.

  1. includes/
    • core.php
    • App.class.php
    • User.class.php
    • Short.class.php
    • Main.class.php
    • library/
  2. static/
    • application.js
    • server.js
  3. themes/default/
    • style.css
    • header.php
    • media.php
    • components/url_loop.php
  4. themes/cleanex/
    • style.css
    • header.php
    • media.php
    • components/url_loop.php

Upgrading to 4.2.4

Some important bug were fixed. Please replace the following files:

  1. includes/
    • App.class.php
    • User.class.php
    • Short.class.php
    • Main.class.php
    • library/Recaptcha.php
  2. themes/default/
    • style.css
  3. themes/cleanex/
    • style.css

Upgrading to 4.2.3

A small but important bug was fixed. Please replace the following files:

  1. includes/
    • App.class.php
  2. themes/default/
    • frame.php
    • spalsh.php
  3. themes/cleanex/
    • frame.php
    • spalsh.php

Upgrading to 4.2.2

The checkbox issue was fixed and the database class was updater. The two files to replace are includes/App.class.php and includes/Database.class.php. Also replace includes/core.php to update version.

Upgrading to 4.2.1

The automatic redirection was reverted back so it actually redirects. To update simply upload the file includes/Short.class.php and the file includes/core.php to change the version.

Upgrading to 4.2

Version 4.2 is another major update that includes many new features and improvements. There is a new clean theme called "CleanPixel" that can be activated at any time via the admin panel. There is also a new feature that allows you to offer all premium features for free. Google connect has been updated to use the latest API. A couple of bugs were fixed and performance was improved. Finally Google Analytics was removed to many issues. It will remain this way until a better method is found. Simply follow the instructions below to update to the latest version. If you want to upload on a file-by-file basis (not recommended), I suggest you don't update it because many files were updated/modified.

  1. Backup your files and your database
  2. Delete all files from your server
  3. Upload new files to your server
  4. Open the file includes/config_sample.php and fill the database info, security key (use the old one), timezone and public token (a random hash because it is publicly visible then rename that to config.php
  5. Run the file updater.php
  6. Once the update is completed, you should be able to use the new features

Upgrading to 4.1

Some bugs were fixed in version 4.1 and some small additions were made. The easiest and safest way to upgrade from 4.0 is to overwrite everything except config.php, updater.php and installer.php however if you have made some changes you may upload only following files:

  1. admin/system/
    • settings.php
    • user.php
    • urls.php
  2. includes/
    • Admin.class.php
    • App.class.php
    • core.php
    • Short.class.php
    • User.class.php
    • Main.class.php
  3. static/application.js
  4. themes/default/
    • index.php
    • media.php
    • style.css
    • user.php
    • components/shortener.php

Upgrading to 4.0

There are many new additions in version 4.0 both in the database and core features for this reason it is highly recommended to make a clean installation. Please note that you are not required to update if you are perfectly happy with current version. You can still upgrade you current version however some features like the recent activities will not work properly because the database has been optimized.The major change has been in the stats table. This was done to simplify the retrieval of data thus all old clicks will not be updated and will miss some information.

Instructions

  1. Backup your files and your database
  2. Delete all files from your server
  3. Upload new files to your server
  4. Open the file includes/config_sample.php and fill the database info, security key (use the old one), timezone and public token (a random hash because it is publicly visible then rename that to config.php
  5. Run the file updater.php
  6. Once the update is completed, you should be able to use the new features

If you are updating from 3.0 please run update3.php FIRST located in the same folder as this file. If you are updating from version 2.X, run update2.php then update3.php then the new updater.php

Upgrading to 3.1

Some improvements and small additions have been made throughout. Please replace the list of files below:
  • admin/
    1. static/dashboard.js
    2. system/settings.php
    3. system/editor.php
  • includes/
    1. Admin.class.php
    2. App.class.php
    3. Short.class.php
    4. Main.class.php
    5. core.php
  • static/
    1. application.js
    2. bookmarklet.js
    3. Add new js/ folder
  • themes/default/
    1. style.css
    2. user.php
    3. index.php
    4. stats.php
    5. screenshot.jpg
  • /
    1. analytics.php

Upgrading to 3.0.1

An important bug was fixed in the includes/Admin.class.php which deleted all URLs instead of inactive ones. The bookmarklet was also updated in /static.
	1. Replace includes/Admin.class.php
	2. Replace includes/Database.class.php
	3. Replace static/bookmarklet.js
	4. Replace themes/default/footer.php

Upgrading to 3.0

Many files have been updated in this version therefore it is strongly recommended to upload everything. As always make sure to backup everything (database + files) first. View change-log below, for a complete list of additions.
	1. Backup and Download all files
	2. Upload new files
	3. In includes/config.php (you existing one), add   "secret_key" => "", right before "debug"=>0,
		 3.1 DO NOT FILL THE SECRET KEY ABOVE, UNLESS YOU ARE DOING A NEW INSTALLATION.
	4. Run Updater.php	
	5. Update new features in the admin panel
Note: Those who have already upgraded to 3.0 and experience some issues, please redownload the package from codecanyon and replace the following file: updater.php, App.class.php, Short.class.php, core.php, themes/default/user.php. Run the updater.php to fix DB.

Upgrading to 2.0.1

These have been fixed: There was an issue with updater where it didn't add the column 'username' in the database. An issue in the admin panel, where additon of an apostrophe caused an error. An small issue in themes/default/login.php that didn't send the password.

Upgrading to 2.0

Version 2.0 has been completely rewritten with maintainability, performance and customization in mind. Therefore to successfully upgrade to version 2.0, please do each of the following (failing to do one might crash the application and causes errors). If something goes, wrong please send me an email from my codecanyon profile including as much details as possible on the issue and an ftp access, if necessary. FYI,there is a complete change log below for this new version.

Upgrading instructions

  1. Download to your computer a FULL backup of both your database and files. This is very important in case something goes wrong.
  2. DELETE ALL FILES related to the previous version of the shortener.
  3. Upload and extract the new main.zip to your server.
  4. In includes/ find config_sample.php and rename it to config.php
  5. Open config.php and fill in your database info along with your Google analytics (exactly like the previous version).
  6. Go to your site at http://YOURSITE/updater.php and follow instructions.
  7. After running the updater, the updater will attempt to delete itself, just make sure that it has been deleted.
  8. Finally, delete install.php and go to your homepage and enjoy the new awesome features.

Upgrading to 1.8.3

Updated twitter connect to work with the new API. All you need to do is to replace everything in /connect folder by the new files you get from the new zip file.

Upgrading to 1.8.2

In this version, a small issue was fixed to prevent users or bots from shortening URLs of the site where the shortener is installed. Moreover, there was also an addition to prevent users from abusing clicks. Now each time a user clicks on a link, no matter how any times the browser is refreshed, the number of clicks will not be updated for 5 mins from the first click. This number can be easily changed according to your preference: Open Core.php and find define('Click_Interval','5'); and replace "5" by the number of minutes to wait before taking into account the click from the SAME USER. In Short.class.php the function isBot was added at the end and the function update was updated with two new piece of code.

Upgrading to 1.8.1

A small bug preventing users to delete their URLs was fixed in User.class.php. This is the only file affected. You can either replace this file or correct the error your self.

To correct it yourself, open User.class.php and go line 317 where you will see the following code:

$query="DELETE FROM {$this->config["prefix"]}url WHERE id=:id AND uid=:uid";
Just replace uid= by userid= and this will fix the issue. You also have to open core.php and update the version to 1.8.1 or you can just replace it by the new one.

Upgrading to 1.8

Version 1.8 is a major update that affects almost all core files including some template files. Please note that if you have done any modifications on the previous versions, this update will likely require you to overwrite those files. However, if you decide to continue and update the script, make sure to backup your existing version and download it to your computer.

List of new Features

  • Built-in Tracking - Option in Admin Panel
  • Multiple Domain - Option in Admin Panel
  • Bulk Shortening
  • Add/Edit/View-URLs of users as admin
  • Solvemedia Captcha - includes/Solvemedia.php to add your keys
  • PHPMailer - Config.php to enable it: Works with your gmail account
  • Welcome Email
  • QR Code upon Shortening - Option in Admin Panel
  • In-script Update Notification - Option in Admin Panel
  • And much more...

Instruction

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha, Facebook info, Twitter Info and Google safe browsing.
  5. Delete your old config.php and rename config_sample.php to config.php.
  6. Run the update at http://YOUSITE.com/admin/updater.php.
  7. If you made changes to the template, you can safely reupload your template files. But you have to change something things in them. You can check the list of files that are affected by this update at the end this document under "Change Log".

Upgrading to 1.7.2

Some issues that occurred in version 1.7.1 have been fixed. Only three files are affected.

Files to replace

  1. includes/User.class.php
  2. includes/core.php
  3. redirect.php
If you don't want to replace these files, you can simply fix them yourself. Assuming that you have version 1.7.1.

User.class.php - Fixes url delete issue

  1. Go to line 304 and you will see this $uid=$id[0];
  2. Replace it by this $uid=$uid[0];

core.php - Fixes current version

  1. Go to line 3 and you will see this define('_VERSION', '1.7');
  2. replace it by define('_VERSION', '1.7.2');

redirect.php - Fixes password redirection issue

  1. Go to line 51 and you will see this window.location = \"{$url}\";
  2. replace $url by $url[1]

Upgrading to 1.7.1

Version 1.7.1 doesn't include new features, but fixes a major security issue. I strongly recommend that you upgrade to version 1.7.1 immediately. All you need to do is to replace the following files. Please backup your existing files, if you have modified them.

Files to replace

  1. includes/User.class.php
  2. includes/Admin.class.php
  3. includes/Short.class.php
  4. user.php
  5. stat.php

Upgrading to 1.7

Version 1.7 is a major update, therefore all files were affected. Several additions and improvements have been done to the script. The script is now much-more social-friendly. Once you share the short URL or any URL of your site, you will the thumbnail, the title and the description of that page. For the short URLs, you will see the target URL's info. Also there has an addition of a chart for the user account page + "my top urls". A bug preventing successful Facebook registration was fixed. Google safe browsing was added to prevent spam. The database is not affected by this update, so no need to run update. Also update files are now located in Documentation/Updates/, in case you need them. Finally, in the admin panel at bottom of the page, you will notice a link along the current version of the script. Clicking on that link will redirect you to a page where you can see if there is a new update or not.

Instructions

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha, Facebook info, Twitter Info and Google safe browsing.
  5. Delete your old config.php and rename config_sample.php to config.php.

Upgrading to 1.6.1

Version 1.6. is minor update that affects only three files "User.class.php", "Short.class.php", "core.php" and "template/header.php". You only have to replace these three files and that is it. A small bug was fixed in User.class.php, and the thumbnail feature was added to header.php. An ability to detect and not allow inappropriate alias was added in Short.class.php

Upgrading to 1.6

Version 1.6 is another major update, therefore all files were affected. Several additions and improvements have been done to the script. The script now includes twitter connect, password protect and several other improvements. Due to this being a major update, I strongly recommend that you overwrite all of your files because due addition like twitter connect, the coding had to be restructured, especially authentication.

Instructions

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha, Facebook info and Twitter Info
  5. Delete your old config.php and rename config_sample.php to config.php.
  6. Point your browser to http://YOURSUTE/update.php - this will update your database by adding new settings: You must do this or the script will not work!.
  7. Delete update.php

Upgrading to 1.5

Version 1.5 is another major update, therefore all files were affected. Several additions and improvements have been done to the script. The script now includes an advanced stats system (Google Analytics) and several other improvements.

Instructions

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha and Facebook info
  5. Delete your old config.php and rename config_sample.php to config.php.
  6. Point your browser to http://YOURSUTE/update.php - this will update your database by adding new settings.
  7. Delete update.php

Upgrading to 1.4

Version 1.4 is minor update. Only admin files have been edited. Additions: Delete a custom page, added pagination to user page, added a button to remove all inactive URLs.

Instructions

  1. You can only upload the index.php in the "admin" folder and Admin.class.php in includes folder. Other files were not affected. A small addition was also made to front-end style.css

Upgrading to 1.3

Version 1.3 is another major update, therefore all files were affected. Several additions and improvements have been done to the script. The script now integrates Facebook Connect. Moreover, the overall performance of the script has been improved. It is now 20% faster than the previous version. To upgrade to the latest version, please follow these steps:

Instructions

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha and Facebook info
  5. Delete your old config.php and rename config_sample.php to config.php.
  6. Point your browser to http://YOURSUTE/update.php - this will update your database by adding new settings.
  7. Delete update.php

Upgrading to 1.2

In version 1.2, there has been some minor changes so only some files are affected. Here is a list: footer.php, index.php, Short.class.php, User.class.php, and the language file. Moreover, there has been an addition of a bookmarklet. The code for it is located in footer.php

Upgrading to 1.1

An addition of a core feature requires that you replace all files with new ones. PLEASE BACKUP YOUR OLD FILES FIRST IN CASE SOMETHING GOES WRONG!. The translation file uses a PHP function that has to wrap all texts, thus modification of all files were required. If you have edited one or several files, PLEASE BACKUP FIRST so you apply the change back again.

Instructions

  1. Back up your old files and download them to your computer.
  2. Unzip the new main.zip to your server
  3. DELETE install.php from your server
  4. Open includes/config_sample.php and fill in your database and reCaptcha info
  5. Delete your old config.php and rename config_sample.php to config.php.
  6. Your website is fully upgraded to version 1.1

Change Log

Version 5.0

=== New Features ===

+ Subscription module with Stripe
+ Automated payment management
+ New premium theme with many new features
+ Targeting Pixels
+ Link expiration
+ Homepage settings (stats, directory, history)
+ Full-Page script
+ Quick Shortening
+ New Tools page with instructions for user
+ Adblock detection
+ Default user type
+ Limit number for URLs for free users
+ Pricing page
+ Premium users more customization of URLs
+ API Changes
+ much more

=== Improvements ===
+ Shortening speed 
+ Performance improvements
+ Google Safe upgrade
+ Phistank upgrade
+ GeoIP upgrade
+ Template fixes
+ much more

Version 4.3.2

+ Fixed duplicate URL issue

Version 4.3.1

+ Updated the updater

Version 4.3

+ Added new overlay redirection type
+ Added OS & Device Stats
+ Added device targeting
+ Optimized speed & data handling
+ Fixed some minor bugs
+ Fixed some design bugs
- Default removed because it was outdated

Version 4.2.6

+ Fixed Facebook login
+ Fixed PHPmailer
+ Removed zClip
+ Added Cliboard.js

Version 4.2.4

+ Fixed Bugs
+ Added Recaptcha 2

Version 4.2 Major Update

+ Fixed Bugs
+ Improved performance
+ Added new theme
+ Added Delete Anonymous URLs in the admin panel
+ Added Disable Pro Module
+ Added Public URL List
+ Updated Google Connect

Version 4.1 Minor Update

+ Bugs & typos fixed
+ Added code helper in admin panel
+ Added last payments
+ Added renew membership notice
+ Fixed anonymous history
+ Added new language strings in the lang_sample.php

Version 4.0 Major Update

+ New Template built on Bootstrap 3.1
+ New UI
+ Premium Features and PayPal integration
+ Redesigned Admin panel
   + Redesigned Theme Editor
   + Comprehensive Stats
   + Much More
+ Advanced User Dashboard with live stats
+ And much much more...

Version 3.1 Minor Update

Version 3.0
+ Admin 
	+ Modified text and fixed some bugs
	+ Fixed editor bugs
+ User
	+ Added Shortener form
	+ Ads slots
	+ Fixed some bugs				
+ Script
	+ Add new security features
	+ New analytics design/data
	+ Updated bookmarklet
	+ Some CSS bugs fixed

Version 3.0 Major Update

Version 3.0
+ Admin 
	+ Added more in documentation (admin/system/help.php)	
	+ Added more settings (admin/system/settings.php)	
		+ Logo
		+ Paypal Email
		+ Ad Removal Cost (USD)
		+ Custom Splash Page Cost (USD)
		+ Maintenance Tools
	+ Improved Performance
+ User
	+ Ad removal via paypal
	+ Unlock custom splash page via paypal
	+ Enable media gateway
	+ Archived URLs
	+ Set default domain name
	+ Export URLs
	- Removed Graph (not much useful)				
+ Script
	+ New Template
	+ In-Page Bookmarklet (Beta)		
	+ GeoIP Database (must be downloaded separately)
	+ Improved Performance

Version 2.1 Minor Update

Version 2.1
+ Admin 
		+ Added more in documentation (admin/system/help.php)	
		+ Changed text in settings page (admin/system/settings.php)	
		+ Added delete inactive Links in url page (admin/system/urls.php)	 
    + Added Select all in url page (admin/system/urls.php)	    
    + Added Select all code in dashboard.js (admin/static/dashboard.js)	
+ includes/Short.class.php FULL
+ includes/App.class.php FULL
+ includes/Main.class.php FULL
+ includes/core.php
+ Index.php FULL	

Version 2.0.1 Minor Update

+ Admin Panel issue fixed (includes/Admin.class.php)
+ Forgot password field issue
+ Updater

Version 2.0 - A super major update like you have never seen before

+ Completely redesigned - Both front-end and Back-end
+ Theme system + Theme editor (much like wordpress)
+ Translation Manager
  + Create new Translation
  + Edit/Delete existing Translation
+ Export list of users as CSV
+ New method to translate pages (view in-app documentation)
+ New Settings and options in admin panel
	+ All options moved from PHP to settings panel
	+ New additions
		+ Default language
		+ Domain + Keyword Blacklisting
		+ Private service
		+ and much more
+ In-App Quick Documentation		
+ New User panel
	+	User can edit URLs
	+ Create and Manage Bundles
	+ Manage Public Profile
	+ Manage Public URLs
	+ Search for URLs
	+ Addition of username
+ Much more URL validation process
+ Advanced advertisement system (ability to disable ads per URL or user)	
+ QR Code generator (just add /qr at the end of the short URL to generate the QR)
+ Self Thumbnail generator (depends on external API though "mshots" or "pagepeeker")
+ Anonymous User History (homepage only)
+ Redesigned stats page
	+ Three chart modes (24h, 7 days, 30 days)
	- Browser and OS stats for consistency (will come back in the future)
+ Better API with support for JSONP (developers no longer depend on PHP)	
	+ Text format addition (just add &format=text)
	+ Developers can now shorten using a custom alias (just add &custom=SOMETHING)
++ So much more that I can't remember	

Version 1.8.2 - Minor Update

Only two files are affected by this update: "includes/Short.class.php" and "includes/Core.php". You just need to replace them and that is it.

Version 1.8 - Major Update

Several files are affected by this update. Although I recommend you to replace ALL FILES, but if you wish you can replace these files:
  • ALL FILES IN INCLUDES/ FOLDER - Very Important
  • ajax.php
  • Google.Analytics is now renamed as analytics.php
  • .htaccess
  • redirect.php
  • index.php
  • Some new styles were added in style.css
  • New functions in static/js/global.js
  • ALL FILES IN ADMIN FOLDER - IMPORTANT
  • Bug fixed in template/header.php
  • New elements added in template/index.php
  • New elements added in template/register.php
  • New Language Strings added in includes/lang/fr.php and includes/lang/lang_sample.php

Version 1.7 - A Major Update

Social Integration

Now this script is much more social-friendly. Every URLs has its own thumbnail, title and description so they look really good on Facebook.

Google Safe Browsing

Now you are even more safe with the addition of google safe browsing api. This will check every url submitted against the list provided by google. If the the url is know to be malicious, it will not be allowed. To enable this, simply register for a key (check index.html) and add it in config.php. To disable it, remove the api key from config.php

User Charts + Stats

Now on user account page, users can view a chart showing the number of urls they have shortened and their top urls.

Add ability to add a prefix to your database tables.

Facebook Connect Fix

Splash Page Responsiveness

Minor Bugs fixed

Version 1.6 - A Minor Update

Twitter Connect

In this version, twitter connect has been added. Now users can login using twitter the same way they use facebook. You must enable twitter connect for it to appear and function. You can do that on the admin panel. You must register your website on Twiter.com. You can find the instruction in "index.html".

Splash Page Added

You now have the option to activate the splash page. This shows the thumbnail of the website and a message warning them about its content. You can edit the splash page by editing "template/splash.php".

Password Protect Feature

Users can now add a password to their URL, hence making them private. If a URL is password protected then redirection AND statistics will REQUIRE the password. Otherwise they will not be shown or can be accessed.

Cookie-Based Login

Now users can decide to stay logged-in for up to 5 days by simply clicking "Remember Me".

Even more Advanced API

You can now call the call the stats of a short URL by simply using the following format:
http://YOURSITE/api/?short=SHORTURL
Stats for URLs marked as private or with a password will not be shown.

Edit URLs

The admin (ONLY) can edit URLs by simply clicking "edit" next to the URL.

Users can now delete their URLs

Admin can now filter URLs under "Manage URLs" tab

CSS/jQuery Bug Fixed

Added ftp-shortening support

New Translation Text Added (View Sample lang file)

Version 1.5 - A Minor Update

Advanced Stats

Uses the powerful analytics service, Google Analytics to provide with advanced stats. The stats of all URLs shortened by registered users are now private.

Accepts URLs without http://

Accepts URLs without http://.

Admin Panel Improvements

Some improvements have been done to the admin panel.

Version 1.4 - A Minor Update

Admin Panel Improved and Addition of "clean up" button

You can clean up inactive URLS by simply clicking the red button.

Version 1.3 - A Major Update

New Facebook Connect

Users can now login using their facebook account. Please click here to configure facebook connect.

API now supports unshortening of short URLS

Users can now easily unshorten urls.

Improvement of Performance

Performance has been improved. Now the script runs upto 20% faster than the previous version. Due to this, all files were updated.

Updated Template Files

Template files are now all located in template/. No need edit the main files anymore.

Updated Template Files

Version 1.2 - A Minor Update

New Bookmartlet Feature Added

Users can now drag the bookmarklet link to their bookmark bar and easily shorten all URLs.

Bugs and Typos

Some bugs and typos have been fixed in several files.

New Translation Feature Added

You can now easily translate most of the text of your website by simply editing a file. Please note that due to this being a core update, all of the major files have been updated.

Maintenance Option Improved

Now you can login as Admin and navigate the site freely while anonymous and registered users will see the maintenance page everywhere except redirection (i.e. short URLs will still work). This will give you time to edit your site. You need to first set the option of maintenance to "Offline" then if you want to login simple go to http://YOURSITE/user/login and login as Admin. Then you can freely access all pages while others cannot.

Fixed some bugs in Style.css and Theme CSS files

Fixed some CSS bugs in style.css and other theme css files.