diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf1f1aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/*/avatars +src/*/avatars/* +src/app/config/database.php +src/src/app/config/config.php diff --git a/README.md b/README.md index 867323e..f149bb9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/VERSION.json b/VERSION.json new file mode 100644 index 0000000..1a247e7 --- /dev/null +++ b/VERSION.json @@ -0,0 +1,5 @@ +{ + "version":"1.0.1", + "type": "development", + "cycle": "development" +} diff --git a/install/Installer.sh b/install/Installer.sh deleted file mode 100644 index 1923e29..0000000 --- a/install/Installer.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# Mxious Linux Instance Installer -# (copy) Mxious 2013-2014 - -echo "Welcome to the Mxious Linux Instance Installer." - -if [[ $UID != 0 ]]; then - echo "This script requires sudo:" - echo "sudo $0 $*" - exit 1 -fi - -echo "-----------------------------------------------------" -echo "Let's start by asking a few essential questions." -echo "-----------------------------------------------------" -echo "" -echo "What is your mysql username? Input it now:" -read mysqluser -echo "" -echo "Where do you want the instance to be installed? Input a full path WITH TRAILING SLASH and press enter: " -read path -echo "Instance will be installed in directory $path." -echo "" -echo "Where is the Mxious SQL dump located? Full path WITHOUT final slash:" -read sqlpath -echo "" -echo "-----------------------------------------------------" -echo "" -echo "Starting install. Get some coffee or something, this will take a while." -cd $path -echo "" -git clone https://github.com/Mxious/Mxious -echo "Cloned, installed files." -echo "" -echo "-----------------------------------------------------" -echo "" -echo "Firing up MySQL. Please wait and input your password when requested." -mysql -u $mysqluser -p -e "create database Mxious;" -mysql -u $mysqluser -p Mxious < $sqlpath/Mxious.sql -cd $path/Mxious -nano application/config/database.php.sm -mv application/config/database.php.sm application/config/database.php -mv application/config/config.php.sm application/config/config.php - -echo "Finished installing. Thank you for coding with Crunch D&D!" \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 22778bf..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*/avatars -*/avatars/* -application/config/database.php -application/config/config.php -application/config/database.php.sm -application/config/config.php.sm \ No newline at end of file diff --git a/src/application/.htaccess b/src/app/.htaccess similarity index 100% rename from src/application/.htaccess rename to src/app/.htaccess diff --git a/src/application/cache/.htaccess b/src/app/cache/.htaccess similarity index 100% rename from src/application/cache/.htaccess rename to src/app/cache/.htaccess diff --git a/src/application/cache/index.html b/src/app/cache/index.html similarity index 100% rename from src/application/cache/index.html rename to src/app/cache/index.html diff --git a/src/application/config/autoload.php b/src/app/config/autoload.php similarity index 100% rename from src/application/config/autoload.php rename to src/app/config/autoload.php diff --git a/src/application/config/config.php.sm b/src/app/config/config.php.sm similarity index 100% rename from src/application/config/config.php.sm rename to src/app/config/config.php.sm diff --git a/src/application/config/constants.php b/src/app/config/constants.php similarity index 98% rename from src/application/config/constants.php rename to src/app/config/constants.php index b89453a..4a08429 100644 --- a/src/application/config/constants.php +++ b/src/app/config/constants.php @@ -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'); diff --git a/src/application/config/database.php.sm b/src/app/config/database.php.sm similarity index 100% rename from src/application/config/database.php.sm rename to src/app/config/database.php.sm diff --git a/src/application/config/doctypes.php b/src/app/config/doctypes.php similarity index 100% rename from src/application/config/doctypes.php rename to src/app/config/doctypes.php diff --git a/src/application/config/foreign_chars.php b/src/app/config/foreign_chars.php similarity index 100% rename from src/application/config/foreign_chars.php rename to src/app/config/foreign_chars.php diff --git a/src/application/config/hooks.php b/src/app/config/hooks.php similarity index 100% rename from src/application/config/hooks.php rename to src/app/config/hooks.php diff --git a/src/application/config/hybridauthlib.php b/src/app/config/hybridauthlib.php similarity index 100% rename from src/application/config/hybridauthlib.php rename to src/app/config/hybridauthlib.php diff --git a/src/application/config/index.html b/src/app/config/index.html similarity index 100% rename from src/application/config/index.html rename to src/app/config/index.html diff --git a/src/application/config/migration.php b/src/app/config/migration.php similarity index 100% rename from src/application/config/migration.php rename to src/app/config/migration.php diff --git a/src/application/config/mimes.php b/src/app/config/mimes.php similarity index 100% rename from src/application/config/mimes.php rename to src/app/config/mimes.php diff --git a/src/application/config/profiler.php b/src/app/config/profiler.php similarity index 100% rename from src/application/config/profiler.php rename to src/app/config/profiler.php diff --git a/src/application/config/recaptcha.php b/src/app/config/recaptcha.php similarity index 100% rename from src/application/config/recaptcha.php rename to src/app/config/recaptcha.php diff --git a/src/application/config/routes.php b/src/app/config/routes.php similarity index 100% rename from src/application/config/routes.php rename to src/app/config/routes.php diff --git a/src/application/config/smileys.php b/src/app/config/smileys.php similarity index 100% rename from src/application/config/smileys.php rename to src/app/config/smileys.php diff --git a/src/application/config/user_agents.php b/src/app/config/user_agents.php similarity index 100% rename from src/application/config/user_agents.php rename to src/app/config/user_agents.php diff --git a/src/application/controllers/account.php b/src/app/controllers/account.php similarity index 100% rename from src/application/controllers/account.php rename to src/app/controllers/account.php diff --git a/src/application/controllers/alerts.php b/src/app/controllers/alerts.php similarity index 100% rename from src/application/controllers/alerts.php rename to src/app/controllers/alerts.php diff --git a/src/application/controllers/comments.php b/src/app/controllers/comments.php similarity index 100% rename from src/application/controllers/comments.php rename to src/app/controllers/comments.php diff --git a/src/application/controllers/dashboard.php b/src/app/controllers/dashboard.php similarity index 100% rename from src/application/controllers/dashboard.php rename to src/app/controllers/dashboard.php diff --git a/src/application/controllers/index.html b/src/app/controllers/index.html similarity index 100% rename from src/application/controllers/index.html rename to src/app/controllers/index.html diff --git a/src/app/controllers/main.php b/src/app/controllers/main.php new file mode 100755 index 0000000..163d11e --- /dev/null +++ b/src/app/controllers/main.php @@ -0,0 +1,76 @@ +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 */ \ No newline at end of file diff --git a/src/application/controllers/page.php b/src/app/controllers/page.php similarity index 100% rename from src/application/controllers/page.php rename to src/app/controllers/page.php diff --git a/src/application/controllers/people.php b/src/app/controllers/people.php similarity index 100% rename from src/application/controllers/people.php rename to src/app/controllers/people.php diff --git a/src/application/controllers/post.php b/src/app/controllers/post.php similarity index 100% rename from src/application/controllers/post.php rename to src/app/controllers/post.php diff --git a/src/application/controllers/search.php b/src/app/controllers/search.php similarity index 100% rename from src/application/controllers/search.php rename to src/app/controllers/search.php diff --git a/src/application/controllers/settings.php b/src/app/controllers/settings.php similarity index 100% rename from src/application/controllers/settings.php rename to src/app/controllers/settings.php diff --git a/src/application/core/index.html b/src/app/core/index.html similarity index 100% rename from src/application/core/index.html rename to src/app/core/index.html diff --git a/src/application/errors/error_404.php b/src/app/errors/error_404.php similarity index 100% rename from src/application/errors/error_404.php rename to src/app/errors/error_404.php diff --git a/src/application/errors/error_db.php b/src/app/errors/error_db.php similarity index 100% rename from src/application/errors/error_db.php rename to src/app/errors/error_db.php diff --git a/src/application/errors/error_general.php b/src/app/errors/error_general.php similarity index 100% rename from src/application/errors/error_general.php rename to src/app/errors/error_general.php diff --git a/src/application/errors/error_php.php b/src/app/errors/error_php.php similarity index 100% rename from src/application/errors/error_php.php rename to src/app/errors/error_php.php diff --git a/src/application/errors/index.html b/src/app/errors/index.html similarity index 100% rename from src/application/errors/index.html rename to src/app/errors/index.html diff --git a/src/application/helpers/MY_url_helper.php b/src/app/helpers/MY_url_helper.php similarity index 100% rename from src/application/helpers/MY_url_helper.php rename to src/app/helpers/MY_url_helper.php diff --git a/src/application/helpers/avatar_helper.php b/src/app/helpers/avatar_helper.php similarity index 100% rename from src/application/helpers/avatar_helper.php rename to src/app/helpers/avatar_helper.php diff --git a/src/application/helpers/bbcode_helper.php b/src/app/helpers/bbcode_helper.php similarity index 100% rename from src/application/helpers/bbcode_helper.php rename to src/app/helpers/bbcode_helper.php diff --git a/src/application/helpers/format_post_helper.php b/src/app/helpers/format_post_helper.php similarity index 100% rename from src/application/helpers/format_post_helper.php rename to src/app/helpers/format_post_helper.php diff --git a/src/application/helpers/index.html b/src/app/helpers/index.html similarity index 100% rename from src/application/helpers/index.html rename to src/app/helpers/index.html diff --git a/src/application/helpers/json_helper.php b/src/app/helpers/json_helper.php similarity index 100% rename from src/application/helpers/json_helper.php rename to src/app/helpers/json_helper.php diff --git a/src/application/helpers/msg_helper.php b/src/app/helpers/msg_helper.php similarity index 100% rename from src/application/helpers/msg_helper.php rename to src/app/helpers/msg_helper.php diff --git a/src/application/helpers/php_session_helper.php b/src/app/helpers/php_session_helper.php similarity index 100% rename from src/application/helpers/php_session_helper.php rename to src/app/helpers/php_session_helper.php diff --git a/src/application/helpers/validate_helper.php b/src/app/helpers/validate_helper.php similarity index 100% rename from src/application/helpers/validate_helper.php rename to src/app/helpers/validate_helper.php diff --git a/src/application/hooks/index.html b/src/app/hooks/index.html similarity index 100% rename from src/application/hooks/index.html rename to src/app/hooks/index.html diff --git a/src/application/hooks/user_hook.php b/src/app/hooks/user_hook.php similarity index 100% rename from src/application/hooks/user_hook.php rename to src/app/hooks/user_hook.php diff --git a/src/application/index.html b/src/app/index.html similarity index 100% rename from src/application/index.html rename to src/app/index.html diff --git a/src/application/language/english/index.html b/src/app/language/english/index.html similarity index 100% rename from src/application/language/english/index.html rename to src/app/language/english/index.html diff --git a/src/application/language/index.html b/src/app/language/index.html similarity index 100% rename from src/application/language/index.html rename to src/app/language/index.html diff --git a/src/application/libraries/HybridAuthLib.php b/src/app/libraries/HybridAuthLib.php similarity index 100% rename from src/application/libraries/HybridAuthLib.php rename to src/app/libraries/HybridAuthLib.php diff --git a/src/application/libraries/MY_form_validation.php b/src/app/libraries/MY_form_validation.php similarity index 100% rename from src/application/libraries/MY_form_validation.php rename to src/app/libraries/MY_form_validation.php diff --git a/src/application/libraries/Markdown.php b/src/app/libraries/Markdown.php similarity index 100% rename from src/application/libraries/Markdown.php rename to src/app/libraries/Markdown.php diff --git a/src/application/libraries/Recaptcha.php b/src/app/libraries/Recaptcha.php similarity index 100% rename from src/application/libraries/Recaptcha.php rename to src/app/libraries/Recaptcha.php diff --git a/src/application/libraries/alert.php b/src/app/libraries/alert.php similarity index 100% rename from src/application/libraries/alert.php rename to src/app/libraries/alert.php diff --git a/src/application/libraries/custom_email.php b/src/app/libraries/custom_email.php similarity index 100% rename from src/application/libraries/custom_email.php rename to src/app/libraries/custom_email.php diff --git a/src/application/libraries/events.php b/src/app/libraries/events.php similarity index 100% rename from src/application/libraries/events.php rename to src/app/libraries/events.php diff --git a/src/application/libraries/extras.php b/src/app/libraries/extras.php similarity index 100% rename from src/application/libraries/extras.php rename to src/app/libraries/extras.php diff --git a/src/application/libraries/index.html b/src/app/libraries/index.html similarity index 100% rename from src/application/libraries/index.html rename to src/app/libraries/index.html diff --git a/src/application/libraries/mentions.php b/src/app/libraries/mentions.php similarity index 100% rename from src/application/libraries/mentions.php rename to src/app/libraries/mentions.php diff --git a/src/application/libraries/php_session.php b/src/app/libraries/php_session.php similarity index 100% rename from src/application/libraries/php_session.php rename to src/app/libraries/php_session.php diff --git a/src/application/libraries/points.php b/src/app/libraries/points.php similarity index 100% rename from src/application/libraries/points.php rename to src/app/libraries/points.php diff --git a/src/application/libraries/template.php b/src/app/libraries/template.php similarity index 100% rename from src/application/libraries/template.php rename to src/app/libraries/template.php diff --git a/src/application/logs/hybridauth.log b/src/app/logs/hybridauth.log similarity index 100% rename from src/application/logs/hybridauth.log rename to src/app/logs/hybridauth.log diff --git a/src/application/logs/index.html b/src/app/logs/index.html similarity index 100% rename from src/application/logs/index.html rename to src/app/logs/index.html diff --git a/src/application/models/account_model.php b/src/app/models/account_model.php similarity index 100% rename from src/application/models/account_model.php rename to src/app/models/account_model.php diff --git a/src/application/models/alerts_model.php b/src/app/models/alerts_model.php similarity index 100% rename from src/application/models/alerts_model.php rename to src/app/models/alerts_model.php diff --git a/src/application/models/comments_model.php b/src/app/models/comments_model.php similarity index 100% rename from src/application/models/comments_model.php rename to src/app/models/comments_model.php diff --git a/src/application/models/employee_model.php b/src/app/models/employee_model.php similarity index 100% rename from src/application/models/employee_model.php rename to src/app/models/employee_model.php diff --git a/src/application/models/index.html b/src/app/models/index.html similarity index 100% rename from src/application/models/index.html rename to src/app/models/index.html diff --git a/src/application/models/oauth_model.php b/src/app/models/oauth_model.php similarity index 100% rename from src/application/models/oauth_model.php rename to src/app/models/oauth_model.php diff --git a/src/application/models/people_model.php b/src/app/models/people_model.php similarity index 100% rename from src/application/models/people_model.php rename to src/app/models/people_model.php diff --git a/src/application/models/post_model.php b/src/app/models/post_model.php similarity index 100% rename from src/application/models/post_model.php rename to src/app/models/post_model.php diff --git a/src/application/models/search_model.php b/src/app/models/search_model.php similarity index 100% rename from src/application/models/search_model.php rename to src/app/models/search_model.php diff --git a/src/application/third_party/hybridauth/Hybrid/Auth.php b/src/app/third_party/hybridauth/Hybrid/Auth.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Auth.php rename to src/app/third_party/hybridauth/Hybrid/Auth.php diff --git a/src/application/third_party/hybridauth/Hybrid/Endpoint.php b/src/app/third_party/hybridauth/Hybrid/Endpoint.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Endpoint.php rename to src/app/third_party/hybridauth/Hybrid/Endpoint.php diff --git a/src/application/third_party/hybridauth/Hybrid/Error.php b/src/app/third_party/hybridauth/Hybrid/Error.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Error.php rename to src/app/third_party/hybridauth/Hybrid/Error.php diff --git a/src/application/third_party/hybridauth/Hybrid/Logger.php b/src/app/third_party/hybridauth/Hybrid/Logger.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Logger.php rename to src/app/third_party/hybridauth/Hybrid/Logger.php diff --git a/src/application/third_party/hybridauth/Hybrid/Provider_Adapter.php b/src/app/third_party/hybridauth/Hybrid/Provider_Adapter.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Provider_Adapter.php rename to src/app/third_party/hybridauth/Hybrid/Provider_Adapter.php diff --git a/src/application/third_party/hybridauth/Hybrid/Provider_Model.php b/src/app/third_party/hybridauth/Hybrid/Provider_Model.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Provider_Model.php rename to src/app/third_party/hybridauth/Hybrid/Provider_Model.php diff --git a/src/application/third_party/hybridauth/Hybrid/Provider_Model_OAuth1.php b/src/app/third_party/hybridauth/Hybrid/Provider_Model_OAuth1.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Provider_Model_OAuth1.php rename to src/app/third_party/hybridauth/Hybrid/Provider_Model_OAuth1.php diff --git a/src/application/third_party/hybridauth/Hybrid/Provider_Model_OAuth2.php b/src/app/third_party/hybridauth/Hybrid/Provider_Model_OAuth2.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Provider_Model_OAuth2.php rename to src/app/third_party/hybridauth/Hybrid/Provider_Model_OAuth2.php diff --git a/src/application/third_party/hybridauth/Hybrid/Provider_Model_OpenID.php b/src/app/third_party/hybridauth/Hybrid/Provider_Model_OpenID.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Provider_Model_OpenID.php rename to src/app/third_party/hybridauth/Hybrid/Provider_Model_OpenID.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/AOL.php b/src/app/third_party/hybridauth/Hybrid/Providers/AOL.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/AOL.php rename to src/app/third_party/hybridauth/Hybrid/Providers/AOL.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Facebook.php b/src/app/third_party/hybridauth/Hybrid/Providers/Facebook.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Facebook.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Facebook.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Foursquare.php b/src/app/third_party/hybridauth/Hybrid/Providers/Foursquare.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Foursquare.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Foursquare.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Google.php b/src/app/third_party/hybridauth/Hybrid/Providers/Google.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Google.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Google.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/LinkedIn.php b/src/app/third_party/hybridauth/Hybrid/Providers/LinkedIn.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/LinkedIn.php rename to src/app/third_party/hybridauth/Hybrid/Providers/LinkedIn.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Live.php b/src/app/third_party/hybridauth/Hybrid/Providers/Live.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Live.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Live.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/MySpace.php b/src/app/third_party/hybridauth/Hybrid/Providers/MySpace.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/MySpace.php rename to src/app/third_party/hybridauth/Hybrid/Providers/MySpace.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/OpenID.php b/src/app/third_party/hybridauth/Hybrid/Providers/OpenID.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/OpenID.php rename to src/app/third_party/hybridauth/Hybrid/Providers/OpenID.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Twitter.php b/src/app/third_party/hybridauth/Hybrid/Providers/Twitter.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Twitter.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Twitter.php diff --git a/src/application/third_party/hybridauth/Hybrid/Providers/Yahoo.php b/src/app/third_party/hybridauth/Hybrid/Providers/Yahoo.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Providers/Yahoo.php rename to src/app/third_party/hybridauth/Hybrid/Providers/Yahoo.php diff --git a/src/application/third_party/hybridauth/Hybrid/Storage.php b/src/app/third_party/hybridauth/Hybrid/Storage.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/Storage.php rename to src/app/third_party/hybridauth/Hybrid/Storage.php diff --git a/src/application/third_party/hybridauth/Hybrid/User.php b/src/app/third_party/hybridauth/Hybrid/User.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/User.php rename to src/app/third_party/hybridauth/Hybrid/User.php diff --git a/src/application/third_party/hybridauth/Hybrid/User_Activity.php b/src/app/third_party/hybridauth/Hybrid/User_Activity.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/User_Activity.php rename to src/app/third_party/hybridauth/Hybrid/User_Activity.php diff --git a/src/application/third_party/hybridauth/Hybrid/User_Contact.php b/src/app/third_party/hybridauth/Hybrid/User_Contact.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/User_Contact.php rename to src/app/third_party/hybridauth/Hybrid/User_Contact.php diff --git a/src/application/third_party/hybridauth/Hybrid/User_Profile.php b/src/app/third_party/hybridauth/Hybrid/User_Profile.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/User_Profile.php rename to src/app/third_party/hybridauth/Hybrid/User_Profile.php diff --git a/src/application/third_party/hybridauth/Hybrid/index.html b/src/app/third_party/hybridauth/Hybrid/index.html similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/index.html rename to src/app/third_party/hybridauth/Hybrid/index.html diff --git a/src/application/third_party/hybridauth/Hybrid/resources/config.php.tpl b/src/app/third_party/hybridauth/Hybrid/resources/config.php.tpl similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/resources/config.php.tpl rename to src/app/third_party/hybridauth/Hybrid/resources/config.php.tpl diff --git a/src/application/third_party/hybridauth/Hybrid/resources/index.html b/src/app/third_party/hybridauth/Hybrid/resources/index.html similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/resources/index.html rename to src/app/third_party/hybridauth/Hybrid/resources/index.html diff --git a/src/application/third_party/hybridauth/Hybrid/resources/openid_policy.html b/src/app/third_party/hybridauth/Hybrid/resources/openid_policy.html similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/resources/openid_policy.html rename to src/app/third_party/hybridauth/Hybrid/resources/openid_policy.html diff --git a/src/application/third_party/hybridauth/Hybrid/resources/openid_realm.html b/src/app/third_party/hybridauth/Hybrid/resources/openid_realm.html similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/resources/openid_realm.html rename to src/app/third_party/hybridauth/Hybrid/resources/openid_realm.html diff --git a/src/application/third_party/hybridauth/Hybrid/resources/openid_xrds.xml b/src/app/third_party/hybridauth/Hybrid/resources/openid_xrds.xml similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/resources/openid_xrds.xml rename to src/app/third_party/hybridauth/Hybrid/resources/openid_xrds.xml diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/base_facebook.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/base_facebook.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/base_facebook.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/base_facebook.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/facebook.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/facebook.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/facebook.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/facebook.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/fb_ca_chain_bundle.crt b/src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/fb_ca_chain_bundle.crt similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/Facebook/fb_ca_chain_bundle.crt rename to src/app/third_party/hybridauth/Hybrid/thirdparty/Facebook/fb_ca_chain_bundle.crt diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/LinkedIn/LinkedIn.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/LinkedIn/LinkedIn.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/LinkedIn/LinkedIn.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/LinkedIn/LinkedIn.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php b/src/app/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php rename to src/app/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php diff --git a/src/application/third_party/hybridauth/Hybrid/thirdparty/index.html b/src/app/third_party/hybridauth/Hybrid/thirdparty/index.html similarity index 100% rename from src/application/third_party/hybridauth/Hybrid/thirdparty/index.html rename to src/app/third_party/hybridauth/Hybrid/thirdparty/index.html diff --git a/src/application/third_party/hybridauth/index.php b/src/app/third_party/hybridauth/index.php similarity index 100% rename from src/application/third_party/hybridauth/index.php rename to src/app/third_party/hybridauth/index.php diff --git a/src/application/third_party/index.html b/src/app/third_party/index.html similarity index 100% rename from src/application/third_party/index.html rename to src/app/third_party/index.html diff --git a/src/application/views/account/forgot_password.php b/src/app/views/account/forgot_password.php similarity index 100% rename from src/application/views/account/forgot_password.php rename to src/app/views/account/forgot_password.php diff --git a/src/application/views/account/login.php b/src/app/views/account/login.php similarity index 100% rename from src/application/views/account/login.php rename to src/app/views/account/login.php diff --git a/src/application/views/account/oauth_buttons.php b/src/app/views/account/oauth_buttons.php similarity index 100% rename from src/application/views/account/oauth_buttons.php rename to src/app/views/account/oauth_buttons.php diff --git a/src/application/views/account/register.php b/src/app/views/account/register.php similarity index 100% rename from src/application/views/account/register.php rename to src/app/views/account/register.php diff --git a/src/application/views/account/reset_password b/src/app/views/account/reset_password similarity index 100% rename from src/application/views/account/reset_password rename to src/app/views/account/reset_password diff --git a/src/application/views/dashboard.php b/src/app/views/dashboard.php similarity index 100% rename from src/application/views/dashboard.php rename to src/app/views/dashboard.php diff --git a/src/application/views/emails/reset_password.php b/src/app/views/emails/reset_password.php similarity index 100% rename from src/application/views/emails/reset_password.php rename to src/app/views/emails/reset_password.php diff --git a/src/application/views/emails/template.php b/src/app/views/emails/template.php similarity index 100% rename from src/application/views/emails/template.php rename to src/app/views/emails/template.php diff --git a/src/application/views/footer.php b/src/app/views/footer.php similarity index 100% rename from src/application/views/footer.php rename to src/app/views/footer.php diff --git a/src/application/views/header.php b/src/app/views/header.php similarity index 100% rename from src/application/views/header.php rename to src/app/views/header.php diff --git a/src/app/views/home.php b/src/app/views/home.php new file mode 100644 index 0000000..e2ca75d --- /dev/null +++ b/src/app/views/home.php @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/src/application/views/index.html b/src/app/views/index.html similarity index 100% rename from src/application/views/index.html rename to src/app/views/index.html diff --git a/src/application/views/navbar.php b/src/app/views/navbar.php similarity index 100% rename from src/application/views/navbar.php rename to src/app/views/navbar.php diff --git a/src/application/views/posts/comments.php b/src/app/views/posts/comments.php similarity index 100% rename from src/application/views/posts/comments.php rename to src/app/views/posts/comments.php diff --git a/src/application/views/posts/html_template.php b/src/app/views/posts/html_template.php similarity index 100% rename from src/application/views/posts/html_template.php rename to src/app/views/posts/html_template.php diff --git a/src/application/views/posts/loading.php b/src/app/views/posts/loading.php similarity index 100% rename from src/application/views/posts/loading.php rename to src/app/views/posts/loading.php diff --git a/src/application/views/posts/post_box.php b/src/app/views/posts/post_box.php similarity index 100% rename from src/application/views/posts/post_box.php rename to src/app/views/posts/post_box.php diff --git a/src/application/views/posts/report.php b/src/app/views/posts/report.php similarity index 100% rename from src/application/views/posts/report.php rename to src/app/views/posts/report.php diff --git a/src/application/views/posts/view.php b/src/app/views/posts/view.php similarity index 100% rename from src/application/views/posts/view.php rename to src/app/views/posts/view.php diff --git a/src/application/views/templates/hero.php b/src/app/views/templates/hero.php similarity index 100% rename from src/application/views/templates/hero.php rename to src/app/views/templates/hero.php diff --git a/src/application/views/templates/master.php b/src/app/views/templates/master.php similarity index 76% rename from src/application/views/templates/master.php rename to src/app/views/templates/master.php index f8d4970..4bc557d 100644 --- a/src/application/views/templates/master.php +++ b/src/app/views/templates/master.php @@ -8,7 +8,7 @@ load->view('navbar'); echo "\n"; ?> -load->view('templates/hero'); } ?> +php_session->get('loggedin')) { $this->load->view('templates/hero'); } ?> load->view('templates/no_script'); echo "\n"; ?> diff --git a/src/application/views/templates/msg_box.php b/src/app/views/templates/msg_box.php similarity index 100% rename from src/application/views/templates/msg_box.php rename to src/app/views/templates/msg_box.php diff --git a/src/application/views/templates/no_script.php b/src/app/views/templates/no_script.php similarity index 100% rename from src/application/views/templates/no_script.php rename to src/app/views/templates/no_script.php diff --git a/src/application/views/templates/validation_errors.php b/src/app/views/templates/validation_errors.php similarity index 100% rename from src/application/views/templates/validation_errors.php rename to src/app/views/templates/validation_errors.php diff --git a/src/application/views/welcome_message.php b/src/app/views/welcome_message.php similarity index 100% rename from src/application/views/welcome_message.php rename to src/app/views/welcome_message.php diff --git a/src/application/controllers/main.php b/src/application/controllers/main.php deleted file mode 100755 index 29321d4..0000000 --- a/src/application/controllers/main.php +++ /dev/null @@ -1,45 +0,0 @@ -load->model('post_model'); - } - - /** - * This is the home page - */ - public function index() { - - // If user is logged in, redirect to dashboard - if($this->php_session->get('loggedin')) { - redirect('dashboard'); - } - else { - $data['title'] = 'Welcome'; - $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); - $data['feed'] = true; - $data['feed_container'] = '#layout'; - $this->template->load('home', $data); - } - - } - -} - -/* End of file main.php */ -/* Location: ./application/controllers/main.php */ \ No newline at end of file diff --git a/src/application/views/home.php b/src/application/views/home.php deleted file mode 100644 index 131ff82..0000000 --- a/src/application/views/home.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/src/assets/js/dash.js b/src/assets/js/dash.js index ab6eb6b..f464247 100644 --- a/src/assets/js/dash.js +++ b/src/assets/js/dash.js @@ -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); diff --git a/src/index.php b/src/index.php index 95944f6..a6c4af1 100644 --- a/src/index.php +++ b/src/index.php @@ -73,7 +73,7 @@ * NO TRAILING SLASH! * */ - $application_folder = 'application'; + $application_folder = 'app'; /* * -------------------------------------------------------------------- diff --git a/mxious.sublime-project b/utils/mxious.sublime-project similarity index 100% rename from mxious.sublime-project rename to utils/mxious.sublime-project diff --git a/mxious.sublime-workspace b/utils/mxious.sublime-workspace similarity index 100% rename from mxious.sublime-workspace rename to utils/mxious.sublime-workspace diff --git a/install/sql/mxious.sql b/utils/sql/mxious.sql similarity index 100% rename from install/sql/mxious.sql rename to utils/sql/mxious.sql diff --git a/src/ci-license.txt b/vendor/licenses/ci-license.txt similarity index 100% rename from src/ci-license.txt rename to vendor/licenses/ci-license.txt