Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #97

Open
wants to merge 42 commits into
base: dev
Choose a base branch
from
Open

Dev #97

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a5b1b6b
Fixed Swagger API Host link
waifung0207 Jun 12, 2016
e0c7c7b
Mention latest build number from README
waifung0207 Jun 12, 2016
271d2fd
Updated Summernote to v0.8.1; copied config file of Grocery CRUD / Im…
waifung0207 Jun 12, 2016
a5fd645
Add trumbowyg as an option to Grocery CRUD editor
waifung0207 Jun 12, 2016
fdd87be
Some tidy up before setting demo repo
waifung0207 Jun 13, 2016
71d4ff9
Update default email setting to use Mailgun platform
waifung0207 Jun 22, 2016
1e959fb
Tidy up email sending; now use MY_Email instead of Email_client, conf…
waifung0207 Jun 22, 2016
714022e
Update build number
waifung0207 Jun 22, 2016
4e3d8e3
Add Utilities page to manage database version
waifung0207 Jun 22, 2016
f1dee5d
Admin Panel limit utility controller to be accessed by webmaster only
waifung0207 Jun 22, 2016
87b5d1d
Update README
waifung0207 Jun 22, 2016
6341f12
Fixed MY_Form_validation bug
waifung0207 Jul 2, 2016
d26ed39
Update build number
waifung0207 Jul 2, 2016
b0bcbdd
Update Admin Panel so less changes are required when rename 'admin' m…
waifung0207 Jul 7, 2016
b8f620c
Missing updates for last commit
waifung0207 Jul 7, 2016
950be6e
Update build number
waifung0207 Jul 7, 2016
a449edf
Fix build number
waifung0207 Jul 7, 2016
6a777f0
Prepare basic structure
waifung0207 Jul 19, 2016
aae0a0e
Revert "Fix build number"
waifung0207 Jul 19, 2016
7cb2215
Fixing latest commits
waifung0207 Jul 19, 2016
876eb8e
Fix conflict
waifung0207 Jul 19, 2016
2b7ae5f
Fix header for API site
waifung0207 Jul 27, 2016
6af28c8
Upgraded to CodeIgniter 3.1.0
waifung0207 Aug 22, 2016
08f25cc
Updated bower packages, includes AdminLTE to v2.3.6
waifung0207 Aug 22, 2016
b10e696
Fixed multilingual routing
waifung0207 Aug 22, 2016
985eeee
Update README
waifung0207 Aug 23, 2016
4ea5cdc
Fix Grocery CRUD search boolean field by typing 0 value
waifung0207 Sep 8, 2016
3ae65ff
Allow changing order_direction when use Sortable library
waifung0207 Sep 8, 2016
a701b6a
update sidebar to AdminLTE to v2.3.6
Nov 2, 2016
31b21ce
Merge pull request #85 from circuitmamu/patch-1
waifung0207 Nov 7, 2016
82778cc
Update CodeIgniter to v3.1.2, update bower packages
waifung0207 Nov 7, 2016
322b927
Update Grocery CRUD to v1.5.7
waifung0207 Nov 7, 2016
85a3f48
Update codeigniter-restserver library
waifung0207 Dec 9, 2016
79a9580
Update Ion Auth; fixed some config from last commit
waifung0207 Dec 9, 2016
efa085f
Update version
waifung0207 Dec 9, 2016
172b72a
strom
ravi2katre Dec 30, 2016
22ec008
strom
ravi2katre Jan 4, 2017
2a9e06d
commit by Shbhu
sbahekar Jan 16, 2017
4ee4151
chnaged done for test
sbahekar Jan 16, 2017
bf1ce9a
signup mobile width
sbahekar Jan 16, 2017
2866ddc
Updated on 2017-01-17
sbahekar Jan 17, 2017
e3e4792
applied material design
sbahekar Jan 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .idea/ci_bootstrap_3.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

737 changes: 737 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
## CodeIgniter 3 Bootstrap
## CodeIgniter 3 Bootstrap

**Latest Build: 2016-12-09**

**Note: This project is still in progress, but welcome for any issues encountered**

A starter template that supports multi-tenant (Frontend / Admin Panel / API) website in a single application.

