# Requirements

Petition needs the following server extensions and modules:

  • PHP 5.4+
  • Mysql 5+
  • Mysqli
  • The mod_rewrite Apache module
# Installation
Step 1
  • Set the transfer type to Binary (if you`re using FTP)
  • Copy all files from the src directory to your web server.
  • Access install.php

The installation wizard will notice you if it encounters errors.
The following image represents what you will see if the wizard not encounters errors.
  • Complete the following fields with requested informations. The website address must contains http://.



Step 2

Move on and complete the database configuration. Remember that you have to create the username and the database before completing this form.


Step 3

Finally, creating the first administrator account.
Don`t forget to delete the install.php file after installation ! Otherwise it will represent a lack of security



Step 4

Press on the Installation button.
If no errors occurred you're ready to use your own online petitions website.

# General settings
You can edit the following fields by accessing Amin Panel -> Settings -> General

  • Website title
  • Website description
  • Website address
  • Website language
# SMTP Configuration

Petition sends emails to users in two situations:

  • Recovering password
  • Creating an account from the petition page

By default, the php function mail() is used for sending emails but a SMTP connection can be set if you want.
Log in as administrator and access Admin Panel -> Settings -> Mail.


# Edit Terms and Privacy

The Terms and Conditions and Privacy pages can be edited from the Admin Panel -> Pages using a WYSIWYG editor.


# Custom panels

Custom panels are spots on your website where you can put your own code directly from the Admin Panel -> Theme.
There are 4 spots yet: Sidebar (Personal Data page), Sidebar (Browse page), Homepage, Footer. The Footer is a little bit different because it is placed just before </body> so it will be used just for implementing scripts (e.g. Google Analytics).

For the sidebar panels we recommend using the Bootstrap library. e.g.


<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">TEST</h4>
</div>
<div class="panel-body">Advertisement</div>
</div>

Preview:
# Creating an account

Click on Log in / Sign up link from the right side of the navigation bar.

You will be asked to log in but you don`t have an account already. So click on Sign up


The next step in the registration process is to complete the following fields

  • First name - Your given name (Only alphanumeric characters are allowed)
  • Last name - Your family name (Only alphanumeric characters are allowed)
  • Email address - One email address cannot be registered with multiple accounts
  • Password - Minimum 5 characters

After completing all these fields press the Sign up button. You will be logged in and redirected to your account page.

# Start a petition
Step 1
Login to your account

Step 2
Click on Start a petition;
Complete the following fields

  • Title - Petition title (Keep it short and to the point)
  • Description - Explain the problem you want to solve
  • Image - Petition image (optional)

Final step
Press the Start petition button.
You wil be redirected to the petition page


# Edit account
Click on your name from the right side of the navigation bar. A pop-up menu will appear. Click on Personal data link.

You will now see the Personal data page where you can edit all your account informations.

All fields are required.
# Change password
Click on your name from the right side of the navigation bar. A pop-up menu will appear. Click on Change password link.

You will now see the Change password page where you can change your password.

In the Old password filed you have to enter your current password (The one you want to change).
Enter your new password twice, in the Password field and Confirm password.
Now press the Update button.

All fields are required.
# Theme

Theme structure

footer.php
header.php
frontpage.php
style.css

All this files must be included in a directory(it`s name represents the theme name) located in the themes dicrectory.

In order to avoid problems we recommend to reuse files from the default theme.

# Language

Language structure

To create a new language for your website you have to create a directory with the name of your language and a php file with the same name inside it.
e.g. : languages/russian/russian.php

In that php file you have to define all global variables that are used to store words/phrases.
In order to avoid problems we recommend to reuse files from the english language.

Send us your language!
Send your language files and We will support your language on the next updates. contact@smailio.ro

# Change upload folder

The directory where images are uploaded is defined as a constant in maincore.php.

define('IMAGE_UPLOAD_FOLDER', 'uploads/');
Don`t forget the ending /.
# Signatures Management

You can edit/delete or search through all signatures, from all petitions, by accessing Admin Panel -> Signs

# Petitions Management
You can edit/delete or search through all petitions by accessing Admin Panel -> Petitions

To edit a petition you have to click it`s name or id.

It the right side panel from the petition edit page you can mark/unmark the victory tag and list all signatures assigned to that petition.
# Users Management
You can edit/delete or search through all registered users by accessing Admin Panel -> Users

To edit a user you have to click it`s name or id.
If you check the admin checkbox from the edit user page then the user will become an administrator (Gain access to admin panel).
# How to access Admin Panel?

Log in with an account that have permission for administration and then click on your name from the topbar nav and click Admin Panel.

# How to prevent bad words ?

You can simply prevent bad words by replacing them with stars (*).
Enter your Admin Panel -> Settings -> Bad words and enter words separated by coma.

# Where did contact messages go?

Messages posted using the contact form can be found on the Admin Panel, in the Messages page or on the top nav (Click on the message icon)

# How to change the limit of elements per page?

Every page that outputs lists of petitions or sign reasons contains a variable named $limit which is an integer that determine the maximum number of items per page.

This variable can be found on the following files:

browse.php, petition.php, profile.php,