“Tripbuddy” - Documentation


Product name: Tripbuddy

Author: Qdev - All rights reserved

Product link: Tripbuddy

Release date: 7/13/2016

Last upate date: 8/?/2016

Product Version: 1.4

Table of contents:


- Requirements
- FourSquare API key

Installing the script

- Uploading the files


- Tripbuddy - Install mode

Admin Panel

- How to use admin panel

Customisation and more

- Basic structure
- Adding languages


Before we start with the installation, ensure you have met the following requirements:

1. Get your Foursquare API key

The first thing you need before proceeding with the script install, is a Foursquare API Key. Just go to their site, hit register, and once you did that, you should be able to create a new app, like in the images below.

Click on "Create a new app". You should get redirected to the next page, where you will have to insert your App name and the Domain. All the other fields are optional.

Once you did this, you should be prompted your new Client ID and Client Secret. Save these for later, because we will need to add them in our Tripbuddy installation.

2. Uploading the files

If you are using a shared web server hosting, there's a chance you might have received your FTP and MySql information at activation. Still, if you have a VPS or a different shared hosting package and you have cPanel installed, you can create you FTP/MySql users inside the panel doing like in the pictures below.

So, the first thing you need, is a FTP account which will be used to transfer the files that you have downloaded from codecanyon (The "Script" folder only) to your server.

To do this, follow the instructions from the image below:

As you can see in the image, the first thing you have to do, is to go to the "Files" category, and select "FTP Accounts". After you did that, complete that form as you want (what username & password you want).

Once you got your FTP account, you can upload you all the files from "Script" folder (that you have downloaded from codecanyon) into your "public_html"/"www" folder using a FTP client, like Filezilla. If you have trouble uploading your files, try this tutorial or any other from the internet.

3. Installation

Once you get the script uploaded on our host, we are ready to begin the actual installation. Before jumping into the installation, we need to do one more thing, and that is to set "app/data/site-settings.json" file permissions to 777, like in the image below.

And now we are ready to go. Just open up your installation path in your browser (Eg: tripbuddy-app.com/demo), where you should be welcomed by the installation script.

Here are some things you might want to know about these fields:

4. Admin panel

Before we jump in into the admin panel, we will have to change the default credentials, located in the "app/core/core-config.php" file.

Once you did that, simply append a "?admin" to your installation path. (Eg: tripbuddy-app.com/demo?admin)

If everything went well, you should see be able to access the admin panel. At the moment, the panel is splitted in 3 categories, each containing different options.

App name

App engine

App looks

5. Customisation

Basic structure

Here is the basic structure of the app, in case you want to have a look at the code.

  • index.php - Main bootstraping file. Here the iframes are loaded based on different actions
  • app/
    • assets/ - Here we store the assets, like css, js, fonts etc. Most important are:
      • app.js - This file contains the main navigation core + other helpers. The scope is outside the iframe, so everything inside it must be used via the mainFrame var.
      • pages/
        • *.js - Here you can add page (view) specific code. Scope is local (Outside the iframe).
    • core/
      • core-config.php - Simple config that wraps up the site settings and client specific settings.
      • core-helper.php - Differents helper functions and classes.
      • core-init.php - This basically initialises the "framework". It also does some route pre-processing.
      • core-loader.php - This file acts both as a Routing and a Controller, serving content
    • data/
      • site-settings.json - Holds the basic site settings variables.
    • langs/ - Here is where the language files are going.
    • libs/ - 3rd party libraries.
    • views/
      • template/ - Main template skeleton views.
      • pages/ - Pages (views) specific views.

Adding languages

In order to add a new language, you will have to create a new .php file in the app/langs/ folder, using the file skeleton of a previous used language.

Once you do that, then you will have to update the site-settings.json file, by appending your language into the siteLanguages object, just as the other languages. Everything should be pretty self explinatory once you get there.

6. You`re done, profit!

This is all for now, if everything went ok, you should have your own Travel Web App by now. If you have any other questions please don`t hesitate to contact me trough my codecanyon profile, located here: Qdev - ic0de .