Sngine - Documentation

Getting Started

Welcome

Sngine is a Social Network Platform is the best way to create your own social website or online community. Launch it in just 1 minute with ultimate features. It’s easy to install

If you have any questions that are beyond the scope of this documentation, please feel free to create a support ticket on our support system. Thanks so much!

License

To install Sngine or even to open a support ticket you must know your Purchase Code of Sngine and to get your Purchase Code

  • Login to Codecanyon and open your downloads http://codecanyon.net/downloads
  • Click on the download button of Sngine v2 and download License certificate & purchase code You can download it as a PDF or text file
  • You will find your code as the following

Installing

No coding or design skills needed. Launch in 1 minute

  • This script requires Apache Server, PHP 5.4+ and MySQL 5.0+ to run.
  • Before install Sngine please make sure that mysqli, curl, intl & mod_rewrite extensions and getimagesize() & mail() functions are enabled on your server. you can ask your hosting company to make sure to enable it for you. But don't worry Sngine will check for all of them before installing begins
  • Now make sure you create a empty MySQL database along with an user for it.
  • After unzip Sngine Files, you will found Script Folder
  • Start your FTP client (I persoanlly use Filezila which is free) and login. Login to your server. You will need your host name (often times this will be your domain name), username, and password that you setup with the hosting company.
  • Locate the domain folder you wish to upload your Sngine files to on your server. You are going to upload all files located in Script Folder to your FTP client.
  • Once the files are done uploading, you have to change chmod of content/uploads folder and content/themes/default/templates_compiled folder and content/themes/default/cache to 777.
  • Just goto your website and Sngine installer wizard will run automatically http://yourdomain.com/path_to_script
  • In case you got the following error "wizard cannot create the config file" just make sure that the includes folder is writable and after installation change it back to its normal permissions.
  • Sngine installer wizard is very clean, you will need to put your Purchase Code at step #2 and the rest is simple just follow the video tutorial
  • And That's it, Have Fun :)

Socail Logins

Facebook

After installing Sngine now you can in easy step integrate Facebook with it to let your users login with their Facebook accounts.

  • First goto: https://developers.facebook.com and Sign in with your Facebook account.
  • Now click My Apps and click Add a new App
  • Fill the form and click Create App ID
  • Then select the following product Facebook Login and click Set Up
  • Then select the following platform WWW (Web)
  • Enter your Site URL click Save and the rest of the following steps just click Continue or Next
  • App still not public and to make the app public, Go to App Review then click on Toggle button
  • Select a category for your app and click Confirm
  • Now go to Settings and enter your domain or subdomain where you installed Sngine in the App Domains then click Save Changes
  • Now go to Facebook Login Settings and enter your website domian or subdomain where you installed Sngine in the Valid OAuth redirect URIs then click Save Changes
    Make sure you have disabled the Use Strict Mode for Redirect URIs
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

Twitter

After installing Sngine now you can in easy step integrate Twitter with it to let your users login with their Twitter accounts.

  • First goto: https://apps.twitter.com/ and Sign in with your Twitter account.
  • Click Create New App and fill the form
  • Provide these URIs as the Callback URL for your application as following:
    If you installed Sngine in your domain directly like domain.com the URIs should be like these:
    http://www.domain.com/oauth.php?hauth.done=Twitter

    If you installed Sngine in sub-domain like sub.domain.com the URIs should be like these:
    http://sub.domain.com/oauth.php?hauth.done=Twitter

    If you installed Sngine in a directory like domain.com/directory the URIs should be like these:
    http://www.domain.com/directory/oauth.php?hauth.done=Twitter
  • Now back to your app page and open Keys and Access Tokens tab to copy both Consumer key and Consumer secret.
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

Google

After installing Sngine now you can in easy step integrate Google with it to let your users login with their Google accounts.

  • Go to https://code.google.com/apis/console/ and create a new project.
  • Click on Enable and manage APIs
  • Click on Credentials and Click on OAuth consent screen tab and fill the form and Save
  • Back to Credentials tab and click on Create credentials and choose Oauth client ID
  • Set Application type to Web application and Provide these URIs as the Authorized redirect URIs for your application as following:
    If you installed Sngine in your domain directly like domain.com the URIs should be like these:
    http://www.domain.com/connect/google
    http://www.domain.com/oauth.php?hauth.done=Google

    If you installed Sngine in sub-domain like sub.domain.com the URIs should be like these:
    http://sub.domain.com/connect/google
    http://sub.domain.com/oauth.php?hauth.done=Google

    If you installed Sngine in a directory like domain.com/directory the URIs should be like these:
    http://www.domain.com/directory/connect/google
    http://www.domain.com/directory/oauth.php?hauth.done=Google
  • Once you have registered, copy the created application credentials (Client ID and Secret)
  • The last thing, You will need to enable Google+ API goto Overview tab
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