This repository is developed upon the following tools:
* [CodeIgniter](http://www.codeigniter.com/) (v3.0.6) - PHP framework
* [CodeIgniter](http://www.codeigniter.com/) (v3.1.2) - PHP framework
* [CodeIgniter HMVC Extensions](https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc) - modular structure by [wiredesignz](http://wiredesignz.co.nz/)
* [codeigniter-base-model](https://github.com/jamierumbelow/codeigniter-base-model) - more advanced CRUD functions for models by [jamierumbelow](https://github.com/jamierumbelow)
* [codeigniter-restserver](https://github.com/chriskacerguis/codeigniter-restserver) - base setup for API module
* [Ion Auth](http://benedmunds.com/ion_auth/) - authentication library for CodeIgniter by [Ben Edmunds](http://benedmunds.com/)
* [Bootstrap](http://getbootstrap.com/) (v3.3.6) - popular frontend framework
* [Grocery CRUD](http://www.grocerycrud.com/) (v1.5.5) - feature-rich library to build CRUD tables
* [Bootstrap](http://getbootstrap.com/) (v3.3.7) - popular frontend framework
* [Grocery CRUD](http://www.grocerycrud.com/) (v1.5.7) - feature-rich library to build CRUD tables
* [Image CRUD](http://www.grocerycrud.com/image-crud) (v0.6) - CRUD library for image management
* [AdminLTE](https://github.com/almasaeed2010/AdminLTE) (v2.3.3) - bootstrap theme for Admin Panel
* [AdminLTE](https://github.com/almasaeed2010/AdminLTE) (v2.3.8) - bootstrap theme for Admin Panel


### Features
Expand All @@ -40,7 +42,7 @@ This repository contains setup for rapid development:
* ... more coming!


### Demo Project (in progress)
### Demo Project

A demo repository can be found from: https://github.com/waifung0207/ci_bootstrap_3_demo

Expand All @@ -49,7 +51,7 @@ A demo repository can be found from: https://github.com/waifung0207/ci_bootstrap

Below configuration are preferred; other environments are not well-tested, but still feel free to report and issues.

* **PHP 5.5+**
* **PHP 5.6+**
* **Apache 2.2+** with rewrite mod enabled
* **MySQL 5.5+** (not tested on MariaDB)

Expand Down Expand Up @@ -86,7 +88,7 @@ application/ --- Main CodeIgniter source files
autoload.php --- By default, some files are loaded for this repo
ci_bootstrap.php --- Core configuration file for all sites
database.php --- Need to verify to ensure connection with MySQL database
email.php --- Created to centralize email configuration (preset: using Mandrill service)
email.php --- Created to centralize email configuration (default: using Mailgun)
form_validation.php --- Created to centralize validation forms for all forms, include ReCAPTCHA settings
routes.php --- Changed default controller from Welcome to Home
controllers/ --- Controllers for Frontend Website; extends from MY_Controller (except Cli)
Expand All @@ -99,7 +101,8 @@ application/ --- Main CodeIgniter source files
MY_Router.php --- Required for HMVC extension
helpers/ --- Contains custom helper functions being used throughout this repo
language/ --- Preset language files
libraries/ --- Custom libraries (e.g. Ion Auth, Form Builder, System Message)
libraries/ --- Custom libraries (e.g. Form Builder, System Message)
MY_Email.php --- Enhanced email library, includes work with Mailgun API
models/ --- Sample model extending from MY_Model
modules/ --- Each module can be accessed by http://{base_url}/{module_name}/{module_controller}/, etc.
admin/ --- Module for Admin Panel
Expand Down Expand Up @@ -170,7 +173,5 @@ More screenshots can be viewed from the [screenshots folder](https://github.com/
* Changelog file
* Better documentation (e.g. on [Gitbook](http://gitbook.com/))
* Enhance Form Builder library to support more field types
* API authentication (by API key or JSON Web Token, i.e. JWT)
* Database backup and restore versions
* Grocery CRUD / Image CRUD file upload - add Amazon S3 integration
* Grocery CRUD / Image CRUD image upload - add cropping feature
76 changes: 63 additions & 13 deletions application/config/ci_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$config['ci_bootstrap'] = array(

// Site name
'site_name' => 'CI Bootstrap 3',
'site_name' => '',

// Default page title prefix
'page_title_prefix' => '',
Expand All @@ -33,26 +33,34 @@
// Default scripts to embed at page head or end
'scripts' => array(
'head' => array(

),
'foot' => array(
'assets/dist/frontend/lib.min.js',
'assets/dist/frontend/app.min.js'
'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js',
'assets/dist/pe/js/common.js',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js'



),
),

// Default stylesheets to embed at page head
'stylesheets' => array(
'screen' => array(
'assets/dist/frontend/lib.min.css',
'assets/dist/frontend/app.min.css'
)

'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
'https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css',
'assets/dist/pe/css/pe_custome.css'
)
),

// Default CSS class for <body> tag
'body_class' => '',
'body_class' => 'body_pe',

// Multilingual settings
'languages' => array(
/*'languages' => array(
'default' => 'en',
'autoload' => array('general'),
'available' => array(
Expand All @@ -73,25 +81,54 @@
'value' => 'spanish'
)
)
),
),*/

// Google Analytics User ID
'ga_id' => '',

// Menu items
'menu' => array(
'home' => array(
'name' => 'Home',

'about' => array(
'name' => 'About',
'url' => '',
),
'services' => array(
'name' => 'Services',
'url' => '',
),
'samples' => array(
'name' => 'Samples',
'url' => '',
),
'order' => array(
'name' => 'Order',
'url' => '',
),
'support' => array(
'name' => 'Support',
'url' => '',
),
),

// Login page
'login_url' => '',
'login_url' => 'login',

// Restricted pages
'page_auth' => array(
'test' => array('membders'),
),

// Email config
'email' => array(
'from_email' => '',
'from_name' => '',
'subject_prefix' => '',

// Mailgun HTTP API
'mailgun_api' => array(
'domain' => '',
'private_api_key' => ''
),
),

// Debug tools
Expand All @@ -101,6 +138,19 @@
),
);

/** Browser Detection **/
$msie = strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE') ? true : false;
$firefox = strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox') ? true : false;
$safari = strpos($_SERVER["HTTP_USER_AGENT"], 'Safari') ? true : false;
$chrome = strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome') ? true : false;
if($chrome){
array_push($config['ci_bootstrap']['stylesheets']['screen'],'assets/dist/pe/css/pe_custome_chrome.css');
}elseif($firefox){
array_push($config['ci_bootstrap']['stylesheets']['screen'],'assets/dist/pe/css/pe_custome_moz.css');
}elseif($safari){
array_push($config['ci_bootstrap']['stylesheets']['screen'],'assets/dist/pe/css/pe_custome_chrome.css');
}
/** End Browser Detection **/
/*
| -------------------------------------------------------------------------
| Override values from /application/config/config.php
Expand Down
13 changes: 13 additions & 0 deletions application/config/ci_bootstrap_example.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@
'panel/admin_user_group' => array('webmaster'),
),

// Email config (to be used in MY_Email library)
'email' => array(
'from_email' => '[email protected]',
'from_name' => 'CI Bootstrap',
'subject_prefix' => '[CI Bootstrap] ',

// Mailgun HTTP API
'mailgun_api' => array(
'domain' => '',
'private_api_key' => ''
),
),

// Debug tools (available only when ENVIRONMENT = 'development')
'debug' => array(
'view_data' => FALSE, // whether to display MY_Controller's mViewData at page end
Expand Down
12 changes: 8 additions & 4 deletions application/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,19 @@
*/
if (!(PHP_SAPI === 'cli' OR defined('STDIN')))
{
// Base URL with directory support; also for API prefix in Swagger annotation (/application/modules/api/swagger/info.php)
// Base URL with directory support
$protocol = (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])!== 'off') ? 'https' : 'http';
$base_url = $protocol.'://'.$_SERVER['HTTP_HOST'];
$base_url.= dirname($_SERVER['SCRIPT_NAME']);
define('BASE_URL', $base_url);
//define('BASE_URL', $base_url);

define('BASE_URL', 'http://ci3.localhost/');
// For API prefix in Swagger annotation (/application/modules/api/swagger/info.php)
define('API_HOST', $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
}

define('CI_BOOTSTRAP_REPO', 'https://github.com/waifung0207/ci_bootstrap_3');
define('CI_BOOTSTRAP_VERSION', 'Build 20160610'); // will follow semantic version (e.g. v1.x.x) after first stable launch
define('CI_BOOTSTRAP_VERSION', 'Build 20161209'); // will follow semantic version (e.g. v1.x.x) after first stable launch

// Upload paths
//define('UPLOAD_COVER_PHOTO', 'assets/uploads/cover_photos');
//define('UPLOAD_COVER_PHOTO', 'assets/uploads/cover_photos');
4 changes: 2 additions & 2 deletions application/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'ci_bootstrap_3',
'password' => 'ci_bootstrap_3',
'username' => 'root',
'password' => '',
'database' => 'ci_bootstrap_3',
'dbdriver' => 'mysqli',
'dbprefix' => '',
Expand Down
15 changes: 2 additions & 13 deletions application/config/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,12 @@
| */

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.mandrillapp.com';
$config['smtp_host'] = 'smtp.mailgun.org';
$config['smtp_port'] = '587';
$config['smtp_timeout'] = '30';
$config['smtp_user'] = 'username';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'password';
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['wordwrap'] = TRUE;
$config['newline'] = "\r\n";

// custom values from CI Bootstrap
$config['from_email'] = "[email protected]";
$config['from_name'] = "CI Bootstrap";
$config['subject_prefix'] = "[CI Bootstrap] ";

// Mailgun API (to be used in Email Client library)
$config['mailgun'] = array(
'domain' => '',
'private_api_key' => '',
);
12 changes: 8 additions & 4 deletions application/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
/*
| -------------------------------------------------------------------------
| Added by CI Bootstrap 3
| Multilingual routing (update "en|zh|cn|es" for available languages)
| Multilingual routing (use 2 characters (e.g. en, zh, cn, es) for switching languages)
| -------------------------------------------------------------------------
*/
$route['^en|zh|cn|es/(.+)$'] = "$1";
$route['^en|zh|cn|es$'] = $route['default_controller'];
$route['^(\w{2})/(.*)$'] = '$2';
$route['^(\w{2})$'] = $route['default_controller'];

/*
| -------------------------------------------------------------------------
Expand All @@ -81,7 +81,11 @@
*/
$route['api/(:any)/(:num)'] = 'api/$1/id/$2';
$route['api/(:any)/(:num)/(:any)'] = 'api/$1/$3/$2';

$route['login'] = 'auth/login';
$route['register'] = 'auth/create_user';
$route['forgot_password'] = 'auth/forgot_password';
$route['reset_password'] = 'auth/reset_password';
$route['change_password'] = 'auth/change_password';
/*
| -------------------------------------------------------------------------
| Added by CI Bootstrap 3
Expand Down
Loading