# SEO Studio 3.6 Documentation

Welcome to the documentation for SEO Studio version 3.6. This version of the studio was released on August 17, 2014.

To begin, click on an item in the navigation on the left. Or, click here to start at the beginning of the documentation.

# Getting Started

## Requirements

This application contains numerous unique tools, many of which require different extensions, configuration, and settings. We have done our best to minimize these requirements, but at minimum you need to have the following:

- PHP 5.5 or newer (older versions may work, but we don't always support them)
- PHP CURL extension
- PHP JSON extension installed
- PHP Short Open Tags must be enabled
- PHP Safe Mode must be disabled

## Installing

You can install the studio anywhere you want. It can be placed on a subdomain, subdirectory, or root directory. The application will adjust to its environment for you.

Before installing, locate the folder you wish to install the application to. It must be an empty folder. Then, follow these steps:

1. Open the application's .zip file you received from CodeCanyon. If you don't know where to find it, click here.
2. Open the Files » Installation directory.
3. Copy the entire "install" folder, along with the index.php file, to your chosen installation directory.

Now, you have uploaded the installation wizard. You now must run the wizard. In your web browser, navigate to the installation directory. You will be redirected automatically into the installation wizard.

## Common Problems

The installer was designed to set file CHMODs automatically. Sometimes, however, this process does not work due to server limits.

If you notice that you are unable to log in with the email and password you set, this means you need to manually set the file permissions. In the directory you installed to, open the new /data/ directory, and set all files inside to have a CHMOD of 0777. Then, log in using admin as your email and password.

# Configuring

## Accessing the Admin Panel

The admin panel makes modifying and managing the application easy. To access it, click the Admin button in the navigation, or manually navigate to the /admin/ folder.

## Complete the Checklist

When you log into the admin panel, you will see a "Studio Setup Checklist". Before continuing, complete all items on that checklist so that they have a green "thumbs-up" icon. Then, come back here and continue moving forward.

Once you complete all the checklist items, the checklist will disappear from the front page within a few minutes.

## Change Settings

On the left navigation bar, click "Settings". Ensure that the Website URL is correct, and give your website a name if not done already. When you're finished, click "Save Changes".

Now, go to the "Header & Footer" page from the left navigation bar. You can choose between a text logo or image logo. If you choose an image logo, it must be horizontal (preferred height is 35 pixels).

You can also change the copyright text. Replace "Webfector" with your name if you haven't done so already, and then hit "Save Changes".

# Admin Panel

## User Registration

Disable or enable the ability for new users to create an account on the website. You can replace the “login box” on the home page with different content, such as additional tools or your own custom HTML. Optionally require users to provide an email, and require them to verify their emails before using their account.

## Translations

Create new translations by hitting the blue + button at the top right. You can also modify or delete languages here. Optionally send us a language file to help us provide free translations to other users.

## Homepage Designer

Modify the content on the home page. Change the home page image by clicking the pencil icon overlaying it. To the right is a free file upload tool which is created by us. Feel free to use it, those images will never go offline.

## Embed Tools

Pick a tool and generate HTML code to embed it onto any page via an <iframe>. Not all tools will work.

## Users & Groups

You can disable tools for certain groups, and assign users to groups manually. You can also choose a default group for new users. The group “public” represents all users who are not logged in.

## Tool Usage

Browse the usage of the tools on your website, as well as the website(s) that were entered, the user or their IP address, and the time. When a logged in user uses a tool, their username will be displayed. Clicking this username will take you to their profile. However, when a visitor (not logged in) uses a tool, it will show their IP address.

You can sort through tools via pagination (at the bottom, “Previous” or “Next” page), search through the results for an IP, website URL, tool, or time, and modify the order in which results are displayed. The default number of results per page is 100, this is also able to be changed by you.

## Ad Banners

Enter the HTML code for any ad banner which fits the size stated. It does not have to be AdSense, as long as the dimensions are either 728x90, 160x600, or 300x250 (pixels, width x height).

## Diagnostics

Instantly check the application for numerous faults and errors. Detected issues are sometimes resolved automatically (wherever possible).
When error logs are present within the application, it will be noted at the bottom of this page. You will be given an option to send them to us (please do, it helps fix bugs).

# Support

## Important Information

Webfector does not have a dedicated support team. It is one single developer, who is currently in college and working a full-time job. Please don't expect quick responses, but definitely expect a response!

Average response time (July 1 — August 1) was 35 hours. The response time varies based on the day of the week.

When will I provide support? If you meet all requirements, I will provide support. If you don't meet all requirements, I may or may not, based on the difficulty of working around your missing requirements.

## Contact Me

To get support, open at ticket at support.webfector.com (recommended) or directly email support@webfector.com.

The support website (recommended) will prompt you for FTP information. If you're in a hurry, feel free to provide them. The FTP details are stored securely under multiple layers of encryption and password protection, and are scattered among multiple locations.

# Remote API

## Overview

SEO Studio has its own local API, and works with two remote APIs:

- Webfector API
- Altusia API

Developers can take advantage of these three APIs to create their own SEO Studio tools or add-ons.

## Webfector API

The Webfector API is a JSON service provided at api.webfector.com. Here's a list of API calls (hover over a [#] to see info):

- api.webfector.com/public/whois?domain=[1]&auth=[2]
- api.webfector.com/public/addons/seo-studio
- api.webfector.com/1.2/updates/latest?token=[1]&app=[2]

## Altusia API

The Altusia API is a JSON service provided at api.altusia.com. It is the primary API for SEO Studio. Here's a list of API calls (hover over a [#] to see info):

- api.altusia.com/echo
- api.altusia.com/gate/channel?uri=[1] (downloads and returns the webpage at "uri")
- api.altusia.com/seo-studio/latest-version
- api.altusia.com/seo-studio/latest-version-details
- api.altusia.com/seo-studio/terms
- api.altusia.com/web-studio/latest-version
- api.altusia.com/web-studio/latest-version-details
- api.altusia.com/web-studio/terms

# SEO Studio API

## Database

- File: /libraries/database.php
- Constructor: new Database("data/main.db", "data/alerts.json")
- Methods:
  - void open() — Opens database connection
  - bool canRead() — Returns true if can read db file, false otherwise
  - void save() — Saves changes to database
  - void write($setting, $value) — Writes value to a database setting
  - void read($setting) — Returns value to a database setting
  - void alert($text) — Creates new admin alert

## Application Manager

- File: /libraries/toolapp.php
- Constructor: Private, should not be constructed
- Details: All tools must use this to work properly
- Methods:
  - void setPageName($name) — Sets tool name
  - void setProcessor($file) — Processor filename (i.e. "process.php")
  - void requestForm(Enum) — Requests a default input form
    - SINGLE_DOMAIN_NAME
    - THREE_DOMAIN_NAMES
    - SINGLE_TEXTAREA
    - TAGS_TEXT
    - EMAIL
    - NONE
  - void setInputNames($names[]) — Sets array of input names
  - void setInputRequired($names[]) — Requires matching inputs
  - void setInputValidation(Enum) — Defines input validation method
    - VALID_URL
    - VALID_TAGS
  - void overrideForm($id) — Overrides input form to file $id
  - String getInput($name) — Gets input matching $name
- Attributes:
  - bool $forcingProceed — Forces processor to run without input

## Global Functions

You should use these functions when needed, instead of creating alternatives.

- curl_exec($ch) — Executes curl handler
- curl_exec_follow($ch) — Executes curl handler, and follows redirects
- file_get_html($url) — Downloads $url and returns its HTML DOM
- isValid($url) — Checks if the URL can be connected to (returns true/false)
- isProperURL($url) — Checks if URL is proper (returns true/false)
- doFault() — Raises error, redirects to home page

## Global Variables

You should use these variables when needed, instead of creating alternatives. These only apply to the front-end of SEO Studio, and not the admin panel.

- $db — Database handle
- $lang — Language database handle
- $account — Account management handle
- $path — Represents a path to the root directory
- $title — The current page title
- $ads — Ad banner handle