Linkedin

After installing Sngine now you can in easy step integrate Linkedin with it to let your users login with their Linkedin accounts.

  • First goto: https://www.linkedin.com/developer/apps and Sign in with your Linkedin account.
  • Click Create Application and fill the form
  • Goto the Settings page and change Application Status to make it live and Update
  • Now back to your Authentication and Provide these URIs as the OAuth 2.0 Authorized redirect URIs for your application as following:
    If you installed Sngine in your domain directly like domain.com the URIs should be like these:
    http://www.domain.com/connect/linkedin
    http://www.domain.com/oauth.php?hauth.done=Linkedin

    If you installed Sngine in sub-domain like sub.domain.com the URIs should be like these:
    http://sub.domain.com/connect/linkedin
    http://sub.domain.com/oauth.php?hauth.done=Linkedin

    If you installed Sngine in a directory like domain.com/directory the URIs should be like these:
    http://www.domain.com/directory/connect/linkedin
    http://www.domain.com/directory/oauth.php?hauth.done=Linkedin
  • Now copy both Authentication Keys.
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

Vkontakte

After installing Sngine now you can in easy step integrate Vkontakte with it to let your users login with their Vkontakte accounts.

  • First goto: http://vk.com/dev and Sign in with your Vkontakte account.
  • Click Create an Application and fill the form
  • Now back to your Settings page to copy both Application ID and Secure key.
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

Instagram

After installing Sngine now you can in easy step integrate Instagram with it to let your users login with their Instagram accounts.

  • First goto: https://www.instagram.com/developer/register/ and Sign in with your Instagram account.
  • Click Register Your Application then Register a New Client and fill the form
  • Provide this URI as the Valid redirect URLs for your application as following:
    If you installed Sngine in your domain directly like domain.com the URIs should be like these:
    http://www.domain.com/oauth.php?hauth.done=Instagram
    If you installed Sngine in sub-domain like sub.domain.com the URIs should be like these:
    http://sub.domain.com/oauth.php?hauth.done=Instagram
    If you installed Sngine in a directory like domain.com/directory the URIs should be like these:
    http://www.domain.com/directory/oauth.php?hauth.done=Instagram
  • Now follow the following steps to get the right permission for your App
  • Now fill the following form and submit
  • Instagram team will review your request and after your app get the approved and now in the Live mode not Sandbox
  • Now goto to Sngine Admin Panel -> Settings -> Registration Settings -> Social Login tab and paste both keys as shown.
  • That's all, Enjoy!

SMS

Twilio

After installing Sngine now you can in easy step integrate Twilio SMS with it to let your users use it.

  • First goto: https://www.twilio.com/console and Sign in with your Twilio account.
  • Now copy both ACCOUNT SID and AUTH TOKEN
  • Now Select Programmable SMS and Create new service
  • Now goto to Numbers and Buy a Number
  • Now goto to Phone Numbers service and copy your number with no spaces or dashes like this +123456789
  • Now goto to Sngine Admin Panel -> Settings -> SMS Settings and paste both keys and phone number as shown also you can add your own number to test your settings (Save First before Testing)
  • That's all, Enjoy!

Google Map API

Get Google Map API key

After installing Sngine now you can in easy step integrate Google Map API with it to let your users use it.

  • First goto: https://developers.google.com/maps/documentation/javascript/get-api-key and Sign in with your Google account.
  • Now click GET A KEY
  • Make sure you have the following APIs enabled from your project Dashboard Also the API key is not restricted
  • Now goto to your Sngine Admin panel -> Settings -> Post Settings and open your settings page and paste this key.
  • That's all, Enjoy!

Payments

PayPal

