Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src/*/avatars
src/*/avatars/*
src/app/config/database.php
src/src/app/config/config.php
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mxious
[![Code Climate](https://codeclimate.com/github/Mxious/Mxious/badges/gpa.svg)](https://codeclimate.com/github/Mxious/Mxious)
[![Build Status](https://travis-ci.org/Mxious/Mxious.svg)](https://travis-ci.org/Mxious/Mxious) [![Code Climate](https://codeclimate.com/github/Mxious/Mxious/badges/gpa.svg)](https://codeclimate.com/github/Mxious/Mxious) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Mxious/Mxious?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Source code for the Mxious social music application.

Expand Down
5 changes: 5 additions & 0 deletions VERSION.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version":"1.0.1",
"type": "development",
"cycle": "development"
}
46 changes: 0 additions & 46 deletions install/Installer.sh

This file was deleted.

6 changes: 0 additions & 6 deletions src/.gitignore

This file was deleted.

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 @@ -10,7 +10,7 @@
*/

// Page to go to when user first registers
define('REGISTER_REDIRECT', 'dashboard');
define('REGISTER_REDIRECT', '/');

// Email address for sys emails
define('SYS_EMAIL_FROM', 'noreply@alphasquare.us');
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.
76 changes: 76 additions & 0 deletions src/app/controllers/main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
* Main Controller
* The index method on this is the homepage.
* This is also a dynamic homepage that switches
* to explore on loggedout or dashboard
* on loggedin.
*
* @package Controllers
*/

class Main extends CI_Controller {

public $loggedin;

function __construct() {
parent::__construct();
$this->load->model('post_model');
$this->load->model('people_model');
$this->load->model('comments_model');
$this->loggedin = $this->php_session->get('loggedin');
}

public function index() {

switch ($this->loggedin) {

case true:
// user is not logged in, explore page instead of dashboard.
$data['title'] = 'Explore';
// load some stylesheets
$data['stylesheets'] = array(
'assets/css/home.css',
'http://fonts.googleapis.com/css?family=Lato:700'
);

$posts = $this->post_model->get_posts('explore', 0);
// Turn $posts array into HTML
$data['posts'] = $this->post_model->post_html($posts, true);
// tell the JS that there is a feed here
$data['feed'] = true;
// set a container for the feed
$data['feed_container'] = '#feed';
$this->template->load('home', $data);

break;

case false:

// user is not logged in, explore page instead of dashboard.
$data['title'] = 'Explore';
// load some stylesheets
$data['stylesheets'] = array(
'assets/css/home.css',
'http://fonts.googleapis.com/css?family=Lato:700'
);

$posts = $this->post_model->get_posts('explore', 0);
// Turn $posts array into HTML
$data['posts'] = $this->post_model->post_html($posts, true);
// tell the JS that there is a feed here
$data['feed'] = true;
// set a container for the feed
$data['feed_container'] = '#feed';
$this->template->load('home', $data);
break;

}

}

}

/* End of file main.php */
/* Location: ./application/controllers/main.php */
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.
3 changes: 3 additions & 0 deletions src/app/views/home.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="row" id="feed">
<?=$posts?>
</div>
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 @@ -8,7 +8,7 @@
</head>
<body class="grey lighten-2">
<?php $this->load->view('navbar'); echo "\n"; ?>
<?php if($show_hero == true) { $this->load->view('templates/hero'); } ?>
<?php if($show_hero == true and !$this->php_session->get('loggedin')) { $this->load->view('templates/hero'); } ?>

<?php $this->load->view('templates/no_script'); echo "\n"; ?>

Expand Down
45 changes: 0 additions & 45 deletions src/application/controllers/main.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/application/views/home.php

This file was deleted.

4 changes: 4 additions & 0 deletions src/assets/js/dash.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ var Dash = Dash || {
init: function (elem, type) {
Dash.feed_container = elem;

if($(window).height() >= $('#feed_measure').height()){
Dash.feed.ajax.load_more(type);
}

$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
Dash.feed.ajax.load_more(type);
Expand Down
2 changes: 1 addition & 1 deletion src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
* NO TRAILING SLASH!
*
*/
$application_folder = 'application';
$application_folder = 'app';

/*
* --------------------------------------------------------------------
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.