Skip to content

Commit

Permalink
feat (heroku) convert to a heroku app
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenceputra committed Oct 12, 2014
1 parent be4d343 commit 66ca5d4
Show file tree
Hide file tree
Showing 503 changed files with 57 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
custom_constants.php
.envvar
.DS_Store
.htaccess
25 changes: 0 additions & 25 deletions .htaccess

This file was deleted.

1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 web/
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"require": {
"ext-mongo": "*"
},
"require-dev": {
"heroku/heroku-buildpack-php": "*"
}
}
23 changes: 23 additions & 0 deletions web/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
RewriteEngine On
RewriteBase /

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions web/application/config/custom_constants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

define('MONGO_CONNECTION', $_SERVER["MONGO_CONNECTION"]);

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Admin extends CI_Controller {
* Generally, $count is not used at all.
* Requires: Logged in User
*******************/
public function view_all_talks($page = 0, $count = 50){
public function view_all_talks($page = 1, $count = 50){
if($this->user_lib->is_logged_in()){
$this->load->library('pagination');
$this->load->model('talk_model');
Expand All @@ -36,7 +36,7 @@ public function view_all_talks($page = 0, $count = 50){
$config['use_page_numbers'] = TRUE;
$this->pagination->initialize($config);

$data['talks'] = $this->talk_model->get_all_talks($page, $count);
$data['talks'] = $this->talk_model->get_all_talks($page - 1, $count);
$data['content'] = $this->load->view('admin/view_all_talks', $data, TRUE);
$this->load->view('core', $data);
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function schedule($year = -1){
* Allows users to email the organisers
* Shows email success page on success
*******************/
public function email(){
public function _email(){
$this->load->library('form_validation');

$this->form_validation->set_rules('name', 'Name', 'trim|required|stripcslashes');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
class Core_model extends CI_Model {
//basic function to connect to DB
public function connect_to_db(){
//$conn = new MongoClient(MONGO_CONNECTION, MONGO_OPTIONS);
$conn = new MongoClient();
$conn = new MongoClient(MONGO_CONNECTION);
return $conn->geekcampsg;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions application/views/core.php → web/application/views/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,14 @@
<script type="text/javascript">
mixpanel.track("Page Load");
</script>
<!--Start of Zopim Live Chat Script-->
<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?2UQBdhahXDQQYwZYyvzHvPCpn4XOjbrq';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script>
<!--End of Zopim Live Chat Script-->
</body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="subtitle">Conference for the geeks.</p>
<p class="subtitle">No startup talks. No how to get rich talks. This is purely a tech conference.</p>
<p class="subtitle">Hashtag: <b>#geekcampsg</b> | Date: <b>18th October 2014</b> | Time: <b>9:30am to 6pm (Afterparty afterwards)</b> | Location: <b>NUS School of Computing</b></p>
<p class="subtitle"><b>Schedule</b> can now be found over <a href="http://geekcamp.sg/schedule/view_schedule/2014">here</a></p>
<p class="subtitle"><b>Schedule</b> can now be found over <a href="/schedule/view_schedule/2014">here</a></p>
<p class="subtitle">Important!</p>
<ol>
<li>Conference tickets includes the afterparty as PayPal has kindly decided to sponsor.</li>
Expand Down Expand Up @@ -67,8 +67,7 @@

<!--End mc_embed_signup-->
<h2 class="about">Partners</h2>
<p class="sublabel">Interested to work with us?</p>
<p class="sublabel">Drop us an email <a href="<?php echo site_url('pages/email')?>">here</a>.</p>
Interested in working with us? Contact us via the Zopim widget below!
<h3 class="about">Lunch + Afterparty Sponsor</h3>
<a onclick="mixpanel.track('Sponsor | PayPal')" href="http://paypal.com/" target="_blank"><img class="platinum-sponsor-images" src="<?php echo base_url('static/images/paypal-logo-new.png')?>" alt="PayPal"></a>
<h3 class="about">Venue Sponsor</h3>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions index.php → web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
* NOTE: If you change these, also change the error_reporting() code below
*
*/
if ($_SERVER["ENVIRONMENT"]) {
define('ENVIRONMENT', $_SERVER["ENVIRONMENT"]);
}
else{
define('ENVIRONMENT', 'development');
}
/*
*---------------------------------------------------------------
* ERROR REPORTING
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 66ca5d4

Please sign in to comment.