After installing Sngine now you can in easy step integrate PayPal with it to let your users use it.

  • First goto: https://developer.paypal.com/developer/applications/ and Sign in with your PayPal account.
  • Now click Sandbox And Create Business (Merchant Account) and fill the form.
  • Then Create Personal (Buyer Account) and fill the form.
  • Both accounts will be linked with your new PayPal app for SandBox Mode
  • Now click My Apps & Credentials
  • Now if you will use PayPal in SandBox (Test) Mode Copy Client ID and Secret
  • For Live Mode Copy Client ID and Secret from Live Tab
  • Now goto to your Sngine Admin panel -> Settings -> Payments Settings and paste both Client ID and Secret and select the mode you want Test or Live
  • That's all, Enjoy!

Stripe

After installing Sngine now you can in easy step integrate Stripe with it to let your users use it.

  • First goto: https://dashboard.stripe.com/ and Sign in with your Stripe account.
  • Now click API
  • Copy API Keys then goto to your Sngine Admin panel -> Settings -> Payments Settings and paste all and select the mode you want Test or Live
  • For Live you will need to activate your account first
  • That's all, Enjoy!

Amazon S3

Amazon S3

After installing Sngine now you can in easy step integrate Amazon S3 with it to let your users use it.

  • First goto: https://console.aws.amazon.com/console/home and Sign in with your Amazon account.
  • Now click Services And Select IAM under Security, Identity & Compliance
  • Now click Access Keys And Create new Access Key
  • Now click Services And Select S3 under Storage
  • Now click Create bucket
  • Now Add new permission for everyone and can List
  • Now goto to your Sngine Admin panel -> Settings -> Upload Settings and paste both Keys
  • That's all, Enjoy!

Mobile Apps

Android App

  • Import your APP into Android Studio
  • Change App Name - Open "Andriod\Sngine\app\src\main\res\values\strings.xml"
  • Change your website link from "Andriod\Sngine\app\src\main\java\com\sngine\webview\MainActivity.java"
  • Change App Icon from "Andriod\Sngine\app\src\main\res\raw" and "Andriod\Sngine\app\src\main\res\mipmap-*"
  • To change package name from "com.sngine.webview" go to "Andriod\Sngine\app\src\main\AndroidManifest.xml" and set the cursor on sngine press Shift+F6 and Rename Package to whatever you want
  • Export your APK
  • That's all, Enjoy!

IOS App

  • Import your APP into XCode
  • Change your website link
  • Change your App name
  • Change your App icons
  • Change your App Splash Screens
  • That's all, Enjoy!

Windows Phone App

  • Open Sngine.sln with Visual Studio 2015
  • Change your App name
  • Change your website link
  • Change your App icons and Splash Screens
  • That's all, Enjoy!

Sngine APIs

Our API allows you to retrieve informations from y website via GET request and supports the following parameters:

Field Description
get This parameter specify the type of the query:
  • users is for user profile informations
  • pages is for pages informations
  • groups is for groups informations
query The query string

Get Users

Allow you to retrive the user info

Example of requests:
[GET] http://demo.sngine.com/api.php?get=users&query=USERNAME
Example of response:
[user_id] => 1
[user_name] => Yehia Abed
[user_fullname] => d3veloper
[user_gender] => M
[user_picture] => http://demo.sngine.com/content/themes/default/images/blank_profile_male.jpg
[user_cover] =>
[user_registered] => 2016-02-14 14:56:57
[user_verified] => 1

An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://demo.sngine.com/api.php?get=users&query=USERNAME");
print_r(json_decode($file));
?>

Get Pages

Allow you to retrive the page info

Example of requests:
[GET] http://demo.sngine.com/api.php?get=pages&query=USERNAME
Example of response:
[page_id] => 1
[page_admin] => 1
[page_category] => 1
[page_name] => sngine
[page_title] => sngine
[page_picture] => http://demo.sngine.com/content/themes/default/images/blank_page.png
[page_cover] =>
[page_description] => ss
[page_verified] => 0
[page_likes] => 0

An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://demo.sngine.com/api.php?get=pages&query=USERNAME");
print_r(json_decode($file));
?>

Get Groups

Allow you to retrive the group info

Example of requests:
[GET] http://demo.sngine.com/api.php?get=groups&query=USERNAME
Example of response:
[group_id] => 1
[group_admin] => 1
[group_name] => sngine
[group_title] => sngine
[group_picture] => http://demo.sngine.com/content/themes/default/images/blank_page.png
[group_cover] =>
[group_description] => ss
[group_verified] => 0
[group_members] => 0

An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://demo.sngine.com/api.php?get=groups&query=USERNAME");
print_r(json_decode($file));
?>

If you have any questions that are beyond the scope of this documentation, please feel free to create a support ticket on our support system. Thanks so much!