CONTENTS
2.
1.
3.
4.
Login
.........................................................................................................................
10
Update account
.......................................................................................................
10
Create your first app
...............................................................................................
10
Add pages
................................................................................................................
10
Change theme
.........................................................................................................
10
Page background
....................................................................................................
11
App background
......................................................................................................
11
Change app icon
.....................................................................................................
11
Change campaign
...................................................................................................
11
Get QR code
.............................................................................................................
11
Add users
.................................................................................................................
12
Prerequisites .............................................................................................................
3
Installation
.................................................................................................................
4
Payment Gateway configuration
.............................................................................
6
Social login
.................................................................................................................
7
Search Engine Optimization
.....................................................................................
7
Widget configuration
................................................................................................
8
Change title
..............................................................................................................
13
Use custom domains
..............................................................................................
13
Change homepage template
.................................................................................
14
Add a translation
.....................................................................................................
14
Configure user packages
.......................................................................................
15
Add custom themes
................................................................................................
16
I get a 404
.................................................................................................................
17
I get an error like “Parse error: syntax error, unexpected ‘[‘”
............................
17
Error when registering a new account
.................................................................
18
Quick Start
Installation
How to
Troubleshooting
2
PREREQUISITES
WARNING
Requirements
Make sure your server meets the requirements below. Most of the PHP libraries are installed by
default, but please make sure they’re available on your server or hosting account.
•
PHP >= 5.5
•
MCrypt PHP Extension
•
cURL PHP Extension
•
PHP Fileinfo extension
•
PHP GD extension
•
PHP intl library
•
PHP SQLite3
•
Apache mod_rewrite
•
MySQL
Updating
If you want to update an existing installation, please see the
changelog.txt
file in the root of the
zip file. It contains a list of all modified (M), deleted (D) and added (A) files for every update. You
can see what version you currently have in
/local/app/config/system.php
.
You can manually update all files in the list or delete all files from the project, except for these
directories:
•
/uploads/, contains all user uploaded content
•
/local/app/config/production/, contains your configuration files
•
/local/app/storage/userdata/, contains user data like app statistics
Once all files are deleted except for the directories above, you can safely overwrite the last
version.
It’s strongly recommended to install the product in the root of a
domain or subdomain. We don’t provide support for installations in a
subdirectory.
3
INSTALLATION
INSTALLATION
Files
Upload files
Upload all files from the /public directory to the webroot of your hosting account.
Directory permissions
The following directories need write permissions (usually 0777 or 0755 if you use suPHP):
•
/local/app/storage/cache/
•
/local/app/storage/logs/
•
/local/app/storage/meta/
•
/local/app/storage/sessions/
•
/local/app/storage/userdata/
•
/local/app/storage/views/
•
/uploads/
•
/uploads/attachments/
•
/uploads/user/
•
/uploads/screens/
•
/stock/
•
/stock/.tmb/
•
/stock/.quarantine/
•
/static/app-backgrounds/thumbs/
Configuration files
Copy all the files from /local/app/config/production-config/ to /local/app/config/production/.
Encryption key
In order to improve security, open
/local/app/config/production/app.php
, look for the ‘key’
setting and change the random string. Easily create a 32 character random string here:
https://
identitysafe.norton.com/password-generator
.
5
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
‘key’ => ‘h3p2APrUbreXUfReC67pRepecrukuC2V’,
Database
Create an empty MySQL database on your server. Open the file
/local/app/config/production/
database.php and enter the database name, username and password.
The file looks something like this:
Email configuration
Open
/local/app/config/production/mail.php
and configure your email settings. These
settings are used to send emails like password reset and submitted info from the forms widget.
By default email encryption is ‘ssl’, but if that doesn’t work for you try ‘tls’.
First login
If all settings are done, open your browser and enter the address where the system is installed.
The first time you open the url, the database tables are created and seeded and you can login
with:
4
return array(
‘default’ => ‘mysql’,
‘connections’ => array(
‘mysql’ => array(
‘driver’ => ‘mysql’,
‘host’ => ‘localhost’,
‘database’ => ‘database_name’,
‘username’ => ‘user’,
‘password’ => ‘pass’,
),
),
);
Username
info@example.com
Password
welcome
Payment Gateway configuration
With the payment configuration you can configure how users can pay for their subscriptions.
Bank Transfer is enabled by default.
Assuming that you have copied all configuration files from
/local/app/config/production-
config/
to
/local/app/config/production/
, the payment gateway settings can be found in the
file
/local/app/config/production/payment-gateways.php
.
Automatic account upgrades, payment gateway callbacks
Since it’s pretty complicated to implement payment gateway callbacks in the AJAX architecture
and it would require the user to setup additional config at their provider, there are no automatic
callbacks for now.
By default, you have to manually upgrade a subscription after a user has upgraded. The system
owner will receive a mail notification. However, you can change this behaviour in
/local/app/
config/production/payment-gateways.php
by setting
auto_update_subscription
to true.
Now subscriptions will be upgraded when a user is going to make a payment. This upgrade will
also take place if the user cancels the payment.
General settings
The email address you enter at ‘admin_mail‘ will receive a copy of payment confirmation mails
sent to the users. If empty, this mail will default to the system’s default email address is used.
You can use multiple email addresses seperated with a comma (,).
Payment Gateway configuration
Bank Transfer
With Bank Transfer you can let clients pay their invoice by bank. You will need to check manually
if payments are received.
2Checkout
2Checkout requires that at least one shipping method exists in your account. You can create one
by logging into your account and click the “Shipping” tab. Call it something like “Online Service”
and don’t enter a Tracking URL.
Sorting the payments
You can order the way payment gateways are shown in the system by reordering them in the
configuration file.
Social login
It is possible to let people sign in with their Facebook or Twitter account. This can be configured
in
/local/app/config/production/social-login.php
. Instructions on how to obtain the necessary
keys, are described in this file.
If you don’t have this file because you’ve updated from an older version, you can copy the file
from
/local/app/config/production-config/social-login.php
to
/local/app/config/production/
social-login.php
.
Facebook login
When signing in with Facebook, the email address registered with Facebook is used. If you
already have registered a “regular” account with the same address, you won’t be able to sign in
with Facebook.
Search Engine Optimization
Every mobile site has a sitemap.xml in the root so search engines can crawl the main pages.
However, this does not work (yet) for sub pages from the Events and Coupons widget. Also,
some widgets may have content injected by AJAX which makes it impossible for search engines
to index.
If you want to turn off this feature, you can set ‘seo’ => true to ‘seo’ => false in
local/app/config/
production/system.php
. Or, if you’’ve upgraded from a version below 2.6.0 you can turn it off
in
local/app/config/system.php
. When disabled, urls will have no exclamation mark (!) and
there will be no sitemap.xml.
INSTALLATION
INSTALLATION
6
7
IMPORTANT - CURRENCIES
Please be aware of the fact that not all payment providers support all
currencies. The currency you configure at
System Administration >
User Plans
is used for the payment. If this currency isn’t supported by
the payment provider, the provider will probably show an error.
Widget configuration
Twitter widget
Configuration of the Twitter widget can be found at
/widgets/twitter/config/oauth.php
.
In order to let people connect their account to this widget, you need a Twitter API key (
https://
dev.twitter.com/faq#46
). Go to
https://apps.twitter.com
and click “Create New App”. Fill in the
details and for “Callback URL” only enter your domain (this cannot be left blank allthough the
actual callback url is set in the script). When the App has been created, click the “Keys and Access
Tokens” tab and paste the Consumer Key (api_key) and Consumer Secret (api_secret) in the
configuration file (oauth.php).
This widget doesn’t need write access, so you can click “modify app permissions” at Access Level,
and select “Read only”. Click “Update Settings” and you’re ready to go.
Alternatively, if you don’t want to use this widget, open
/widgets/twitter/config/widget.php
and set ‘active’ => false.
YouTube widget
Configuration of the YouTube widget can be found at
/widgets/youtube/config/api.php
.
In order to let people use this widget, you need a YouTube API key.
1.
Go to the Google Developers Console,
https://console.developers.google.com/
.
2.
Select a project, or create a new project.
3.
In the sidebar on the left, select APIs & auth. In the list of APIs, make sure the status is ON
for the YouTube Data API v3.
4.
In the sidebar on the left, select Credentials.
5.
At ‘Public API access’ click ‘Create new key’ and choose ‘Browser key’.
6.
Enter the website where you’ve installed the site builder and click ‘Create’. Use a wildcard
(*) after your domain, like
http://mobile.madewithpepper.com/*
7. Copy the API key and paste it in the configuration file (api.php).
It may take a few minutes for your API key to become active.
Alternatively, if you don’t want to use this widget, open
/widgets/youtube/config/widget.php
and set ‘active’ => false.
Facebook widget
Configuration of the YouTube widget can be found at
/widgets/facebook/config/app.php
.
In order to use this widget, you need a Facebook Access token.
1.
Go to
https://developers.facebook.com/
and log in.
2.
At the top menu, select My Apps > Add a New App. Or, if you’re not registered as a
developer yet, choose My Apps > Register as a Developer and accept the Facebook
Platform Policy. And then choose My Apps > Add a New App.
3.
You will be asked to select a platform, choose “Website”.
4.
Enter a name for your new app and click “Create New Facebook App ID”.
5.
Select a category, for example “Business”, and click “Create App ID”.
6.
Scroll down and enter the or of your website. Click “Next”.
7.
Go to the top menu again and select My Apps > [Name of your newly created App]
8.
Click “Show” next to App Secret.
9.
Your access token is [App ID]|[App Secret], e.g.
711549697871782|c72fc52282c656h5jj03ca9e0227aee1
Alternatively, if you don’t want to use this widget, open
/widgets/facebook/config/widget.php
and set ‘active’ => false.
Instagram
Configuration of the Instagram widget can be found at
/widgets/instagram/config/app.php
.
In order to use this widget, you need an Instagram Client ID and Client secret.
1.
Go to the Instagram Developer page,
https://instagram.com/developer/
and log in.
2.
Click on “Register your application”.
3.
If you don’t already have a application registered, you will now see a form to register a new
one. If you instead see a list of “clients”, click the “Register new client” at the top right.
4.
Set application name to your websites name.
5.
Type in a description, something like “Registering to get a client ID to use with Mobile Site
Builder Pro”.
6.
Add the url of your site at the Website URL and as a Redirect URI(s) use http://[yourdomain.
com]/api/v1/widget/get/instagram/oAuth.
7.
Hit register.
8.
Click “Manage clients” in the top menu and you will now see you new client in the list and
a client id, client secret and more. Copy the client id and client secret and paste that in the
file /widgets/instagram/config/app.php.
Alternatively, if you don’t want to use this widget, open
/widgets/instagram/config/widget.
php
and set ‘active’ => false.
INSTALLATION
INSTALLATION
8
9
HOW TO
Change homepage template
Go to
System Administration > Website
and select a template. Texts can be modified at the
Content
tab.
Add a translation
Let’s say you want to translate the system to Spanish. The locale in the example below would be
“es” and the language locale would be “es_ES”.
•
Copy the directory
/local/app/lang/en/ to /local/app/lang/[locale]/
•
Open
/local/app/lang/[locale]/i18n.php
and change:
•
“language_title” => “[Name of the language, e.g. Español]”,
•
“language_code” => “[locale]”,
•
“intl_locale” => “[language_locale]”,
•
Translate all files in the
/[locale]/
directory
•
Repeat #1 and #3 for widgets:
/widgets/[widget_name]/lang/
Once done, a dropdown menu with a flag icon will appear in the right top of the system.
If you want to show the login, registration or password reminder page in a different language,
you can add
?lang=[locale]
to the url.
HOW TO
Configure user packages
There are four packages by default and every newly registered user starts with the free account:
•
Free
•
Standard
•
Deluxe
•
Professional
Packages can be configured if you login and go to
System Administration > User Plans
. In
order to keep the system backwards compatible, all plans have permission on all widgets and
unlimited apps.
15
14
HOW TO
Add custom themes
All themes can be found in the /
themes
directory. To create a new theme, copy one of the
theme directories (except for the
_boilerplate
directory) and change the files.
/assets/css/custom.css
This file is empty, but can be used for some custom CSS to override style.css.
/assets/css/style.css
style.css contains the Ionic CSS. Ionic uses Sass to generate its stylesheet. Read more about this
here,
http://learn.ionicframework.com/formulas/working-with-sass/
. Alternatively you can use a
generator like
http://ionic-theme-editor.herokuapp.com/
.
/assets/img/background-phone.png
This is the default background image. It should be named background-phone.png and is 640 x
1136 pixels.
/assets/img/preview.png
This image is the preview image shown in the mobile site builder for the user to choose. Its di
-
mensions are 120 x 200 pixels.
/config/theme.php
Here you can set some basic configurations for the theme. You can set it active or disabled and
you can define in what categories the theme will be shown.
/lang/en/global.php
This file only contains the name of the theme.
TROUBLESHOOTING
I get a 404
There’re a few possible reasons for this.
.htaccess is missing
Some FTP clients ignore files starting with a dot (.). Please make sure the .htaccess file in the root
exists.
Apache mod_rewrite
Apache mod_rewrite isn’t enabled or installed.
RewriteBase
Some servers require RewriteBase in the .htaccess. For example, if you installed the project in
your webroot, the .htaccess should look like this:
I get an error like “Parse error: syntax error, unex-
pected ‘[‘”
This is most likely because you have PHP <= 5.3 installed. The system requires PHP >= 5.4 and
5.6 is recommended.
You can check this by uploading a PHP file (for example “info.php”) with the following content:
Visit it in your browser to see your PHP version.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<?php
echo phpinfo();
?>
17
16
TROUBLESHOOTING
Error when registering a new account
When a user registers a new account, an activation mail is sent. When you get an error after
clicking
Create new account
, this is most likely because the email settings aren’t configured
properly. Please open the file
/local/app/config/production/mail.php
and make sure the
settings are correct. If you’re not sure, ask your mail provider.
0 comentários :
Postar um comentário