diff --git a/.travis.yml b/.travis.yml index b1746c9ad..cbe0cd6cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,10 @@ language: php - phps: - 5.3 - 5.4 - - 5.5 - - 5.6 - - 7.0 -matrix: - fast_finish: true - allow_failures: - - php: 7.0 +script: phpunit --help -script: - - phpunit +branches: + only: + - master diff --git a/CHANGES.txt b/CHANGES.txt index 4c897eb29..6cc96b0aa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -67,7 +67,7 @@ Functions in existing libraries and classes: * ossn_unload_js: Ossn system unloads js from head. * ossn_unlink_new_css: Remove a css from system. This will not remove css file it will just unregister it. * ossn_unload_css: Ossn system unloads css from head - * ossn_view_template View a template. Use a templates from core. (image view, url view etc). + * ossn_plugin_view View a template. Use a templates from core. (image view, url view etc). * ossn_load_json_locales: To get all system language strings in json format. * ossn_add_entity: add a new entity. * ossn_update_entity: update entity. diff --git a/README.md b/README.md index 98155de3f..8984d1b76 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -Open Source Social Network [2.3] [![Build Status](https://travis-ci.org/opensource-socialnetwork/opensource-socialnetwork.svg?branch=master)](https://travis-ci.org/opensource-socialnetwork/opensource-socialnetwork) -====================================== +Open Source Social Network [3.0-dev] ====================================== Opensource-Socialnetwork (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. OSSN is released under the GNU General Public License (GPL) Version 2 +[NOTE: This branch will not work on production site and have alot of bugs] + Languages ========== * English diff --git a/UPGRADE.txt b/UPGRADE.txt index b874a1426..df0615220 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -1 +1 @@ -See: http://docs.opensource-socialnetwork.org/index.php/How_To_Upgrade_Ossn +See: http://docs.Open Source Social Network.org/index.php/How_To_Upgrade_Ossn diff --git a/actions/administrator/cache/create.php b/actions/administrator/cache/create.php index baf30e250..fc97a6038 100644 --- a/actions/administrator/cache/create.php +++ b/actions/administrator/cache/create.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $type = input('cache'); if ($type == 1) { diff --git a/actions/administrator/component/com_install.php b/actions/administrator/component/com_install.php index 4c42b6702..f55ba8534 100644 --- a/actions/administrator/component/com_install.php +++ b/actions/administrator/component/com_install.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnCom = new OssnComponents; diff --git a/actions/administrator/component/delete.php b/actions/administrator/component/delete.php index aa09a26d5..9693dcf7d 100644 --- a/actions/administrator/component/delete.php +++ b/actions/administrator/component/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $com = input('component'); diff --git a/actions/administrator/component/disable.php b/actions/administrator/component/disable.php index 7d20b0b43..25822dbb2 100644 --- a/actions/administrator/component/disable.php +++ b/actions/administrator/component/disable.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $enable = new OssnComponents; diff --git a/actions/administrator/component/enable.php b/actions/administrator/component/enable.php index 6ebd4c22c..2a9a5c563 100644 --- a/actions/administrator/component/enable.php +++ b/actions/administrator/component/enable.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $enable = new OssnComponents; diff --git a/actions/administrator/login.php b/actions/administrator/login.php index b5e8bed54..889a26605 100644 --- a/actions/administrator/login.php +++ b/actions/administrator/login.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_isAdminLoggedin()) { redirect('administrator/dashboard'); diff --git a/actions/administrator/logout.php b/actions/administrator/logout.php index edb31a73e..9cb657bd2 100644 --- a/actions/administrator/logout.php +++ b/actions/administrator/logout.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $loggedout = input('l'); diff --git a/actions/administrator/settings/save/basic.php b/actions/administrator/settings/save/basic.php index 868632390..6d78962bf 100644 --- a/actions/administrator/settings/save/basic.php +++ b/actions/administrator/settings/save/basic.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $settings = new OssnDatabase; diff --git a/actions/administrator/theme/delete.php b/actions/administrator/theme/delete.php index 44165c542..00a8291fa 100644 --- a/actions/administrator/theme/delete.php +++ b/actions/administrator/theme/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $theme = input('theme'); $delete = new OssnThemes; diff --git a/actions/administrator/theme/enable.php b/actions/administrator/theme/enable.php index 7c6a2491a..bd23c1eff 100644 --- a/actions/administrator/theme/enable.php +++ b/actions/administrator/theme/enable.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $theme = input('theme'); $enable = new OssnThemes; diff --git a/actions/administrator/theme/theme_install.php b/actions/administrator/theme/theme_install.php index 4fc422fb5..149d2c09c 100644 --- a/actions/administrator/theme/theme_install.php +++ b/actions/administrator/theme/theme_install.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnTheme = new OssnThemes; if ($OssnTheme->upload()) { diff --git a/actions/administrator/user/add.php b/actions/administrator/user/add.php index d8520acde..2b098ed4b 100644 --- a/actions/administrator/user/add.php +++ b/actions/administrator/user/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user['username'] = input('username'); diff --git a/actions/administrator/user/delete.php b/actions/administrator/user/delete.php index a3051b255..c1b6a12a6 100644 --- a/actions/administrator/user/delete.php +++ b/actions/administrator/user/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $guid = input('guid'); diff --git a/actions/administrator/user/edit.php b/actions/administrator/user/edit.php index 1eeea3c50..228b407e1 100644 --- a/actions/administrator/user/edit.php +++ b/actions/administrator/user/edit.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $entity = ossn_user_by_username(input('username')); if(!$entity){ diff --git a/actions/administrator/user/validate.php b/actions/administrator/user/validate.php index 27cb9db05..2fa3b7698 100644 --- a/actions/administrator/user/validate.php +++ b/actions/administrator/user/validate.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = ossn_user_by_guid(input('guid')); if(!$user){ diff --git a/actions/friend/add.php b/actions/friend/add.php index 2e1435dfe..f53f852e5 100644 --- a/actions/friend/add.php +++ b/actions/friend/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_is_xhr()) { header('Content-Type: application/json'); diff --git a/actions/friend/remove.php b/actions/friend/remove.php index 1a1ee8c08..60c0eed6e 100644 --- a/actions/friend/remove.php +++ b/actions/friend/remove.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_is_xhr()) { header('Content-Type: application/json'); diff --git a/actions/user/login.php b/actions/user/login.php index 062b60d1a..75c32e4c8 100644 --- a/actions/user/login.php +++ b/actions/user/login.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_isLoggedin()) { diff --git a/actions/user/logout.php b/actions/user/logout.php index 93f3f4dce..ee14068a8 100644 --- a/actions/user/logout.php +++ b/actions/user/logout.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ unset($_SESSION['OSSN_USER']); diff --git a/actions/user/register.php b/actions/user/register.php index 574d4a595..47f7f5ef5 100644 --- a/actions/user/register.php +++ b/actions/user/register.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/actions/user/resetlogin.php b/actions/user/resetlogin.php index 876b98de5..44b330c56 100644 --- a/actions/user/resetlogin.php +++ b/actions/user/resetlogin.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = input('email'); if (empty($user)) { diff --git a/actions/user/resetpassword.php b/actions/user/resetpassword.php index e46761de8..3e5640809 100644 --- a/actions/user/resetpassword.php +++ b/actions/user/resetpassword.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = input('user'); $code = input('c'); diff --git a/cache/css/1429430046/view/ossn.admin.default.css b/cache/css/1429430046/view/ossn.admin.default.css new file mode 100644 index 000000000..b5160f5ae --- /dev/null +++ b/cache/css/1429430046/view/ossn.admin.default.css @@ -0,0 +1,75 @@ +body,fieldset,table,textarea,input{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit}body{font-size:13px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#333}a{color:#2B5470;text-decoration:none}.ossn-header{background:#2F4959 url('http://local.opensource-socialnetwork.org/themes/default/images/header-background.png') repeat-x;height:70px}.logo-admin{background:url('http://local.opensource-socialnetwork.org/themes/default/images/logo_admin.png') no-repeat;height:57px;width:187px}.ossn-header +.inner{padding:10px;width:985px;margin:0 +auto;color:#fff}.ossn-admin-topmenu{background:#406479;height:40px}.ossn-admin-button{display:inline-block;outline:none;cursor:pointer;text-align:center;font-weight:bold;text-decoration:none;font:14px;padding: .5em 2em .55em;text-shadow:0 1px 1px rgba(0,0,0,.3);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.ossn-admin-button:hover{text-decoration:none}.ossn-admin-button:active{position:relative;top:1px}.button-orange{color:#fef4e9;border:solid 1px #da7c0c;background:#f78d1d;background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));background: -moz-linear-gradient(top,#faa51a,#f47a20);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a',endColorstr='#f47a20')}.button-orange:hover{background:#f47c20;background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));background: -moz-linear-gradient(top,#f88e11,#f06015);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11',endColorstr='#f06015')}.button-orange:active{color:#fcd3a5;background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));background: -moz-linear-gradient(top,#f47a20,#faa51a);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20',endColorstr='#faa51a')}.button-white{color:#606060;border:solid 1px #b7b7b7;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));background: -moz-linear-gradient(top,#fff,#ededed);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#ededed')}.button-white:hover{background:#ededed;background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dcdcdc));background: -moz-linear-gradient(top,#fff,#dcdcdc);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#dcdcdc')}.button-white:active{color:#999;background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#fff));background: -moz-linear-gradient(top,#ededed,#fff);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff')}.button-dark-blue{color:#fff;border:solid 1px #345162;background:#406479;background: -webkit-gradient(linear, left top, left bottom, from(#406479), to(#345162));background: -moz-linear-gradient(top,#406479,#345162);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#406479',endColorstr='#345162')}.button-dark-blue:hover{border:solid 1px #628092;background:#628092;background: -webkit-gradient(linear, left top, left bottom, from(#345162), to(#406479));background: -moz-linear-gradient(top,#345162,#406479);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#345162',endColorstr='#406479')}.button-red{color:#faddde;border:solid 1px #980c10;background:#d81b21;background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));background: -moz-linear-gradient(top,#ed1c24,#aa1317);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24',endColorstr='#aa1317')}.button-red:hover{background:#b61318;background: -webkit-gradient(linear, left top, left bottom, from(#c9151b), to(#a11115));background: -moz-linear-gradient(top,#c9151b,#a11115);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c9151b',endColorstr='#a11115')}.button-red:active{color:#de898c;background: -webkit-gradient(linear, left top, left bottom, from(#aa1317), to(#ed1c24));background: -moz-linear-gradient(top,#aa1317,#ed1c24);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#aa1317',endColorstr='#ed1c24')}.button-blue{color:#d9eef7;border:solid 1px #0076a3;background:#0095cd;background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));background: -moz-linear-gradient(top,#00adee,#0078a5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee',endColorstr='#0078a5')}.button-blue:hover{background:#007ead;background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));background: -moz-linear-gradient(top,#0095cc,#00678e);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc',endColorstr='#00678e')}.button-blue:active{color:#80bed6;background:button--webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee));background: -moz-linear-gradient(top,#0078a5,#00adee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5',endColorstr='#00adee')}.button-green{color:#e8f0de;border:solid 1px #538312;background:#64991e;background: -webkit-gradient(linear, left top, left bottom, from(#7db72f), to(#4e7d0e));background: -moz-linear-gradient(top,#7db72f,#4e7d0e);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7db72f',endColorstr='#4e7d0e')}.button-green:hover{background:#538018;background: -webkit-gradient(linear, left top, left bottom, from(#6b9d28), to(#436b0c));background: -moz-linear-gradient(top,#6b9d28,#436b0c);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6b9d28',endColorstr='#436b0c')}.button-green:active{color:#a9c08c;background: -webkit-gradient(linear, left top, left bottom, from(#4e7d0e), to(#7db72f));background: -moz-linear-gradient(top,#4e7d0e,#7db72f);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e7d0e',endColorstr='#7db72f')}.ossn-com-install-notice{margin-top:12px;background:#eee;padding:18px;font-weight:bold;border:1px +solid #ccc}.ossn-admin-form input[type='text'], +.ossn-admin-form input[type='password'], +.ossn-admin-form +textarea{padding:8px;border:1px +solid #c4c4c4;height:26px;min-width:300px;background:#FDFDFD;border-radius:2px;display:block;-webkit-transition:all 0.30s ease-in-out;-moz-transition:all 0.30s ease-in-out;-ms-transition:all 0.30s ease-in-out;-o-transition:all 0.30s ease-in-out;border:1px +solid #eee}.ossn-admin-form +textarea{height:100px;max-width:300px}.ossn-admin-form input[type='password']:focus, +.ossn-admin-form input[type='text']:focus{box-shadow:0 0 5px #ccc;border:1px +solid #ccc}.ossn-admin-form +select{padding:6px;display:block;margin-bottom:10px}.ossn-admin-form +input{margin-bottom:10px}.ossn-admin-form +label{padding:3px +4px;margin-bottom:3px;color:#406479;display:block;font-weight:bold}.groups-inline +select{display:inline-block}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;border:1px +solid #eee}.table{width:100%;margin-bottom:18px}.table th, +.table +td{padding:10px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table +th{font-weight:bold}.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child +td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table +.table{background-color:#fff}.table tbody > tr:nth-child(odd) > td, +.table tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-titles +td{font-weight:bold;color:#406479;background-image:linear-gradient(to bottom, #F8F8F8, #EBEBEB) !important}.ossn-users-list +.image{width:32px;height:32px;padding-bottom:7px}.top-controls-users-page{float:right}.top-controls{margin-bottom:10px;margin-top:6px}.top-controls +a{margin-right:5px}.user-search{position:absolute}.ossn-admin-login{background:#f8f8f8;width:320px;border-radius:4px;margin-left:auto;margin-right:auto;padding:10px +20px;box-shadow:0px 1px 5px #999;margin:0 +auto}.ossn-admin-login +h3{text-align:center}.ossn-login-form{wdith:250px;margin:0 +auto}.ossn-admin-footer{width:990px;margin:0 +auto;border-top:2px solid #eee;padding:10px;margin-bottom:30px}.ossn-admin-footer +.powered{float:right}.ossn-admin-footer +.copyrights{float:left}.ossn-admin-body{min-height:500px}.ossn-layout-admin{width:990px;margin:0 +auto;margin-top:25px}.ossn-layout-admin +.sidebar{display:inline-table;width:215px}.ossn-layout-admin +.contents{width:760px;display:inline-table}.ossn-layout-admin .contents +.title{font-size:20px;font-weight:bold;border-bottom:1px solid;color:#406479;border-color:#406479}.ossn-layout-admin .contents +.content{padding:10px;display:inline}.ossn-layout-admin-login{width:990px;margin:0 +auto;margin-top:25px}.ossn-layout-admin-login +.contents{float:right;width:990px}.ossn-message-error{background-color:#f2dede;border-color:#eed3d7;border:1px +solid;border-radius:2px;color:#b94a48;padding:20px;margin-bottom:10px}.ossn-message-success{background-color:#dff0d8;border-color:#d6e9c6;border:1px +solid;border-radius:2px;color:#468847;padding:20px;margin-bottom:10px}.ossn-admin-dsahboard .dashboard-block{border:1px +solid #eee;width:215px;-webkit-box-shadow:0px 1px 1px #ccc;-moz-box-shadow:0px 1px 1px #ccc;box-shadow:0px 1px 1px #ccc;display:inline-block;margin-right:27px;margin-bottom:20px}.ossn-admin-dsahboard +.dashboard-block +.dashboard-block-title{background:#F6F7F8;padding:10px;font-weight:bold;font-size:14px;text-align:center}.ossn-admin-dsahboard +.dashboard-block +.dsahboard-block-contents{padding:28px;text-align:center;font-size:40px}.ossn-components-item{border:1px +solid #eee;padding:10px;min-height:51px;margin-bottom:11px}.ossn-components-item .component-name{font-weight:bold;font-size:14px;color:#406479}.component-description{margin-top:6px;font-size:14px}.component-controls{float:right;margin-top: -4px}.component-controls +a{margin-right:5px}.components-button{border-left:1px solid;border-right:1px solid;border-bottom:1px solid;border-color:#eee;padding:7px;color:#fff;font-weight:bold;-webkit-box-shadow:0px 1px 1px #ccc;-moz-box-shadow:0px 1px 1px #ccc;box-shadow:0px 1px 1px #ccc}.components-button-blue{background:#6098B8}.components-button-red{background:#aa1317}.components-button-green{background:#00A59B}.components-button-orange{background:#F99315}.ossn-admin-sidemenu +.title{display:block;margin-bottom:4px;font-size:13px;font-weight:bold;line-height:18px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.ossn-admin-sidemenu .links +li{display:block}.ossn-admin-sidemenu .links li:hover{background:#EEE;cursor:pointer}.ossn-admin-sidemenu .links li +.icon{width:16px;height:16px}.ossn-admin-sidemenu .links .inner-li .text, +.ossn-admin-sidemenu .links li .inner-li +.icon{display:inline-block}.ossn-admin-sidemenu .links +a{font-size:14px;color:#555;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.ossn-admin-sidemenu +.links{margin-bottom:10px}.ossn-admin-sidemenu .inner-li{padding:6px}.ossn-admin-sidemenu .inner-li +.text{position:absolute;margin-left:5px}.ossn-admin-menu-topbar{width:985px;margin:auto}.ossn-admin-menu-topbar +ul{text-align:left;display:inline;margin:0;list-style:none;margin-left: -41px}.ossn-admin-menu-topbar ul +a{color:#fff}.ossn-admin-menu-topbar ul +li{font:bold 12px/18px sans-serif;display:inline-block;margin-right: -4px;position:relative;padding:11px +15px;cursor:pointer;-webkit-transition:all 0.2s;-moz-transition:all 0.2s;-ms-transition:all 0.2s;-o-transition:all 0.2s;background:#406479;transition:all 0.2s;color:#FFF}.ossn-admin-menu-topbar ul li:hover{background:#5B8AAA;color:#fff}.ossn-admin-menu-topbar ul li +ul{padding:0;z-index:1;position:absolute;top:40px;left:40.5px;width:150px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:none;opacity:0;visibility:hidden;-webkit-transiton:opacity 0.2s;-moz-transition:opacity 0.2s;-ms-transition:opacity 0.2s;-o-transition:opacity 0.2s;-transition:opacity 0.2s}.ossn-admin-menu-topbar ul li ul +li{background:#406479;display:block;color:#fff;text-shadow:0 -1px 0 #000}.ossn-admin-menu-topbar ul li ul li:hover{background:#5B8AAA}.ossn-admin-menu-topbar ul li:hover +ul{display:block;opacity:1;visibility:visible}.ossn-admin-menu-topbar +.right{float:right}.ossn-pagination{background:#F7F7F7;text-align:center;border:1px +solid #BBB}.ossn-pagination +li{display:inline-block;padding:10px}.ossn-pagination +a{font-size:12px}.ossn-pagination +.selected{border-bottom:2px solid #2B5470}.ossn-ad-image{width:200px;height:200px} \ No newline at end of file diff --git a/cache/css/1429430046/view/ossn.default.css b/cache/css/1429430046/view/ossn.default.css new file mode 100644 index 000000000..9eb25cbb4 --- /dev/null +++ b/cache/css/1429430046/view/ossn.default.css @@ -0,0 +1,348 @@ +body,fieldset,table,textarea,input{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit}body{font-size:11px;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;color:#333}hr{background:#D9D9D9;border-width:0;color:#D9D9D9;height:1px}a{color:#2B5470;text-decoration:none}.ossn-layout-contents{width:985px;margin:0 +auto}.ossn-content-spacing{margin-top:50px}.ossn-form input[type='text'], +.ossn-form input[type='password']{border-color:#1D2A5B;color:#000;font-size:11px;margin:0;padding:3px +3px 4px;width:150px}#ossn-login .long-input, +#ossn-home-signup .long-input{width:325px}.ossn-button{color:#333;font-weight:bold;text-decoration:none;width:auto;margin:0;font-size:11px;line-height:16px;padding:2px +6px;cursor:pointer;outline:none;text-align:center;white-space:nowrap;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF;-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #fff;box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF;border:1px +solid #999;border-bottom-color:#888;background:#EEE;background: -webkit-gradient(linear, 0 0, 0 100%, from(#F5F6F6), to(#E4E4E3));background: -moz-linear-gradient(#f5f6f6, #e4e4e3);background: -o-linear-gradient(#f5f6f6,#e4e4e3);background:linear-gradient(#F5F6F6,#E4E4E3)}.ossn-button-submit{color:#FFF !important;background:#47718B;border-color:#369 #369 #1A356E;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #89A6C4;-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #89A6C4;box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #89A6C4}.ossn-button-submit:focus{background:#5C8CA9}.ossn-header{background:#2F4959 url('http://local.opensource-socialnetwork.org/themes/default/images/header-background.png') repeat-x;height:90px}.logo-second{background:url('http://local.opensource-socialnetwork.org/themes/default/images/logo_2.png') no-repeat;height:28px;width:28px}.ossn-header +.inner{padding:10px;width:985px;margin:0 +auto;color:#fff}.ossn-logo{background:url('http://local.opensource-socialnetwork.org/themes/default/images/logo.png') repeat-x;height:49px;width:166px;margin-top:15px}.ossn-home-container{background:#F2F2F2 url('http://local.opensource-socialnetwork.org/themes/default/images/home-background.png') repeat-x;min-height:465px}.ossn-home-container +.inner{width:985px;margin:0 +auto;padding-bottom:20px}.home-left-contents{width:556px;display:inline-table;float:left}.home-left-contents +h1{font-size:20px;color:#2F495B;margin-top:32px}.home-right-contents{display:inline-table;margin-left:35px;width:376px}.home-right-contents +h1{font-size:30px}.home-right-contents .h1-bottom{font-family:"lucida grande",tahoma,verdana,arial,sans-serif;font-size:22px;font-weight:normal;line-height:28px;margin-top: -20px}.ossn-home-container +img{box-shadow:1px 4px 5px #333;margin-top:16px}#ossn-header-login{float:right;margin-top: -52px;padding:6px}#ossn-header-login +label{color:white;display:block;font-weight:normal;padding:2px +2px 4px}#ossn-header-login +div{display:inline-block;margin-bottom:3px;padding-right:10px}#ossn-header-login +a{color:#fff;text-decoration:none}#ossn-header-login a:hover{color:#fff;text-decoration:underline;cursor:pointer}#ossn-header-login +.input{border-color:#1D2A5B;color:black;font-size:11px;margin:0;padding:3px +3px 4px;width:150px}#ossn-login input, +#ossn-home-signup +input{font-size:18px;padding:8px +10px;border:1px +solid #BDC7D8;border-radius:5px}#ossn-login div, +#ossn-home-signup +div{margin-bottom:10px}#ossn-home-signup +span{display:inline-block;margin-right:10px}#ossn-home-signup select, +#ossn-home-signup +option{margin-top:-5px;height:31px;padding:5px}.ossn-button-green, +#ossn-login input[type='submit'], +#ossn-home-signup input[type='submit']{box-shadow:0px 1px 1px #517185 inset;border-color:#517185;background:linear-gradient(#517185, #2F4959) repeat scroll 0% 0% #2F4959;color:#fff;cursor:pointer}.home-footer{width:985px;margin:0 +auto;padding:5px;font-size:12px}.home-footer-links{margin-top:21px;border-top:1px solid #CCC}.home-footer-links +li{display:inline-block}.ossn-topbar{background:#2F4959 url('http://local.opensource-socialnetwork.org/themes/default/images/top-background.png') repeat-x;height:42px;position:fixed;left:0;right:0;top:0;z-index:10000}.ossn-error-container,.login-error{border:1px +solid #DD3C10;border-width:1px;background-color:#FFEBE8;padding:13px}.login-page{width:583px;min-height:200px;margin-top:70px;position:absolute;margin-left:193px}.login-page-fields{padding:14px;text-align:center}.login-page-fields +a{margin-top:10px}.login-page-fields a:hover{text-decoration:underline}.login-page-fields +span{font-size:11px;font-weight:bold}.ossn-red-borders{border:1px +solid #DB2727 !important}#ossn-signup-errors{display:none;margin-top: -15px;width:325px}.ossn-message-done{border:1px +solid #1EB0DF;border-width:1px;background-color:#DAF6FF;padding:13px;text-align:left}.ossn-required{color:#DB2727}.button-blue-light{margin-left:4px;color:#fff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background:#4D96BE;background-image:linear-gradient(top bottom, #ffffff, #f6f7f8);-webkit-background-clip:padding-box;background-clip:padding-box;border:1px +solid;-webkit-border-radius:2px;border-radius:2px;-moz-border-radius:2px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-sizing:content-box;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-font-smoothing:antialiased;line-height:22px;font-weight:700;font-size:12px;position:relative;text-align:center;vertical-align:middle;cursor:pointer;display:inline-block;text-decoration:none;white-space:nowrap;border-color:#3684AF #3C86C0 #175F81 !important;padding:0 +8px}.button-grey-light{margin-left:4px;color:#4E5665;text-shadow:0 1px 0 #FFF;background:#F6F7F8;background-image:linear-gradient(top bottom,#ffffff,#f6f7f8);-webkit-background-clip:padding-box;background-clip:padding-box;border:1px +solid;-webkit-border-radius:2px;border-radius:2px;-moz-border-radius:2px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-sizing:content-box;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-font-smoothing:antialiased;line-height:22px;font-weight:700;font-size:12px;position:relative;text-align:center;vertical-align:middle;cursor:pointer;display:inline-block;text-decoration:none;white-space:nowrap;border-color:#CDCED0 #C5C6C8 #B6B7B9!important;padding:0 +8px}.button-grey{color:#333;font-weight:bold;text-decoration:none;width:auto;margin:0;font-size:12px;line-height:16px;padding:5px +6px;cursor:pointer;outline:none;text-align:center;white-space:nowrap;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF;-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.10), inset 0 1px 0 #fff;box-shadow:0 1px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF;border:1px +solid #999;border-bottom-color:#888;background:#EEE;background: -webkit-gradient(linear, 0 0, 0 100%, from(#F5F6F6), to(#E4E4E3));background: -moz-linear-gradient(#f5f6f6, #e4e4e3);background: -o-linear-gradient(#f5f6f6,#e4e4e3);background:linear-gradient(#F5F6F6,#E4E4E3)}.button-grey:active{background:#ddd;border-bottom-color:#999;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.ossn-icons-topbar-messages,.ossn-icons-topbar-notification,.ossn-icons-topbar-friends,.ossn-icons-topbar-friends-new,.ossn-icons-topbar-messages-new,.ossn-icons-topbar-notifications-new{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/topbar.png') no-repeat}.ossn-icons-topbar-messages{background-position:0 -50px;width:21px;height:19px}.ossn-icons-topbar-notification{background-position:0 -25px;width:19px;height:20px}.ossn-icons-topbar-friends{background-position:0 0;width:22px;height:19px}.ossn-icons-topbar-friends-new{background-position:0 -76px;width:22px;height:19px}.ossn-icons-topbar-messages-new{background-position:0 -127px;width:21px;height:19px}.ossn-icons-topbar-notifications-new{background-position:0 -103px;width:19px;height:20px}.ossn-icon{width:22px}.ossn-icons-topbar{position:absolute;margin-top:3px}.ossn-loading{background:url('http://local.opensource-socialnetwork.org/themes/default/images/loading.gif') no-repeat;height:24px;width:24px}.ossn-box-loading{margin-left:216px;margin-top:37px}.ossn-wall-friend{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/wall/friend.png') no-repeat;width:20px;height:17px}.ossn-wall-status{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/wall/status.png') no-repeat;width:16px;height:16px}.ossn-wall-location{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/wall/location.png') no-repeat;width:20px;height:17px}.ossn-wall-photo{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/wall/photo.png') no-repeat;width:17px;height:17px}.ossn-icon-access-friends{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/access/friends.png') no-repeat;width:12px;height:12px}.ossn-icon-access-public{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/access/public.png') no-repeat;width:12px;height:13px}.ossn-icon-access-private{background:url('http://local.opensource-socialnetwork.org/themes/default/images/icons/access/private.png') no-repeat;width:10px;height:12px}.ossn-inline-table{display:inline-table}.ossn-menu-newsfeed{margin-top:10px}.ossn-menu-section-name{color:#999;font-size:13px;font-weight:bold;margin-bottom:3px}.ossn-menu-newsfeed +.title{font-size:11px;color:#999;font-weight:bold;margin-left:3px;margin-bottom:2px}.ossn-menu-newsfeed +li{display:block;line-height:24px}.ossn-menu-newsfeed li +img{position:absolute;padding:4px}.ossn-menu-newsfeed li +a{color:#141823;font-size:12px}.ossn-menu-newsfeed li +.text{margin-left:25px;text-overflow:ellipsis;overflow:hidden;width:132px;white-space:nowrap}.ossn-menu-newsfeed li:hover{background:#DDDEE0}.ossn-menu-search{margin-top:-5px}.ossn-menu-search +.title{font-size:11px;color:#999;font-weight:bold;margin-left:3px;margin-bottom:2px}.ossn-menu-search +li{display:block;line-height:24px}.ossn-menu-search li +img{position:absolute;padding:4px}.ossn-menu-search li +a{color:#141823;font-size:12px}.ossn-menu-search li +.text{margin-left:25px}.ossn-menu-search li:hover{background:#DDDEE0}.profile-hr-menu{margin-top:32px;margin-left:205px;position:absolute}.profile-hr-menu .first-item{border-left:1px solid #EEE}#profile-hr-menu{border:none;border:0px;padding:1px;font-size:14px;font-weight:bold;width:auto}#profile-hr-menu +ul{background:#fff;height:35px;list-style:none;margin:0;padding:0}#profile-hr-menu +li{float:left;padding:0px;border-right:1px solid #EEE}#profile-hr-menu li +a{background:#fff;display:block;font-weight:normal;line-height:45px;margin:0px;padding:0px +20px;text-align:center;text-decoration:none}#profile-hr-menu>ul>li>a{color:#2F4979;font-weight:bold;height:44px}#profile-hr-menu ul ul +a{color:#2F4979}#profile-hr-menu li > a:hover, +#profile-hr-menu ul li:hover>a{background:#F6F7F8;text-decoration:none}#profile-hr-menu li +ul{background:#fff;display:none;height:auto;padding:0px;margin:0px;position:absolute;width:120px;z-index:200;border-left:1px solid #EEE;border-bottom:1px solid #EEE;border-right:1px solid #EEE}#profile-hr-menu li:hover +ul{display:block}#profile-hr-menu li +li{display:block;float:none;margin:0px;padding:0px;width:120px}#profile-hr-menu li:hover li +a{background:none}#profile-hr-menu li ul +a{display:block;height:35px;font-size:12px;font-style:normal;margin:0px;padding:0px +10px 0px 15px;text-align:left}#profile-hr-menu li ul a:hover, +#profile-hr-menu li ul li:hover>a{background:#F6F7F8;border:0px;text-decoration:none}#profile-hr-menu +p{clear:left}.ossn-ads{margin-top: -10px}.ossn-ads +h4{color:#999}.ossn-ads .a-heading{font-weight:bold;font-size:14px}.ossn-ads .descript, +.ossn-ads +img{display:inline-table}.ossn-ads +img{width:100px}.ossn-ads +.descript{width:126px;vertical-align:top}.ossn-ads-link{font-size:12px;margin-bottom:5px}.ossn-ads-item{margin-top:5px;border-bottom:1px solid #eee;padding-bottom:5px}.ossn-notification-container{background-color:#dc0d17;background-image: -webkit-linear-gradient(#fa3c45, #dc0d17);color:#fff;min-height:13px;padding:1px +3px;text-shadow:0 -1px 0 rgba(0, 0, 0, .4);-webkit-border-radius:2px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, .7);-webkit-background-clip:padding-box;display:inline-block;font-size:11px;line-height:normal;position:absolute}.comment-container input[readonly='readonly']{background:#eee}.ossn-all-comments{padding:4px;margin-left:5px}.ossn-all-comments +a{font-size:12px}hr{background:#D9D9D9;border-width:0;color:#D9D9D9;height:1px}.ossn-privacy{margin-top:20px;margin-top:20px;border-top:1px solid #ddd;padding-top:10px}.ossn-privacy +span{display:inline-block;color:#333;position:absolute;margin-top:-2px;font-size:13px;font-weight:bold;margin-left:4px;margin-top:4px}.ossn-privacy +p{font-size:12px;margin-top:1px}.ossn-viewer{width:940px;margin:0 +auto;position:relative}.ossn-viewer .ossn-container{height:200px;position:fixed;width:900px;z-index:10000;margin-top:70px;min-height:515px}.ossn-viewer-loding{font-size:15px}.ossn-viewer .ossn-container .close-viewer{float:right;cursor:pointer;margin-right:5px;font-weight:bold;font-size:13px;color:#ccc}.ossn-container +tbody{background:#000}.ossn-halt{position:absolute;top:0;left:0;width:100%;z-index:10000;background-color:#000;opacity:0.9;cursor:auto;height:100%;display:none}.ossn-viewer .info-block{background:#fff;height:100%;width:325px;float:right;margin-left: -3px}.image-block +img{max-width:700px}.ossn-topbar +.inner{width:990px;margin:5px +auto}.ossn-topbar .inner +li{display:inline-table}.ossn-topbar .inner .logo-second, +.ossn-topbar .inner .ossn-search, +.ossn-topbar .inner .ossn-topbar-menu,.ossn-icons-topbar{display:inline-block}.ossn-search +input{padding:6px;border:none;border-radius:5px;color:#000;font-weight:bold;width:450px;float:right;display:inline-table;height:16px}.ossn-search{width:469px;margin-top:1px;position:absolute;display:inline-table}.ossn-topbar-menu{float:right;padding:6px}.ossn-topbar-menu li +a{font-family:'Helvetica Neue',Helvetica,Arial,'lucida grande',tahoma,verdana,arial,sans-serif;color:#fff;text-shadow:0 -1px rgba(0, 0, 0, 0.5);font-size:12px;height:22px;font-weight:bold;line-height:22px}.ossn-topbar-menu +img{float:left;margin-left:2px}.ossn-topbar-menu +span{margin-left:10px;margin-right:20px}.ossn-topbar-dropdown-menu{display:block;display:inline-block;margin:0px +3px;position:relative;width:46px}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-button{cursor:pointer;width:auto;padding:4px +5px;font-weight:bold;color:#717780;line-height:16px;text-decoration:none !important}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-button +.arrow{display:inline-block;border-top:5px solid #6B7FA7;border-right:5px solid transparent;border-left:5px solid transparent}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-content{position:absolute;border:1px +solid #777;padding:0px;background:white;margin:0;display:none}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-content +li{list-style:none;margin-left:0px;line-height:16px;border-top:1px solid #FFF;border-bottom:1px solid #FFF;margin-top:2px;margin-bottom:2px}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-content li:hover{border-top-color:#668EA8;border-bottom-color:#668EA8;background:#668EA8;width:100%}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-content li +a{display:block;padding:2px +7px;padding-right:15px;color:black;text-decoration:none !important;white-space:nowrap;font-weight:normal;text-shadow:none}.ossn-topbar-dropdown-menu .ossn-topbar-dropdown-menu-content li:hover +a{color:white;text-decoration:none !important}.ossn-topbar-dropdown-menu input[type="checkbox"]:checked~.ossn-topbar-dropdown-menu-content{display:block}.ossn-topbar-dropdown-menu input[type="checkbox"]{display:none}.ossn-light{opacity:0.4}.ossn-message-box{min-width:470px;min-height:96px;background:#fff;border:1px +solid #999;position:fixed;top:0px;left:50%;margin-left: -200px;z-index:60000;margin-top:100px;border-radius:3px;display:none;box-shadow:0 2px 26px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1)}.ossn-message-box .close-box{float:right;color:#ccc;cursor:pointer}.ossn-message-box +.title{background:#F5F6F7;padding:11px;border-radius:3px;border-bottom:1px solid #E5E5E5;color:#5E5656;font-size:14px;font-weight:bold}.ossn-message-box +.contents{padding:10px;min-height:150px}.ossn-message-box +.control{margin-left:10px;margin-right:10px;height:30px;padding:10px;border-top:1px solid #E9EAED}.ossn-message-box .control +.controls{float:right}.ossn-message-box .contents input[type='text']{border:1px +solid #EEE;width:292px;padding:7px}.ossn-message-box .contents input[type='text'], +.ossn-message-box .contents +label{display:inline-table}.ossn-message-box .contents +label{color:#666;font-weight:bold;font-size:13px;margin-right:13px}.ossn-hidden{display:none}.ossn-notifications-box{display:none;float:right;width:430px;height:540px;background:#fff;margin-right:208px;margin-top:6px;-webkit-box-shadow:0 3px 8px rgba(0, 0, 0, .25);-webkit-border-radius:3px;border:1px +solid rgba(100, 100, 100, .4);position:absolute;margin-left:528px}.ossn-notifications-box .type-name{font-size:12px;font-weight:bold;padding:9px;border-bottom:1px solid #DDD}.ossn-notifications-box +li{min-height:50px}.ossn-notifications-box .messages-inner{overflow:hidden;overflow-y:scroll;position:relative;width:430px;height:465px;background:#fff;-moz-box-shadow:1px 6px 6px -5px #ddd;-webkit-box-shadow:1px 6px 6px -5px #ddd;box-shadow:1px 6px 6px -5px #ddd}.ossn-notifications-box .notification-image{display:inline-block;height:50px;width:50px}.ossn-notifications-box .notfi-meta{display:inline-block;margin-top:6px;position:absolute;width:346px;margin-left:8px;font-size:12px}.ossn-notifications-box .bottom-all{background:#F7F7F7;text-align:center;padding:14px}.ossn-notifications-box .bottom-all +a{font-weight:bold}.ossn-notifications-box +.selected{width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #fff;float:right;margin-top: -8px;margin-right:9px}.ossn-notifications-box +.notifications{margin-top: -8px;margin-right:30px}.ossn-notifications-box +.messages{margin-top: -8px;margin-right:60px}.ossn-notifications-box +.firends{margin-right:95px}.ossn-notification-box-loading{margin-left:220px;margin-top:17px;position:absolute}.ossn-edit-form input[type='text'], +.ossn-edit-form input[type='password'], +.ossn-edit-form +textarea{padding:8px;border:1px +solid #c4c4c4;height:26px;min-width:300px;background:#FDFDFD;border-radius:2px;display:block;-webkit-transition:all 0.30s ease-in-out;-moz-transition:all 0.30s ease-in-out;-ms-transition:all 0.30s ease-in-out;-o-transition:all 0.30s ease-in-out;border:1px +solid #eee}.ossn-edit-form +textarea{height:100px;max-width:300px}.ossn-edit-form input[type='password']:focus, +.ossn-edit-form input[type='text']:focus{box-shadow:0 0 5px #ccc;border:1px +solid #ccc}.ossn-edit-form +select{padding:6px;display:block;margin-bottom:10px}.ossn-edit-form +input{margin-bottom:10px}.ossn-edit-form +label{padding:3px +4px;margin-bottom:3px;color:#406479;display:block;font-weight:bold}.groups-inline +select{display:inline-block}.ossn-view-users{height:100px;width:400px;border:1px +solid #E9EAED;display:inline-block;margin-left:5px;margin-bottom:10px}.ossn-view-users img, +.ossn-view-users +.uinfo{display:inline-block}.ossn-view-users .uinfo +.userlink{font-size:14px;font-weight:bold;position:absolute;margin-top: -68px;margin-left:12px}.ossn-view-users +.friendlink{float:right;margin-top:27px;margin-right:9px}.ossn-list-users{height:60px;border-bottom:1px solid #E9EAED;display:block;margin-left:5px;margin-bottom:10px}.ossn-list-users img, +.ossn-list-users +.uinfo{display:inline-block}.ossn-list-users .uinfo +.userlink{font-size:14px;font-weight:bold;float:right;margin-top: -38px;margin-left:12px}.ossn-list-users +.friendlink{float:right;margin-top:10px;margin-right:9px}.ossn-system-messages{position:fixed;width:100%;z-index:3;margin-top: -8px}.ossn-message-error{background:#FAE7E7;height:25px;border-bottom:1px solid #CCBABA;padding:13px;color:#F53333;font-size:13px}.ossn-message-success{background:#E7EDFA;height:25px;border-bottom:1px solid #C7CEDF;padding:13px;color:#7387B1;font-size:13px}.ossn-profile-module-item{border:1px +solid #D3D6DB;border-radius:3px;background:#fff;min-height:100px;width:310px;margin-bottom:15px}.ossn-profile-module-item .module-title{color:#6A7480;background:#F6F7F8;padding:11px;border-radius:4px;font-weight:bold;font-size:12px;border-bottom:1px solid #E6E7E7}.ossn-pagination{background:#F7F7F7;text-align:center;border:1px +solid #BBB}.ossn-pagination +li{display:inline-block;padding:10px}.ossn-pagination +a{font-size:12px}.ossn-pagination +.selected{border-bottom:2px solid #2B5470}.ossn-footer{width:990px;margin:0 +auto;padding-bottom:30px}.ossn-footer-inner{color:#969696;margin-top:15px;margin-bottom:20px;border-top:1px solid #C5C5C5;line-height:30px;font-size:12px}.ossn-footer-inner +a{color:#969696;font-size:12px}.ossn-footer-menu{float:right}.ossn-footer-copyrights{float:left}.ossn-footer-menu +a{display:inline-block;margin-right:8px}.ossn-footer-menu a:hover{text-decoration:underline}.ossn-error-page{text-align:center;min-height:400px;margin-top:20%}.ossn-error-page .error-heading{font-size:115px;color:#707070;text-shadow:4px 4px 2px #eee}.ossn-error-page .error-text{font-size:17px}.ossn-layout-newsfeed{width:970px;margin:0 +auto}.ossn-layout-newsfeed .coloum-left{width:160px;float:left;display:inline-table;vertical-align:top}.ossn-layout-newsfeed .coloum-middle{width:525px;display:inline-table;margin-left:6px;margin-right:6px}.ossn-layout-newsfeed .coloum-right{width:254px;display:inline-table;background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;vertical-align:top}.ossn-layout-newsfeed .ossn-inner{width:970px}.ossn-layout-media{width:990px;margin:0 +auto}.ossn-layout-media +.content{display:inline-table;width:736px}.ossn-layout-media +.sidebar{display:inline-table;width:235px;margin-left:11px;float:right}.ossn-layout-module{border:1px +solid #D3D6DB;background:#fff;min-height:300px;margin-top:20px;border-radius:3px}.ossn-layout-module .module-title{background:#F6F7F8;padding:18px;border-bottom:1px solid #D3D6DB}.ossn-layout-module .module-title +.controls{float:right;display:inline-table;vertical-align:top}.ossn-layout-module .module-contents{padding:10px}.ossn-layout-module .module-title +.title{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:20px;font-weight:bold;line-height:1;color:#2B5470;display:inline-table}.ossn-ajax-error{font-size:15px;text-align:center}.ossn-reset-login{padding:50px;width:400px;margin:0 +auto}.ossn-reset-login .reset-notice{font-size:14px}.ossn-reset-login input[type='text']{width:290px}.ossn-profile{width:850px;margin-top: -10px}.ossn-profile .top-container{background:#fff;border:1px +solid #C4CDE0;border-width:1px 1px 2px;height:360px;position:relative;z-index:2}.ossn-profile-sidebar{float:right;margin-top: -345px}.ossn-profile .profile-photo{background-color:#fff;border:1px +solid #CCC;float:left;height:170px;padding:3px;margin-left:20px;top:160px;width:170px;border-radius:2px 2px 2px 2px;-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px 2px 2px 2px;position:absolute}.ossn-profile .profile-cover{height:315px;background:#fff url('http://local.opensource-socialnetwork.org/themes/default/images/cover-bg.png') repeat-x}.ossn-profile .profile-name{color:#FFF;font-weight:bold;margin-top: -60px;font-size:0.6cm;margin-left:211px;z-index:1;position:relative}.ossn-profile .profile-cover-img{}.ossn-profile-bottom{width:850px}.ossn-profile-modules{display:inline-block;margin-top:19px;vertical-align:top}.ossn-profile-wall{display:inline-block;width:430px;margin-top:19px;height:200px}.upload-photo{background:#000;opacity:0.5;width:156px;padding:7px;height:20px;position:absolute;color:#FFF;text-align:center;font-size:15px;font-family:sans-serif}.user-cover-uploading{opacity:0.4}.user-photo-uploading{height:156px;opacity:0.8;background:#fff;width:156px;padding:7px;position:absolute;color:#FFF;text-align:center;font-size:15px;font-family:sans-serif}.profile-menu{float:right;position:relative;margin-right:20px}.profile-menu +a{display:inline-block}.change-cover{float:right;position:relative;margin-right:20px}.reposition-cover{float:right;position:relative;margin-right:5px}.profile-cover-controls{position:absolute;width:850px;margin-top:170px;z-index:1}#cover-menu{display:none}.ossn-profile-modules-about{padding:5px;font-size:12px}.ossn-profile-modules-about-item +.label{color:#6A7480;font-weight:bold;display:inline-table}.ossn-profile-modules-about-item +.metadata{color:#2B5470;font-weight:bold;display:inline-table}.ossn-profile-modules-about-item{padding:10px;border-bottom:1px solid #eee}.ossn-profile-modlue-friends +img{padding:1.5px}.ossn-profile-modlue-friends .user-image{width:100px;height:100px;display:inline-block}.ossn-profile-modlue-friends .user-name{position:absolute;margin-top: -27px;margin-left:8px;font-size:12px;color:#fff}.ossn-profile-modlue-friends +h3{padding:4px;text-align:center;color:#ccc}.newseed-uinfo +img{border:1px +solid rgba(0, 0, 0, 0.1);display:inline-table;height:40px;width:40px}.newseed-uinfo +.name{float:right;display:inline-table;font-weight:bold;width:108px;margin-right:5px}.newseed-uinfo .name +a{color:#141823;display:block;font-size:12px;padding:1px}.newseed-uinfo .edit-profile{font-weight:normal}.newseed-uinfo .name a:hover{text-decoration:underline}.ossn-profile-extra-menu +div{border:1px +solid #ccc;border-top:1px solid #fff;width:100px;position:absolute;margin-left:75px;margin-top:5px;background:#fff;box-shadow:0px 1px 5px #888;display:none}.ossn-profile-extra-menu +li{display:block;color:#000}.ossn-profile-extra-menu li:hover{border-top-color:#668EA8;border-bottom-color:#668EA8;background:#668EA8;color:#fff}.ossn-profile-extra-menu li +a{padding:10px}.ossn-profile-extra-menu li:hover +a{color:#fff}.ossn-profile-tn{margin-top:0px !important}.ossn-wall-container{width:526px;background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px}.ossn-wall-container +.controls{background-color:#F6F7F8;border-top:1px solid #E9EAED;height:40px;width:100%;margin-top:3px}.ossn-wall-container .wall-tabs{width:500px;border-bottom:1px solid #E5E5E5;height:26px}.ossn-wall-container .wall-tabs +.item{margin-top:5px}.ossn-wall-container .wall-tabs .item +div{display:inline-block}.ossn-wall-container .wall-tabs .item +.text{font-weight:bold;margin-top:1px;margin-left:5px;position:absolute;font-size:12px}.tabs-input{margin:0 +12px;padding:4px +0 2px}.ossn-wall-container +textarea{resize:none;padding-top:20px;width:500px;font-family:inherit}.activity-item{background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;margin-bottom:27px;border-bottom:1px;width:526px}.user-activity{margin-top:10px}.activity-item-container{width:490px;padding:12px}.activity-item-container +.owner{display:inline-block;float:left}.activity-item-container +.friends{color:#ccc;display:initial}.activity-item-container +.subject{display:inline-block;margin-left:6px;margin-top:3px;font-size:14px}.owner-link{font-weight:bold}.activity-item-container +.time{font-size:12px;color:#757575}.activity-item-container .description .post-text{font-size:14px;margin-top:10px;width:500px;line-height:20px;word-wrap:break-word}.activity-item-container .description +img{margin-top:5px;max-width:500px}.controls +li{padding:11px;display:inline-block;cursor:pointer}.controls li:hover{background:#eee}.ossn-button-submit-b{cursor:pointer;border:1px +solid #3d5e74;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-size:12px;font-family:arial,helvetica,sans-serif;padding:8px +8px 8px 8px;text-decoration:none;display:inline-block;text-shadow: -1px -1px 0 rgba(0,0,0,0.3);font-weight:bold;color:#FFF;background-color:#507C99;background-image: -webkit-gradient(linear, left top, left bottom, from(#507C99), to(#3C5D73));background-image: -webkit-linear-gradient(top, #507C99, #3C5D73);background-image: -moz-linear-gradient(top, #507C99, #3C5D73);background-image: -ms-linear-gradient(top, #507C99, #3C5D73);background-image: -o-linear-gradient(top, #507C99, #3C5D73);background-image:linear-gradient(to bottom,#507C99,#3C5D73);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#507C99,endColorstr=#3C5D73)}.ossn-button-submit-b:hover{border:1px +solid #2d4656;background-color:#38586B;background-image: -webkit-gradient(linear, left top, left bottom, from(#38586B), to(#2F495A));background-image: -webkit-linear-gradient(top, #38586B, #2F495A);background-image: -moz-linear-gradient(top, #38586B, #2F495A);background-image: -ms-linear-gradient(top, #38586B, #2F495A);background-image: -o-linear-gradient(top, #38586B, #2F495A);background-image:linear-gradient(to bottom,#38586B,#2F495A);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#38586B,endColorstr=#2F495A)}.ossn-wall-post{min-width:62px;padding:5px;margin-top:7px;margin-right:6px}.ossn-wall-container input[type="text"]{width:100%;border-top:1px dashed #EEE;padding:3px}.ossn-posted-on{width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #ccc}.ossn-wall-on{display:inline-block;margin-left:7px;margin-right:7px}#ossn-wall-friend +input{border:none}ul.token-input-list{overflow:hidden;height:auto !important;height:1%;width:100%;cursor:text;font-size:12px;font-family:Verdana;min-height:1px;z-index:999;margin:0;padding:0;background-color:#fff;list-style-type:none;clear:left;color:#2B5470;font-wight:bold;border-top:1px dashed #EEE;}li.token-input-token{overflow:hidden;height:auto !important;height:15px;margin:3px;padding:1px +3px;background-color:#eff2f7;color:#2B5470;cursor:default;font-weight:bold;border:1px +solid #ccd5e4;font-size:11px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;float:left;white-space:nowrap}li.token-input-token +p{display:inline;padding:0;margin:0}li.token-input-token +span{color:#a6b3cf;margin-left:5px;font-weight:bold;cursor:pointer}li.token-input-selected-token{background-color:#F9F9F9;border:1px +solid #eee;color:#2B5470;font-weight:bold}li.token-input-input-token{float:left;margin:0;padding:0;list-style-type:none}div.token-input-dropdown{position:absolute;width:400px;background-color:#fff;overflow:hidden;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc;cursor:default;font-size:11px;font-family:Verdana;z-index:1}div.token-input-dropdown +p{margin:0;padding:5px;color: }div.token-input-dropdown +ul{margin:0;padding:0}div.token-input-dropdown ul +li{background-color:#fff;padding:3px;margin:0;list-style-type:none}div.token-input-dropdown ul li.token-input-dropdown-item{background-color:#fff}div.token-input-dropdown ul li.token-input-dropdown-item2{background-color:#fff}div.token-input-dropdown ul li +em{font-weight:bold;font-style:normal}div.token-input-dropdown ul li.token-input-selected-dropdown-item{background-color:#F9F9F9;color:#2B5470;font-weight:bold}.post-controls{float:right;cursor:pointer;margin-top:5px}.ossn-wall-post-controls{background:#fff;position:absolute}.drop-down-arrow{border-top:5px solid #B9B9B9;border-right:5px solid transparent;border-left:5px solid transparent;width:2px}.ossn-wall-post-controls .post-menu{}.ossn-wall-post-controls .post-menu .menu-links{border:1px +solid #ccc;border-top:1px solid #fff;width:200px;margin-left: -183px;margin-top:5px;background:#fff;box-shadow:0px 1px 5px #888;display:none}.ossn-wall-post-controls .menu-links +li{display:block}.ossn-wall-post-controls .menu-links li:hover{border-top-color:#668EA8;border-bottom-color:#668EA8;background:#668EA8;color:#fff}.ossn-wall-post-controls .menu-links li:hover +a{color:#fff}.ossn-wall-post-controls .menu-links +a{color:#000;width:185px;display:block;padding:8px}.ossn-wall-post-controls .menu-links a:hover{color:#fff}.ossn-wall-privacy-lock{background:url("http://local.opensource-socialnetwork.org/components/OssnWall/images/privacy.png") no-repeat;width:14px;height:18px;display:inline-block;float:left}.ossn-wall-privacy{float:right;margin-right:5px}.ossn-wall-privacy +span{margin-left:10px;margin-top:2px;font-weight:bold;color:#999}.ossn-user-wall-privacy{}.ossn-wall-item-type{display:inline-block;color:#ACACAC}.comments-item:hover .ossn-comment-menu .drop-down-arrow{display:block}.ossn-comment-dropdown{display:none;cursor:pointer}.ossn-comment-menu{position:absolute;margin-top:20px;margin-right:12px;margin-left:503px}.ossn-comment-menu .menu-links{border:1px +solid #ccc;border-top:1px solid #fff;width:200px;margin-left: -183px;margin-top:5px;background:#fff;box-shadow:0px 1px 5px #888;display:none}.ossn-comment-menu .menu-links li:hover{border-top-color:#668EA8;border-bottom-color:#668EA8;background:#668EA8;color:#fff}.ossn-comment-menu .menu-links li:hover +a{color:#fff}.ossn-comment-menu .menu-links +li{display:block}.ossn-comment-menu .menu-links +a{color:#000;width:185px;padding:8px;display:block}.ossn-comment-menu .menu-links a:hover{color:#fff}.ossn-comment-attachment{background:#fff;width:467px;margin-bottom:10px;margin-left:45px;margin-top: -12px;display:none}.ossn-comment-attachment .image-data{padding:5px}.ossn-comment-attachment .image-data +img{width:100px;border:1px +solid #ccc}.ossn-comment-attach-photo{background:url('http://local.opensource-socialnetwork.org/components/OssnComments/images/camera.png') no-repeat;background-color:rgba(255,255,255,1);background-position:10px 8px;width:32px;height:0px;margin-top: -32px;margin-left:430px;position:absolute;cursor:pointer;padding:30px +0 0;border-bottom:1px solid #d3d6db;border-right:1px solid #d3d6db;border-top:1px solid #d3d6db}.comments-likes .comment-text p +img{display:block;margin-top:5px;margin-bottom:15px;border:1px +solid #ccc;word-wrap:break-word}.ossn-photo-view-controls{display:inline-table;margin-top:20px;margin-left:30px}.comments-likes{background:#F6F7F8;min-height:50px;width:100%}.ossn-photos-comments{display:inline-table;float:left}.comments-like-comment-links{background:#fff;margin-top: -10px}.comments-likes .poster-image{padding:10px;display:inline-table}.comments-likes .comment-container{display:inline-table}.comments-likes .comment-text{display:inline-table;vertical-align:top;margin-top:10px;margin-left: -5px;font-size:12px;width:455px;margin-bottom:6px}.comments-likes +.like_share{padding:10px;border-bottom:1px solid #EEE;font-size:12px}.dot-comments{vertical-align:top;margin: -3px 2px 0 0px;display:inline-block}.dot-likes{vertical-align:top;margin: -1px 5px 0 0px;display:inline-block}.comments-likes textarea, +.comments-likes input[type='text']{float:right;border:1px +solid #D3D6DB;padding:7px;height:16px;margin-top: -32px;margin-left: -7px;width:422px;resize:none}.comment-text +p{margin-top:1px;line-height:15px}.comment-metadata{margin-top: -9px;color:#9B9B9B}.comments-item{margin-bottom: -5px}.comments-likes .like_share .button-container, +.comments-likes .like_share +a{display:inline-block}.ossn-like-icon{background:url('http://local.opensource-socialnetwork.org/components/OssnLikes/images/like.png') no-repeat;width:14px;height:15px;margin-right:3px;display:inline-block}.ossn-profile-modlue-albums +img{padding:1.5px;width:100px;height:100px}.ossn-profile-modlue-albums +h3{padding:4px;text-align:center;color:#ccc}.ossn-photos{}.ossn-photos +li{display:inline-block;margin-right:5px;border:1px +solid #ccc;min-height:200px;width:200px}.ossn-album-name{text-align:left;font-weight:bold;padding:3px;margin-bottom:3px}.ossn-photos{}.ossn-photos li +img{}.ossn-photos +h2{text-align:center}.ossn-photo-view +a{margin-top:-7px;float:left}.ossn-photo-viewer{text-align:center;background:#F6F6F6;width:736px}.ossn-viewer-comments{margin-top:25px}.ossn-viewer-comments .comments-likes textarea, +.ossn-viewer-comments .comments-likes .comment-text, +.ossn-viewer-comments .comments-likes input[type='text']{width:214px}.ossn-viewer-comments .comments-likes .comment-text p +img{max-width:250px}.ossn-viewer-comments .ossn-comment-attachment{width:265px}.ossn-viewer-comments .comments-likes +.ossn-comment-attach-photo{margin-left:222px}.ossn-photos +.pthumb{width:200px;height:200px}.ossn-photo-menu +li{display:block}.ossn-photo-menu li +a{font-size:12px}.ossn-notifications-all +li{padding:10px;border-bottom:1px solid #ddd;display:block !important;min-height:15px}.ossn-notifications-all li:hover{background:#F6F7F8}.ossn-notification-icon-comment{background:url('http://local.opensource-socialnetwork.org/components/OssnNotifications/images/comment.png');width:18px;height:18px;position:absolute}.ossn-notification-icon-tag{background:url('http://local.opensource-socialnetwork.org/components/OssnNotifications/images/post.png');width:18px;height:18px;position:absolute}.ossn-notification-icon-like{background:url('http://local.opensource-socialnetwork.org/components/OssnNotifications/images/like.png');width:18px;height:18px;position:absolute}.ossn-notification-icon-like-post{background:url('http://local.opensource-socialnetwork.org/components/OssnNotifications/images/like.png');width:18px;height:18px;position:absolute}.ossn-notifications-all +.data{position:absolute;margin-left:23px;margin-top:1px}.friends-added-text{margin-right:10px}.ossn-notification-unviewed{background:#EEE}.ossn-no-notification{padding:21px;text-align:center;font-size:12px;font-weight:bold;color:#ccc}.notification-friends +li{display:block !important;border-bottom:1px solid #eee}notification-friends +.user{font-size:13px;font-weight:bold}.notification-friends +.image{width:50px;height:50px;display:inline-table}.ossn-notifications-friends-inner{padding:6px}.ossn-notifications-friends-inner +form{display:inline-table}.ossn-notification-page li +img{display:none}.ossn-notif-hide{display:none}.ossn-search-page{width:526px;display:inline-table;background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;float:right}.ossn-search-page .search-data{padding:12px}.ossn-search-page .ossn-view-users{width:100%;display:block;margin-bottom:10px;margin-left:0px}.ossn-messages{width:735px;height:420px}.ossn-messages .messages-from{display:inline-table;width:200px;border:1px +solid #ddd;height:574px}.ossn-messages .messages-from +.title{border-bottom:1px solid #ddd;padding:14px}.ossn-messages .messages-from .title +a{font-weight:bold}.ossn-messages .message-with{display:inline-table;width:527px;border:1px +solid #ddd;min-height:200px;float:right}.ossn-messages .message-with +.title{padding:17px;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd}.ossn-messages .message-with .message-form{background:#F2F2F2;height:150px;width:100%}.ossn-messages .message-with .messages-inner{height:369px;overflow:hidden;overflow-y:scroll}.ossn-messages .message-form +textarea{outline:none;width:471px;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;resize:none;padding:4px;height:75px}.ossn-messages .message-form .message-form-form{padding:22px}.ossn-messages .message-form .message-form-form +.controls{background:#fff;border-top:1px solid #eee;border-bottom:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;height:0px;margin-top: -2px;width:479px}.ossn-messages +.message-form +.message-form-form +.controls input[type='submit']{float:right;cursor:pointer;border:1px +solid #3d5e74;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-size:12px;font-family:arial,helvetica,sans-serif;padding:8px +8px 8px 8px;text-decoration:none;display:inline-block;text-shadow: -1px -1px 0 rgba(0,0,0,0.3);font-weight:bold;color:#FFF;background-color:#507C99;background-image: -webkit-gradient(linear, left top, left bottom, from(#507C99), to(#3C5D73));background-image: -webkit-linear-gradient(top, #507C99, #3C5D73);background-image: -moz-linear-gradient(top, #507C99, #3C5D73);background-image: -ms-linear-gradient(top, #507C99, #3C5D73);background-image: -o-linear-gradient(top, #507C99, #3C5D73);background-image:linear-gradient(to bottom, #507C99, #3C5D73);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#507C99, endColorstr=#3C5D73)}.ossn-messages +.message-form +.message-form-form +.controls input[type='submit']:hover{border:1px +solid #2d4656;background-color:#38586B;background-image: -webkit-gradient(linear, left top, left bottom, from(#38586B), to(#2F495A));background-image: -webkit-linear-gradient(top, #38586B, #2F495A);background-image: -moz-linear-gradient(top, #38586B, #2F495A);background-image: -ms-linear-gradient(top, #38586B, #2F495A);background-image: -o-linear-gradient(top, #38586B, #2F495A);background-image:linear-gradient(to bottom,#38586B,#2F495A);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#38586B,endColorstr=#2F495A)}.message-item{padding:10px}.message-item +img{display:inline-table;width:32px;height:32px;float:left;margin-right:6px}.message-item +.data{display:inline-table;width:450px}.message-item .data +.name{margin-left:5px}.message-item +.text{margin-left:5px;font-size:13px}.message-item .data .name +a{font-size:13px;font-weight:bold}.messate-item .data +.text{width:460px}.messages-from .inner .user-item{padding:4px;border-bottom:1px solid #eee}.messages-from .inner .user-item:hover{background:#F6F7F8;cursor:pointer}.messages-from .inner .message-new{background:#eee}.messages-from .inner .user-item +.image{display:inline-table;width:50px;height:50px}.messages-from .inner .user-item +.data{display:inline-table;float:right;width:139px}.messages-from .inner .user-item .data +.name{font-size:13px;font-weight:bold;padding:3px}.ossn-arrow-back{background:url("http://local.opensource-socialnetwork.org/components/OssnMessages/images/backward-arrow.png");width:9px;height:9px;margin-top: -6px;margin-left:4px}.reply-text{margin-top: -12px;margin-left:17px}.reply-text-from{margin-top: -12px;margin-left:4px}.messages-from +.time{color:#999;float:right}.ossn-notification-messages .user-item{padding:4px;border-bottom:1px solid #eee}.ossn-notification-messages .user-item:hover{background:#F6F7F8;cursor:pointer}.ossn-notification-messages .message-new{background:#eee}.ossn-notification-messages .user-item +.image{display:inline-table;width:50px;height:50px}.ossn-notification-messages .user-item +.data{display:inline-table;float:right;width:340px}.ossn-notification-messages .user-item .data +.name{font-size:13px;font-weight:bold;padding:3px}.ossn-notification-messages .user-item-inner +.time{color:#999;float:right}.user-item-inner{padding:5px}.message-none{font-size:13px;width:735px;border:1px +solid #eee;height:200px}.message-none +div{font-size:14px;padding:25px}.ossn-ad-tiem-small{margin-bottom:20px}.ossn-ad-tiem-small +img{display:block}.ossn-ad-tiem-small +.descript{display:block;margin-top:5px}.ad-heading{width:127px}.ad-heading +a{font-size:12px;font-weight:bold}.ossn-ad-tiem-small .ossn-ads-link{font-size:11px;margin-bottom:5px;margin-top:3px;width:100px}.ossn-ads +.sponsered{margin-top:8px;margin-bottom:5px;font-weight:bold;color:#999}.ossn-ads-small{width:125px !important}.group-header-menu{float:left}.group-header-menu .first-item{border-left:1px solid #EEE}.ossn-group-profile .ossn-layout-module{margin-top:-20px}#group-header-menu{border:none;border:0px;padding:0px;font-size:14px;font-weight:bold;width:auto}#group-header-menu +ul{background:#fff;height:35px;list-style:none;margin:0;padding:0}#group-header-menu +li{float:left;padding:0px;border-right:1px solid #EEE}#group-header-menu li +a{background:#fff;display:block;font-weight:normal;line-height:45px;margin:0px;padding:0px +20px;text-align:center;text-decoration:none;font-weight:bold}#group-header-menu>ul>li>a{color:#2F4979;font-weight:bold;height:44px}#group-header-menu ul ul +a{color:#2F4979}#group-header-menu li > a:hover, +#group-header-menu ul li:hover>a{background:#F6F7F8;text-decoration:none}#group-header-menu li +ul{background:#fff;display:none;height:auto;padding:0px;margin:0px;position:absolute;width:120px;z-index:200;border-left:1px solid #EEE;border-bottom:1px solid #EEE;border-right:1px solid #EEE}#group-header-menu li:hover +ul{display:block}#group-header-menu li +li{display:block;float:none;margin:0px;padding:0px;width:120px}#group-header-menu li:hover li +a{background:none}#group-header-menu li ul +a{display:block;height:35px;font-size:12px;font-style:normal;margin:0px;padding:0px +10px 0px 15px;text-align:left}#group-header-menu li ul a:hover, +#group-header-menu li ul li:hover>a{background:#F6F7F8;border:0px;text-decoration:none}#group-header-menu +p{clear:left}.groups-sidebar{color:#999;font-weight:bold;margin-top:5px}.ossn-group-approve-all{float:right;margin-bottom:5px;margin-right:2px}.ossn-layout-group{width:995px;margin:0 +auto}.ossn-layout-group .coloum-left{width:160px;float:left;display:inline-table}.ossn-layout-group .coloum-middle{width:800px;display:inline-table;margin-left:6px;margin-right:6px}.ossn-layout-group .ossn-inner{width:995px}.ossn-group-members{height:100px;width:770px;border:1px +solid #E9EAED;display:inline-block;margin-left:5px;margin-bottom:10px}.ossn-group-members img, +.ossn-group-members +.uinfo{display:inline-block}.ossn-group-members .uinfo +.userlink{font-size:14px;font-weight:bold;position:absolute;margin-top: -68px;margin-left:12px}.ossn-group-members +.friendlink{float:right;margin-top:27px;margin-right:9px}.ossn-group-no-requests{font-size:14px;text-align:center}.ossn-group-profile{margin-top: -12px}.ossn-group-profile .profile-header{border:1px +solid #C4CDE0;border-width:1px 1px 2px;position:relative;height:145px;width:100%}.ossn-group-profile +.profile-header +.header-bottom{background:#fff;height:45px}.ossn-group-profile +.profile-header +.header-users{height:100px}.ossn-group-profile +.profile-header +.header-users +img{margin-right: -3px}.ossn-group-profile +.profile-header +.group-name{font-size:13px;font-weight:bold;padding:15px;float:left}.groups-buttons{float:right;padding:9px}.ossn-group-profile +.group-body .group-wall{display:inline-table}.group-body{margin-top:15px}.ossn-group-profile +.group-body .group-sidebar{width:230px;display:inline-table;background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;float:right;padding:7px}.group-about +.heading{color:#999;font-size:11px;font-weight:bold}.group-about +.text{font-size:12px;margin-top:4px}.members-count{margin-top:4px;font-size:12px;font-weight:bold}.group-closed-container{background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;padding:10px;margin-bottom:10px;font-size:12px;width:530px}.group-closed-container .title-h3{background:#eee;padding:3px +6px;border-top:1px solid #e5e5e5;font-weight:bold;margin-bottom:7px}.group-closed-container +p{padding:3px +6px}.ossn-group-cover-header{height:290px !important;width:798px !important}.ossn-group-cover{width:798px;overflow:hidden;height:245px}.ossn-group-cover:hover>.ossn-group-cover-button{display:block}.ossn-group-cover-button{position:absolute;margin-top:200px;margin-left:605px;display:none;z-index:1}.ossn-group-cover-button +a{display:inline-block}.group-c-position{display:none !important}.groups-buttons +a{display:inline-block}.ossn-groups-notification-icon{background:url('http://local.opensource-socialnetwork.org/components/OssnGroups/images/group.png') no-repeat;width:18px;height:18px;position:absolute}.ossn-site-pages{}.ossn-site-pages-inner{background:#FFF;border:1px +solid;border-color:#E5E6E9 #DFE0E4 #D0D1D5;-webkit-border-radius:3px;margin-bottom:27px;border-bottom:1px;width:964px;min-height:400px;padding:12px}.ossn-site-pages-title{font-size:20px;font-weight:bold;line-height:35px;color:#2F4959;margin-bottom:10px;border-bottom:1px solid #2F4959}.ossn-site-pages-body{padding:2px;font-size:12px}.ossn-chat-base{border-bottom:0;bottom:0px;left:15px;display:block;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:11px;height:33px;position:fixed;text-align:left;z-index:1028;margin-top:8px;left:15%;color:#000;width:850px}.ossn-chat-base .ossn-chat-bar{display:block;bottom:0px;cursor:pointer;width:200px;float:right}.ossn-chat-base .ossn-chat-bar +.inner{padding:10px;margin-left:5px;background:#EBEEF4;-webkit-box-shadow:inset 0 1px rgba(255, 255, 255, 0.5);border:1px +solid #BAC0CD;height:29px;border-radius-top-right:4px;border-radius-top-left:4px}.ossn-chat-base .ossn-chat-bar .inner:hover{background:#fff}.ossn-chat-base .ossn-chat-bar .friends-list{background:#F2F3F5;width:193px;min-height:268px;margin-top: -268px;margin-left:5px;position:fixed;height:268px;border-top-left-radius:4px;border-top-right-radius:4px;border-left:1px solid #ccc;border-right:1px solid #ccc;display:none}.ossn-chat-inner-text{width:160px;margin-left:20px;font-weight:bold}.ossn-chat-tab-titles{background:#41667B;background:linear-gradient(#41667B, #3A5A6D);padding:5px;border:1px +solid #3A5A6D;border-top-left-radius:4px;border-top-right-radius:4px}.ossn-chat-inline-table{display:inline-table}.ossn-chat-tab-titles +.options{float:right;margin-right:10px;color:#FFF;margin-top:2px;font-size:12px;cursor:pointer}.ossn-chat-tab-titles .options .item:hover{background:#5E72A2;width:17px;margin-right: -4px;text-align:center}.ossn-chat-tab-titles:hover{background:#41667B}.ossn-chat-tab-titles +.text{color:#FFF;font-weight:bold;margin-left:9px;padding:2px}.ossn-chat-bar .friends-list +.data{width:193px;overflow:hidden;overflow-y:scroll;height:239px}.ossn-chat-base .ossn-chat-bar .friends-list-item:hover{background:#eee}.ossn-chat-base .ossn-chat-bar .friends-list-item .friends-item-inner{margin:5px +5px 5px 5px;height:36px;padding:2px}.ossn-chat-base .ossn-chat-bar .friends-list-item +.icon{display:inline-table;width:32px;height:32px;border:1px +solid #ccc}.ossn-chat-base .ossn-chat-bar .friends-list-item +.name{margin-top: -25px;margin-left:40px}.ossn-chat-base .ossn-chat-bar .friends-list-item .ossn-chat-icon-online{float:right;margin-right:4px;margin-top: -17px}.ossn-chat-none{padding:5px}.friend-tab-item{display:block;bottom:0px;cursor:pointer;width:200px;float:right}.friend-tab-item .friend-tab{padding:10px;margin-left:5px;background:#EBEEF4;-webkit-box-shadow:inset 0 1px rgba(255, 255, 255, 0.5);border:1px +solid #BAC0CD;height:29px;border-radius:3px}.ossn-chat-tab-active{background:#5D7D91 !important;border:1px +solid #2F4959 !important;color:#fff}.friend-tab-item .tab-container{margin-top: -265px;position:absolute;height:265px;width:251px;margin-left:5px;display:none}.friend-tab-item .tab-container +.data{background:#eee;border-left:1px solid #ccc;border-right:1px solid #ccc;width:249px;height:236px;overflow:hidden;overflow-y:scroll}.friend-tab-item .data .message-reciever .text, +.friend-tab-item .data .message-sender +.text{position:relative;margin-top:5px;margin-bottom:5px;max-width:80%;clear:both}.friend-tab-item .data .message-reciever +.text{margin-right:auto;background-image: -webkit-linear-gradient(bottom, #F2F2F2, #FFF);border-radius:3px;border:1px +solid #ccc;text-shadow:rgba(255, 255, 255, .5) 0 1px 0;color:#000;display:inline-table}.friend-tab-item .data .message-reciever .text +.inner{padding:5px;line-height:15px}.friend-tab-item .data .message-sender{width:210px;float:right}.friend-tab-item .data .message-reciever{width:222px;float:left}.friend-tab-item .data .message-reciever .user-icon{display:inline-table;padding:3px}.friend-tab-item .data .message-sender +.text{margin-left:35px;background:linear-gradient(#C7DEFE, #E7F1FE);background-image: -webkit-gradient(linear, center bottom, center top, from(#C7DEFE), to(#E7F1FE));background-image: -webkit-linear-gradient(bottom, #C7DEFE, #E7F1FE);border:1px +solid #DFDFDF;border:1px +solid rgba(0, 0, 0, 0.18);border-bottom-color:rgba(0, 0, 0, 0.29);-webkit-border-radius:4px;-webkit-box-shadow:0 1px 0 #DCE0E6;display:inline-table}.friend-tab-item .data .message-sender .text +.inner{padding:5px;line-height:15px;max-width:158px;word-wrap:break-word}.ossn-chat-triangle{border-top:5px solid rgba(0, 0, 0, 0);border-bottom:5px solid rgba(0,0,0,0)}.ossn-chat-triangle-blue{border-left:5px solid #AFD0FE;margin-top:10px;float:right}.ossn-chat-triangle-white{border-right:5px solid #B8B8B8;margin-top:10px;margin-left:38px;float:left}.ossn-chat-text-data{margin-top: -40px}.ossn-chat-text-data-right{float:right}.friend-tab-item .friend-tab +form{display:none}.friend-tab-item .friend-tab input[type='text']{width:218px;height:30px;padding:2px;margin-top: -9px;margin-left: -9px;position:absolute;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:12px}.ossn-chat-tab-close{width:17px;margin-right: -4px;text-align:center}.ossn-chat-new-message{background-color:#dc0d17;background-image: -webkit-gradient(linear, center top, center bottom, from(#fa3c45), to(#dc0d17));background-image: -webkit-linear-gradient(#fa3c45, #dc0d17);color:#fff;min-height:13px;padding:1px +3px;text-shadow:0 -1px 0 rgba(0,0,0,.4);font-size:10px;float:left;display:none}.ossn-chat-icon-smilies{background:#FFF;width:221px;min-height:40px;padding:5px;position:fixed;border:1px +solid #CCC;z-index:1}.ossn-chat-item-smiles{padding:3px}.ossn-chat-icon-smile-set{margin-top: -10px;background:#fff;width:29px;padding:4px;height:27px;position:absolute;margin-left:201px}.ossn-chat-icon-smilies{display:none}.ossn-chat-icon{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/useronline.png") no-repeat;width16px;height:14px}.ossn-chat-icon-online{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/online.png") no-repeat;width:10px;height:14px}.ossn-chat-icon-offline{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/offline.png") no-repeat;width:10px;height:14px}.ossn-chat-icon-expend{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/popup.png") no-repeat;width:10px;height:11px;margin-right:8px}.ossn-chat-icon-expend:hover{opacity:0.9}.ossn-chat-icon-smile{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/smile.png") no-repeat;width:14px;height:14px;margin-left:10px}.ossn-chat-icon{width:16px !important;height:16px !important}.ossn-chat-windows-long{display:none}@media only screen +and (min-width : 1280px){.ossn-chat-base{width:910px !important}}@media only screen +and (min-width : 1360px){.ossn-chat-bar{display:none !important}.ossn-chat-windows-long{float:right;position:fixed;min-height:500px;width:175px;border-left:1px solid #ccc;bottom:0px;right:0;top:0;background:#E9EAED;display:block}.ossn-chat-windows-long +.inner{margin-top:45px;border-top:1px solid #ccc;overflow:hidden;overflow:auto;height:600px}.ossn-chat-windows-long .friends-list-item .friends-item-inner{margin:5px +5px 5px 5px;height:32px}.ossn-chat-windows-long .friends-list-item{border-top:1px solid #E9EAED;border-bottom:1px solid #E9EAED}.ossn-chat-windows-long .friends-list-item:hover{background:#E1E2E5;border-top:1px solid #ddd;border-bottom:1px solid #ddd;cursor:pointer}.ossn-chat-windows-long .friends-list-item +.icon{display:inline-block;width:32px;height:32px;border:1px +solid #ccc}.ossn-chat-windows-long .friends-list-item +.name{margin-top: -25px;margin-left:40px}.ossn-chat-windows-long .friends-list-item .ossn-chat-icon-online{float:right;margin-right:4px;margin-top: -17px}}#ossn-chat-sound{display:none}.ossn-chat-message-sending{position:absolute;width:218px;height:11px;margin-top: -9px;margin-left: -9px;padding:10px;background:#fff;display:none}.ossn-chat-sending-icon{background:url("http://local.opensource-socialnetwork.org/components/OssnChat/images/loading-small.gif") no-repeat;width:16px;height:11px}.ossn-notification-icon-poke{background:url('http://local.opensource-socialnetwork.org/components/OssnPoke/images/poke.png') no-repeat;width:18px;height:18px;position:absolute}.ossn-invite-friends{background:#fff;padding:10px}.ossn-invite-friends input[type='submit']{margin-top:10px} \ No newline at end of file diff --git a/cache/js/1429430046/view/opensource.socialnetwork.js b/cache/js/1429430046/view/opensource.socialnetwork.js new file mode 100644 index 000000000..7b4350959 --- /dev/null +++ b/cache/js/1429430046/view/opensource.socialnetwork.js @@ -0,0 +1,85 @@ +var Ossn=Ossn||{};Ossn.Startups=new Array();Ossn.RegisterStartupFunction=function($func){Ossn.Startups.push($func);};Ossn.ajaxRequest=function($data){$(function(){var $form_name=$data['form'];var url=$data['url'];var callback=$data['callback'];var error=$data['error'];var befsend=$data['beforeSend'];var action=$data['action'];if(url==true){url=$($form_name).attr('action');} +$($form_name).submit(function(event){event.preventDefault();if(!callback){return false;} +if(!befsend){befsend=function(){}} +if(!action){action=false;} +if(action==true){url=Ossn.AddTokenToUrl(url);} +if(!error){error=function(xhr,status,error){if(error=='Internal Server Error'||error!==''){Ossn.MessageBox('syserror/unknown');}};} +var $form=$(this);$.ajax({async:true,type:'post',beforeSend:befsend,url:url,error:error,data:$(this).serialize(),success:callback,});});});};Ossn.PostRequest=function($data){var url=$data['url'];var callback=$data['callback'];var error=$data['error'];var befsend=$data['beforeSend'];var $fdata=$data['params'];var action=$data['action'];if(!callback){return false;} +if(!befsend){befsend=function(){}} +if(!action){action=true;} +if(action==true){url=Ossn.AddTokenToUrl(url);} +if(!error){error=function(){};} +$.ajax({async:true,type:'post',beforeSend:befsend,url:url,error:error,data:$fdata,success:callback,});};Ossn.MessageDone=function($message){return"
"+$message+"
";};Ossn.redirect=function($url){window.location=Ossn.site_url+$url;};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.profile-cover').hover(function(){$('.profile-cover-controls').find('a').show();},function(){$('.profile-cover-controls').find('a').hide();});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.profile-photo').hover(function(){$('.upload-photo').slideDown();},function(){$('.upload-photo').slideUp();});});});Ossn.RegisterStartupFunction(function(){Ossn.ajaxRequest({url:Ossn.site_url+"action/user/register",form:'#ossn-home-signup',beforeSend:function(request){$('#ossn-home-signup').find('#ossn-signup-errors').hide();$('#ossn-home-signup input').filter(function(){if(this.type=='radio'&&!$(this).is(':checked')){$(this).closest('span').addClass('ossn-required');} +if(this.value==""){$(this).addClass('ossn-red-borders');request.abort();return false;}});},callback:function(callback){if(callback['dataerr']){$('#ossn-home-signup').find('#ossn-signup-errors').html(callback['dataerr']).fadeIn();} +if(callback['success']==1){$('#ossn-home-signup').html(Ossn.MessageDone(callback['datasuccess']));} +$('#ossn-submit-button').attr('type','submit') +$('#ossn-submit-button').attr('style','opacity:1;');}});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.ossn-system-messages').find('div').animate({opacity:0.9},6000).slideUp('slow');});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){var autocomplete;if(typeof google==='object'){autocomplete=new google.maps.places.Autocomplete((document.getElementById('ossn-wall-location-input')),{types:['geocode']});google.maps.event.addListener(autocomplete,'place_changed',function(){});}});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.ossn-topbar-dropdown-menu-button').click(function(){if($('.ossn-topbar-dropdown-menu-content').is(":not(:visible)")){$('.ossn-topbar-dropdown-menu-content').show();}else{$('.ossn-topbar-dropdown-menu-content').hide();}});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.component-controls .components-button-red').click(function(e){e.preventDefault();var del=confirm(Ossn.Print('ossn:component:delete:exception'));if(del==true){var actionurl=$(this).attr('href');window.location=actionurl;}});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.userdelete').click(function(e){e.preventDefault();var del=confirm(Ossn.Print('ossn:user:delete:exception'));if(del==true){var actionurl=$(this).attr('href');window.location=actionurl;}});});});Ossn.MessageBoxClose=function(){$('.ossn-message-box').hide();$('.ossn-halt').removeClass('ossn-light').hide();$('.ossn-halt').attr('style','');};Ossn.MessageBox=function($url){Ossn.PostRequest({url:Ossn.site_url+$url,beforeSend:function(){$('.ossn-halt').addClass('ossn-light');$('.ossn-halt').attr('style','height:'+$(document).height()+'px;');$('.ossn-halt').show();$('.ossn-message-box').html('
');$('.ossn-message-box').fadeIn('slow');},callback:function(callback){$('.ossn-message-box').html(callback).fadeIn();},});};Ossn.Viewer=function($url){Ossn.PostRequest({url:Ossn.site_url+$url,beforeSend:function(){$('.ossn-halt').removeClass('ossn-light');$('.ossn-halt').show();$('.ossn-viewer').html('
Loading...
');$('.ossn-viewer').show();},callback:function(callback){$('.ossn-viewer').html(callback).show();},});};Ossn.ViewerClose=function($url){$('.ossn-halt').addClass('ossn-light');$('.ossn-halt').hide();$('.ossn-viewer').html('');$('.ossn-viewer').hide();};Ossn.Clk=function($elem){$($elem).click();};Ossn.UrlParams=function(name,url){var results=new RegExp('[\\?&]'+name+'=([^&#]*)').exec(url);if(!results){return 0;} +return results[1]||0;};Ossn.ParseStr=function(string){var params={},result,key,value,re=/([^&=]+)=?([^&]*)/g,re2=/\[\]$/;while(result=re.exec(string)){key=decodeURIComponent(result[1].replace(/\+/g,' '));value=decodeURIComponent(result[2].replace(/\+/g,' '));if(re2.test(key)){key=key.replace(re2,'');if(!params[key]){params[key]=[];} +params[key].push(value);}else{params[key]=value;}} +return params;};Ossn.ParseUrl=function(url,component,expand){expand=expand||false;component=component||false;var re_str='^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?://)?' ++'((?:(([^:@]*)(?::([^:@]*))?)?@)?' ++'([^:/?#]*)(?::(\\d*))?)' ++'(((/(?:[^?#](?![^?#/]*\\.[^?#/.]+(?:[?#]|$)))*/?)?([^?#/]*))' ++'(?:\\?([^#]*))?' ++'(?:#(.*))?)',keys={1:"scheme",4:"user",5:"pass",6:"host",7:"port",9:"path",12:"query",13:"fragment"},results={};if(url.indexOf('mailto:')===0){results['scheme']='mailto';results['path']=url.replace('mailto:','');return results;} +if(url.indexOf('javascript:')===0){results['scheme']='javascript';results['path']=url.replace('javascript:','');return results;} +var re=new RegExp(re_str);var matches=re.exec(url);for(var i in keys){if(matches[i]){results[keys[i]]=matches[i];}} +if(expand&&typeof(results['query'])!='undefined'){results['query']=ParseStr(results['query']);} +if(component){if(typeof(results[component])!='undefined'){return results[component];}else{return false;}} +return results;};Ossn.AddTokenToUrl=function(data){if(typeof data==='string'){var parts=Ossn.ParseUrl(data),args={},base='';if(parts['host']===undefined){if(data.indexOf('?')===0){base='?';args=Ossn.ParseStr(parts['query']);}}else{if(parts['query']!==undefined){args=Ossn.ParseStr(parts['query']);} +var split=data.split('?');base=split[0]+'?';} +args["ossn_ts"]=Ossn.Config.token.ossn_ts;args["ossn_token"]=Ossn.Config.token.ossn_token;return base+jQuery.param(args);}};var sprintf=(function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase();} +function str_repeat(input,multiplier){for(var output=[];multiplier>0;output[--multiplier]=input){} +return output.join('');} +var str_format=function(){if(!str_format.cache.hasOwnProperty(arguments[0])){str_format.cache[arguments[0]]=str_format.parse(arguments[0]);} +return str_format.format.call(null,str_format.cache[arguments[0]],arguments);};str_format.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length;for(i=0;i=0?'+'+arg:arg);pad_character=match[4]?match[4]=='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-String(arg).length;pad=match[6]?str_repeat(pad_character,pad_length):'';output.push(match[5]?arg+pad:pad+arg);}} +return output.join('');};str_format.cache={};str_format.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=/^[^\x25]+/.exec(_fmt))!==null){parse_tree.push(match[0]);}else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');}else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);}else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);}else{throw('[sprintf] huh?');}}}else{throw('[sprintf] huh?');} +match[2]=field_list;}else{arg_names|=2;} +if(arg_names===3){throw('[sprintf] mixing positional and named placeholders is not (yet) supported');} +parse_tree.push(match);}else{throw('[sprintf] huh?');} +_fmt=_fmt.substring(match[0].length);} +return parse_tree;};return str_format;})();var vsprintf=function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);};Ossn.Print=function(str,args){if(OssnLocale[str]){if(!args){return OssnLocale[str];}else{return vsprintf(OssnLocale[str],args);}} +return str;};Ossn.Init=function(){for(var i=0;i<=Ossn.Startups.length;i++){if(typeof Ossn.Startups[i]!=="undefined"){Ossn.Startups[i]();}}};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('#reposition-cover').click(function(){$('#profile-menu').hide();$('#cover-menu').show();$(function(){$.globalVars={originalTop:0,originalLeft:0,maxHeight:$("#draggable").height()-$("#container").height(),maxWidth:$("#draggable").width()-$("#container").width()};$("#draggable").draggable({start:function(event,ui){if(ui.position!=undefined){$.globalVars.originalTop=ui.position.top;$.globalVars.originalLeft=ui.position.left;}},drag:function(event,ui){var newTop=ui.position.top;var newLeft=ui.position.left;if(ui.position.top<0&&ui.position.top*-1>$.globalVars.maxHeight){newTop=$.globalVars.maxHeight*-1;} +if(ui.position.top>0){newTop=0;} +if(ui.position.left<0&&ui.position.left*-1>$.globalVars.maxWidth){newLeft=$.globalVars.maxWidth*-1;} +if(ui.position.left>0){newLeft=0;} +ui.position.top=newTop;ui.position.left=newLeft;Ossn.ProfileCover_top=newTop;Ossn.ProfileCover_left=newLeft;}});});});$("#upload-photo").submit(function(event){event.preventDefault();var formData=new FormData($(this)[0]);var $url=Ossn.site_url+'action/profile/photo/upload';$.ajax({url:Ossn.AddTokenToUrl($url),type:'POST',data:formData,async:true,beforeSend:function(){$('.upload-photo').attr('class','user-photo-uploading');},error:function(xhr,status,error){if(error=='Internal Server Error'||error!==''){Ossn.MessageBox('syserror/unknown');}},cache:false,contentType:false,processData:false,success:function(callback){$time=$.now();$('.user-photo-uploading').attr('class','upload-photo').hide();$imageurl=$('.profile-photo').find('img').attr('src')+'?'+$time;$('.profile-photo').find('img').attr('src',$imageurl);$topbar_icon_url=$('.ossn-topbar-menu').find('img').attr('src')+'?'+$time;$('.ossn-topbar-menu').find('img').attr('src',$topbar_icon_url);}});return false;});$("#upload-cover").submit(function(event){event.preventDefault();var formData=new FormData($(this)[0]);var $url=Ossn.site_url+'action/profile/cover/upload';$.ajax({url:Ossn.AddTokenToUrl($url),type:'POST',data:formData,async:true,beforeSend:function(){$('.profile-cover-img').attr('class','user-cover-uploading');},cache:false,contentType:false,processData:false,success:function(callback){$time=$.now();$('.profile-cover').find('img').removeClass('user-cover-uploading');$imageurl=$('.profile-cover').find('img').attr('src')+'?'+$time;$('.profile-cover').find('img').attr('src',$imageurl);$('.profile-cover').find('img').attr('style','');},error:function(){Ossn.MessageBox('syserror/unknown');}});return false;});$('#profile-extra-menu').on('click',function(){$div=$('.ossn-profile-extra-menu').find('div');if($div.is(":not(:visible)")){$div.show();}else{$div.hide();}});});});Ossn.repositionCOVER=function(){var $pcover_top=$('.profile-cover-img').css('top');var $pcover_left=$('.profile-cover-img').css('left');$url=Ossn.site_url+"action/profile/cover/reposition";$.ajax({async:true,type:'post',data:'&top='+$pcover_top+'&left='+$pcover_left,url:Ossn.AddTokenToUrl($url),success:function(callback){$('#profile-menu').show();$('#cover-menu').hide();$("#draggable").draggable({drag:function(){return false;}});},});};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.ossn-wall-container').find('.ossn-wall-friend').click(function(){$('#ossn-wall-location').hide();$('#ossn-wall-photo').hide();$('#ossn-wall-friend').show();});$('.ossn-wall-container').find('.ossn-wall-location').click(function(){$('#ossn-wall-friend').hide();$('#ossn-wall-photo').hide();$('#ossn-wall-location').show();});$('.ossn-wall-container').find('.ossn-wall-photo').click(function(){$('#ossn-wall-friend').hide();$('#ossn-wall-location').hide();$('#ossn-wall-photo').show();});$('.ossn-wall-post-delete').click(function(e){$url=$(this);e.preventDefault();Ossn.PostRequest({url:$url.attr('href'),beforeSend:function(request){$('#activity-item-'+$url.attr('data-guid')).attr('style','opacity:0.5;');},callback:function(callback){if(callback==1){$('#activity-item-'+$url.attr('data-guid')).fadeOut();$('#activity-item-'+$url.attr('data-guid')).remove();}else{$('#activity-item-'+$url.attr('data-guid')).attr('style','opacity:1;');}}});});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$("#ossn-wall-friend-input").tokenInput(Ossn.site_url+"friendpicker",{placeholder:'Enter friend name',hintText:false,propertyToSearch:"first_name",resultsFormatter:function(item){return"
  • "+""+"
    "+item.first_name+" "+item.last_name+"
  • "},tokenFormatter:function(item){return"
  • "+item.first_name+" "+item.last_name+"

  • "},});});});Ossn.PostMenu=function($id){$element=$($id).find('.menu-links');if($element.is(":not(:visible)")){$element.show();}else{$element.hide();}};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.ossn-wall-privacy').on('click',function(e){Ossn.MessageBox('post/privacy');});$('#ossn-wall-privacy').on('click',function(e){var wallprivacy=$('#ossn-wall-privacy-container').find('input[name="privacy"]:checked').val();$('#ossn-wall-privacy').val(wallprivacy);Ossn.MessageBoxClose();});});});Ossn.PostComment=function($container){Ossn.ajaxRequest({url:Ossn.site_url+'action/post/comment',form:'#comment-container-'+$container,beforeSend:function(request){$('#comment-box-'+$container).attr('readonly','readonly');},callback:function(callback){if(callback['process']==1){$('#comment-box-'+$container).removeAttr('readonly');$('#comment-box-'+$container).val('');$('.ossn-comments-list-'+$container).append(callback['comment']);$('#comment-attachment-container-'+$container).hide();$('#ossn-comment-attachment-'+$container).find('.image-data').html('');} +if(callback['process']==0){$('#comment-box-'+$container).removeAttr('readonly');Ossn.MessageBox('syserror/unknown');}}});};Ossn.EntityComment=function($container){Ossn.ajaxRequest({url:Ossn.site_url+'action/post/entity/comment',form:'#comment-container-'+$container,beforeSend:function(request){$('#comment-box-'+$container).attr('readonly','readonly');},callback:function(callback){if(callback['process']==1){$('#comment-box-'+$container).removeAttr('readonly');$('#comment-box-'+$container).val('');$('.ossn-comments-list-'+$container).append(callback['comment']);$('#comment-attachment-container-'+$container).hide();$('#ossn-comment-attachment-'+$container).find('.image-data').html('');} +if(callback['process']==0){$('#comment-box-'+$container).removeAttr('readonly');Ossn.MessageBox('syserror/unknown');}}});};Ossn.CommentMenu=function($id){$element=$($id).find('.menu-links');if($element.is(":not(:visible)")){$element.show();$($id).find('.drop-down-arrow').attr('style','display:block;');}else{$element.hide();$($id).find('.drop-down-arrow').attr('style','');}};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$(document).delegate('.ossn-delete-comment','click',function(e){e.preventDefault();$comment=$(this);$url=$comment.attr('href');$comment_id=Ossn.UrlParams('comment',$url);Ossn.PostRequest({url:$url,action:false,beforeSend:function(){$('#comments-item-'+$comment_id).attr('style','opacity:0.6;');},callback:function(callback){if(callback==1){$('#comments-item-'+$comment_id).fadeOut().remove();} +if(callback==0){$('#comments-item-'+$comment_id).attr('style','opacity:0.6;');}}});});});});Ossn.CommentImage=function($container){$(document).ready(function(){$("#ossn-comment-image-file-"+$container).on('change',function(event){event.preventDefault();var formData=new FormData($('#ossn-comment-attachment-'+$container)[0]);$.ajax({url:Ossn.site_url+'comment/attachment',type:'POST',data:formData,async:true,beforeSend:function(){$('#ossn-comment-attachment-'+$container).find('.image-data').html('');$('#comment-attachment-container-'+$container).show();},cache:false,contentType:false,processData:false,success:function(callback){if(callback['type']==1){$('#comment-container-'+$container).find('input[name="comment-attachment"]').val(callback['file']);$('#ossn-comment-attachment-'+$container).find('.image-data').html('');} +if(callback['type']==0){$('#comment-container-'+$container).find('input[name="comment-attachment"]').val('');$('#comment-attachment-container-'+$container).hide();Ossn.MessageBox('syserror/unknown');}},});});});};Ossn.ViewLikes=function($post,$type){if(!$type){$type='post';} +Ossn.MessageBox('likes/view?guid='+$post+'&type='+$type);};Ossn.PostUnlike=function(post){Ossn.PostRequest({url:Ossn.site_url+'action/post/unlike',beforeSend:function(){$('#ossn-like-'+post).find('a').html('');},params:'&post='+post,callback:function(callback){if(callback['done']!==0){$('#ossn-like-'+post).find('a').html(callback['button']);$('#ossn-like-'+post).find('a').attr('onclick','Ossn.PostLike('+post+');');}else{$('#ossn-like-'+post).find('a').html(Ossn.Print('unlike'));}},});};Ossn.PostLike=function(post){Ossn.PostRequest({url:Ossn.site_url+'action/post/like',beforeSend:function(){$('#ossn-like-'+post).find('a').html('');},params:'&post='+post,callback:function(callback){if(callback['done']!==0){$('#ossn-like-'+post).find('a').html(callback['button']);$('#ossn-like-'+post).find('a').attr('onClick','Ossn.PostUnlike('+post+');');}else{$('#ossn-like-'+post).find('a').html(Ossn.Print('like'));}},});};Ossn.EntityUnlike=function(entity){Ossn.PostRequest({url:Ossn.site_url+'action/post/unlike',beforeSend:function(){$('#ossn-like-'+entity).find('a').html('');},params:'&entity='+entity,callback:function(callback){if(callback['done']!==0){$('#ossn-like-'+entity).find('a').html(callback['button']);$('#ossn-like-'+entity).find('a').attr('onclick','Ossn.EntityLike('+entity+');');}else{$('#ossn-like-'+entity).find('a').html(Ossn.Print('unlike'));}},});};Ossn.EntityLike=function(entity){Ossn.PostRequest({url:Ossn.site_url+'action/post/like',beforeSend:function(){$('#ossn-like-'+entity).find('a').html('');},params:'&entity='+entity,callback:function(callback){if(callback['done']!==0){$('#ossn-like-'+entity).find('a').html(callback['button']);$('#ossn-like-'+entity).find('a').attr('onClick','Ossn.EntityUnlike('+entity+');');}else{$('#ossn-like-'+post).find('a').html(Ossn.Print('like'));}},});};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$(document).delegate('.ossn-like-comment','click',function(e){e.preventDefault();var $item=$(this);var $type=$.trim($item.attr('data-type'));var $url=$item.attr('href');Ossn.PostRequest({url:$url,action:false,beforeSend:function(){$item.html('');},callback:function(callback){if(callback['done']==1){$total_guid=Ossn.UrlParams('annotation',$url);$total=$('.ossn-total-likes-'+$total_guid).attr('data-likes');if($type=='Like'){$item.html(Ossn.Print('unlike'));$item.attr('data-type','Unlike');var unlike=$url.replace("like","unlike");$item.attr('href',unlike);$total_likes=$total;$total_likes++;$('.ossn-total-likes-'+$total_guid).attr('data-likes',$total_likes);$('.ossn-total-likes-'+$total_guid).html('.
    '+$total_likes);} +if($type=='Unlike'){$item.html(Ossn.Print('like'));$item.attr('data-type','Like');var like=$url.replace("unlike","like");$item.attr('href',like);if($total>1){$like_remove=$total;0 +$like_remove--;$('.ossn-total-likes-'+$total_guid).attr('data-likes',$like_remove);$('.ossn-total-likes-'+$total_guid).html('.
    '+$like_remove);} +if($total==1){$('.ossn-total-likes-'+$total_guid).attr('data-likes',0);$('.ossn-total-likes-'+$total_guid).html('');}}} +if(callback['done']==0){if($type=='Like'){$item.html(Ossn.Print('like'));$item.attr('data-type','Like');Ossn.MessageBox('syserror/unknown');} +if($type=='Unlike'){$item.html(Ossn.Print('unlike'));$item.attr('data-type','Unlike');Ossn.MessageBox('syserror/unknown');}}},});});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('#ossn-add-album').click(function(){Ossn.MessageBox('album/add');});$('#album-add').click(function(){Ossn.MessageBox('album/add');});$('#ossn-add-photos').click(function(){$dataurl=$(this).attr('data-url');Ossn.MessageBox('photos/add'+$dataurl);});});});Ossn.NotificationBox=function($title,$meta,$type,height){Ossn.NotificationsCheck();if(height==''){height='540px';} +if($type){$('.selected').addClass($type);} +if($title){$('.ossn-notifications-box').show() +$('.ossn-notifications-box').find('.type-name').html($title);} +if($meta){$('.ossn-notifications-box').find('.metadata').html($meta);$('.ossn-notifications-box').css('height',height);}};Ossn.NotificationBoxClose=function(){$('.ossn-notifications-box').hide() +$('.ossn-notifications-box').find('.type-name').html('');$('.ossn-notifications-box').find('.metadata').html('
    ');$('.ossn-notifications-box').css('height','140px');$('.selected').attr('class','selected');};Ossn.NotificationShow=function($div){$($div).attr('onClick','Ossn.NotificationClose(this)');Ossn.PostRequest({url:Ossn.site_url+"notification/notification",action:false,beforeSend:function(request){Ossn.NotificationBoxClose();$('.ossn-notifications-friends').attr('onClick','Ossn.NotificationFriendsShow(this)');$('.ossn-notifications-messages').attr('onClick','Ossn.NotificationMessagesShow(this)');Ossn.NotificationBox(Ossn.Print('notifications'),false,'notifications');},callback:function(callback){var data='';var height='';if(callback['type']==1){data=callback['data'];height='540px';} +if(callback['type']==0){data=callback['data'];height='100px';} +Ossn.NotificationBox(Ossn.Print('notifications'),data,'notifications',height);}});};Ossn.NotificationClose=function($div){Ossn.NotificationBoxClose();$($div).attr('onClick','Ossn.NotificationShow(this)');};Ossn.NotificationFriendsShow=function($div){$($div).attr('onClick','Ossn.NotificationFriendsClose(this)');Ossn.PostRequest({url:Ossn.site_url+"notification/friends",action:false,beforeSend:function(request){Ossn.NotificationBoxClose();$('.ossn-notifications-notification').attr('onClick','Ossn.NotificationShow(this)');$('.ossn-notifications-messages').attr('onClick','Ossn.NotificationMessagesShow(this)');Ossn.NotificationBox(Ossn.Print('friend:requests'),false,'firends');},callback:function(callback){var data='';var height='';if(callback['type']==1){data=callback['data'];} +if(callback['type']==0){data=callback['data'];height='100px';} +Ossn.NotificationBox(Ossn.Print('friend:requests'),data,'firends',height);}});};Ossn.NotificationFriendsClose=function($div){Ossn.NotificationBoxClose();$($div).attr('onClick','Ossn.NotificationFriendsShow(this)');};Ossn.AddFriend=function($guid){action=Ossn.site_url+"action/friend/add?user="+$guid;Ossn.ajaxRequest({url:action,form:'#add-friend-'+$guid,action:true,beforeSend:function(request){$('#notification-friend-item-'+$guid).find('form').hide();$('#ossn-nfriends-'+$guid).append('
    ');},callback:function(callback){if(callback['type']==1){$('#notification-friend-item-'+$guid).attr('style','background:#FFF9D7;');$('#ossn-nfriends-'+$guid).addClass('friends-added-text').html(callback['text']);} +if(callback['type']==0){$('#notification-friend-item-'+$guid).find('form').show();$('#ossn-nfriends-'+$guid).find('.ossn-loading').remove();} +Ossn.NotificationsCheck();}});};Ossn.removeFriendRequset=function($guid){action=Ossn.site_url+"action/friend/remove?user="+$guid;Ossn.ajaxRequest({url:action,form:'#remove-friend-'+$guid,action:true,beforeSend:function(request){$('#notification-friend-item-'+$guid).find('form').hide();$('#ossn-nfriends-'+$guid).append('
    ');},callback:function(callback){if(callback['type']==1){$('#notification-friend-item-'+$guid).attr('style','background:#FFF9D7;');$('#ossn-nfriends-'+$guid).addClass('friends-added-text').html(callback['text']);} +if(callback['type']==0){$('#notification-friend-item-'+$guid).find('form').show();$('#ossn-nfriends-'+$guid).find('.ossn-loading').remove();} +Ossn.NotificationsCheck();}});};Ossn.NotificationMessagesShow=function($div){$($div).attr('onClick','Ossn.NotificationMessagesClose(this)');Ossn.PostRequest({url:Ossn.site_url+"notification/messages",action:false,beforeSend:function(request){Ossn.NotificationBoxClose();$('.ossn-notifications-notification').attr('onClick','Ossn.NotificationShow(this)');$('.ossn-notifications-friends').attr('onClick','Ossn.NotificationFriendsShow(this)');},callback:function(callback){var data='';var height='';if(callback['type']==1){data=callback['data'];height='';} +if(callback['type']==0){data=callback['data'];height='100px';} +Ossn.NotificationBox(Ossn.Print('messages'),data,'messages',height);}});};Ossn.NotificationMessagesClose=function($div){Ossn.NotificationBoxClose();$($div).attr('onClick','Ossn.NotificationMessagesShow(this)');};Ossn.NotificationsCheck=function(){Ossn.PostRequest({url:Ossn.site_url+"notification/count",action:false,callback:function(callback){$notification=$('#ossn-notif-notification');$notification_count=$notification.find('.ossn-notification-container');$friends=$('#ossn-notif-friends');$friends_count=$friends.find('.ossn-notification-container');$messages=$('#ossn-notif-messages');$messages_count=$messages.find('.ossn-notification-container');if(callback['notifications']>0){$notification_count.html(callback['notifications']);$notification.find('.ossn-icon').addClass('ossn-icons-topbar-notifications-new');$notification_count.attr('style',' display:inline-block;');} +if(callback['notifications']<=0){$notification_count.html('');$notification.find('.ossn-icon').removeClass('ossn-icons-topbar-notifications-new');$notification.find('.ossn-icon').addClass('ossn-icons-topbar-notification');$notification_count.hide();} +if(callback['messages']>0){$messages_count.html(callback['messages']);$messages.find('.ossn-icon').addClass('ossn-icons-topbar-messages-new');$messages_count.attr('style',' display:inline-block;');} +if(callback['messages']<=0){$messages_count.html('');$messages.find('.ossn-icon').removeClass('ossn-icons-topbar-messages-new');$messages.find('.ossn-icon').addClass('ossn-icons-topbar-messages');$messages_count.hide();} +if(callback['friends']>0){$friends_count.html(callback['friends']);$friends.find('.ossn-icon').addClass('ossn-icons-topbar-friends-new');$friends_count.attr('style',' display:inline-block;');} +if(callback['friends']<=0){$friends_count.html('');$friends.find('.ossn-icon').removeClass('ossn-icons-topbar-friends-new');$friends.find('.ossn-icon').addClass('ossn-icons-topbar-friends');$friends_count.hide();}}});};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){setInterval(function(){Ossn.NotificationsCheck()},5000*12);});});Ossn.SendMessage=function($user){Ossn.ajaxRequest({url:Ossn.site_url+"action/message/send",form:'#message-send-'+$user,action:true,beforeSend:function(request){},callback:function(callback){$('#message-append-'+$user).append(callback);$('#message-send-'+$user).find('textarea').val('');Ossn.message_scrollMove($user);}});};Ossn.getMessages=function($user,$guid){Ossn.PostRequest({url:Ossn.site_url+"messages/getnew/"+$user,action:false,callback:function(callback){$('#message-append-'+$guid).append(callback);Ossn.message_scrollMove($guid);}});};Ossn.getRecent=function($user){Ossn.PostRequest({url:Ossn.site_url+"messages/getrecent/"+$user,action:false,callback:function(callback){$('#get-recent').html(callback);$('#get-recent').addClass('inner');$('.messages-from').find('.inner').remove();$('#get-recent').appendTo('.messages-from');$('#get-recent').show();}});};Ossn.playSound=function(){document.getElementById('ossn-chat-sound').play();};Ossn.message_scrollMove=function(fid){var message=document.getElementById('message-append-'+fid);if(message){message.scrollTop=message.scrollHeight;return message.scrollTop;}};Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('#ossn-group-add').click(function(){Ossn.MessageBox('groups/add');});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$("#group-upload-cover").submit(function(event){event.preventDefault();var formData=new FormData($(this)[0]);var $url=Ossn.site_url+'action/group/cover/upload';$.ajax({url:Ossn.AddTokenToUrl($url),type:'POST',data:formData,async:true,beforeSend:function(){if($('.ossn-group-cover').length==0){$('.header-users').attr('style','opacity:0.7;');}else{$('.ossn-group-cover').attr('style','opacity:0.7;');}},cache:false,contentType:false,processData:false,success:function(callback){if(callback['type']==1){if($('.ossn-group-cover').length==0){location.reload();}else{$('.ossn-group-cover').attr('style','');$('.ossn-group-cover').find('img').attr('style','');$('.ossn-group-cover').find('img').attr('src',callback['url']);}} +if(callback['type']==0){Ossn.MessageBox('syserror/unknown');}}});return false;});$('#add-cover-group').click(function(e){e.preventDefault();$('#group-upload-cover').find('.coverfile').click();});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('#reposition-cover').click(function(){$('.group-c-position').attr('style','display:inline-block !important;');$(function(){$.globalVars={originalTop:0,originalLeft:0,maxHeight:$("#draggable").height()-$("#container").height(),maxWidth:$("#draggable").width()-$("#container").width()};$("#draggable").draggable({start:function(event,ui){if(ui.position!=undefined){$.globalVars.originalTop=ui.position.top;$.globalVars.originalLeft=ui.position.left;}},drag:function(event,ui){var newTop=ui.position.top;var newLeft=ui.position.left;if(ui.position.top<0&&ui.position.top*-1>$.globalVars.maxHeight){newTop=$.globalVars.maxHeight*-1;} +if(ui.position.top>0){newTop=0;} +if(ui.position.left<0&&ui.position.left*-1>$.globalVars.maxWidth){newLeft=$.globalVars.maxWidth*-1;} +if(ui.position.left>0){newLeft=0;} +ui.position.top=newTop;ui.position.left=newLeft;Ossn.GroupCover_top=newTop;Ossn.GroupCover_left=newLeft;}});});});});});Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.ossn-group-cover').hover(function(){$('.ossn-group-cover-button').show();},function(){$('.ossn-group-cover-button').hide();});});});Ossn.repositionGroupCOVER=function($group){var $url=Ossn.site_url+"action/group/cover/reposition";$.ajax({async:true,type:'post',data:'&top='+Ossn.GroupCover_top+'&left='+Ossn.GroupCover_left+'&group='+$group,url:Ossn.AddTokenToUrl($url),success:function(callback){$('.group-c-position').attr('style','display:none !important;');$("#draggable").draggable({drag:function(){return false;}});},});}; \ No newline at end of file diff --git a/cache/js/1429430046/view/ossn.chat.js b/cache/js/1429430046/view/ossn.chat.js new file mode 100644 index 000000000..b65644a84 --- /dev/null +++ b/cache/js/1429430046/view/ossn.chat.js @@ -0,0 +1,2 @@ +Ossn.RegisterStartupFunction(function(){$(document).ready(function(){$('.friends-tab').on('click',function(e){var $friends_list;$friends_list=$('.friends-list');if($friends_list.is(":not(:visible)")){$friends_list.show();}else{$friends_list.hide();}});setInterval(function(){Ossn.ChatBoot()},5000);var sidebarheight=$(document).height();sidebarheight=sidebarheight-45;$(".ossn-chat-windows-long").find('.inner').height(sidebarheight+'px');});});Ossn.ChatOpenTab=function($user){var $tabitem=$('#ftab-i'+$user);if($tabitem.find('.tab-container').is(":not(:visible)")){Ossn.ChatMarkViewed($user);$tabitem.find('.tab-container').show();$tabitem.css('width','256px');$tabitem.find('form').show();$tabitem.find('input[type="text"]').show();$('#ftab'+$user).removeClass('ossn-chat-tab-active');$tabitem.find('.ossn-chat-new-message').hide();Ossn.ChatScrollMove($user);}};Ossn.ChatCloseTab=function($user){var $tabitem=$('#ftab-i'+$user);$tabitem.find('.tab-container').hide();$tabitem.find('form').hide();$tabitem.css('width','200px');$tabitem.find('input[type="text"]').hide();$tabitem.removeClass('ossn-chat-tab-active');};Ossn.ChatTerminateTab=function($user){return Ossn.CloseChat($user);};Ossn.ChatBoot=function(){$.ajax({url:Ossn.site_url+'ossnchat/boot/ossn.boot.chat.js',dataType:"script",async:true,success:function(fetch){fetch;}});};Ossn.ChatSendForm=function($user){Ossn.ajaxRequest({url:Ossn.site_url+"action/ossnchat/send",form:'#ossn-chat-send-'+$user,beforeSend:function(request){$('#ftab-i'+$user).find('.ossn-chat-message-sending').show();},callback:function(callback){if(callback['type']==1){$('#ftab-i'+$user).find('.ossn-chat-message-sending').hide();$('#ftab-i'+$user).find('.data').append(callback['message']);$('#ftab-i'+$user).find('input[name="message"]').val('');Ossn.ChatScrollMove($user);}}});};Ossn.ChatnewTab=function($user){Ossn.PostRequest({url:Ossn.site_url+"ossnchat/selectfriend?user="+$user,action:false,callback:function(callback){if($('#ftab-i'+$user).length==0){if($(".ossn-chat-containers").children(".friend-tab-item").size()<4){$('.ossn-chat-containers').append(callback);}}}});};Ossn.ChatMarkViewed=function($fid){Ossn.PostRequest({url:Ossn.site_url+"action/ossnchat/markread?fid="+$fid,callback:function(callback){return true;}});};Ossn.CloseChat=function($fid){Ossn.PostRequest({url:Ossn.site_url+"action/ossnchat/close?fid="+$fid,callback:function(callback){if(callback==1){var $tabitem=$('#ftab-i'+$fid);$tabitem.remove();} +if(callback==0){Ossn.MessageBox('syserror/unknown');}}});};Ossn.ChatplaySound=function(){document.getElementById('ossn-chat-sound').play();};Ossn.ChatScrollMove=function(fid){var message=document.getElementById('ossn-chat-messages-data-'+fid);if(message){message.scrollTop=message.scrollHeight;return message.scrollTop;}};Ossn.ChatInsertSmile=function($code,$tab){var ChatTab=$('#ossn-chat-input-'+$tab);var chatval=ChatTab.val();ChatTab.val(chatval+' '+$code);};Ossn.ChatShowSmilies=function($tab){$box=$('#ftab-i'+$tab).find('.ossn-chat-icon-smilies');if($box.is(":not(:visible)")){$box.slideDown('slow');}else{$box.slideUp('slow');}};Ossn.ChatExpand=function($username){window.location=Ossn.site_url+'messages/message/'+$username;}; \ No newline at end of file diff --git a/cache/js/1429430046/view/ossn.language.js b/cache/js/1429430046/view/ossn.language.js new file mode 100644 index 000000000..3068c11f1 --- /dev/null +++ b/cache/js/1429430046/view/ossn.language.js @@ -0,0 +1 @@ +var OssnLocale={"home":"Home","site:index":"Welcome to website","news:feed":"News Feed","new:feed":"News Feed","photos:ossn":"Photos","admin:view:site":"View Site","home:top:heading":"Welcome to %s! Join now to make new friends, create groups, add photos, and much more.","create:account":"Create an account","its:free":"It's free and always will be.","register:ok:message":"Your account has been registered. We have sent you an account activation email. If you didn't receive the email, please check your spam\/junk folder.","copyright":"© COPYRIGHT","powered":"Powered by the Open Source Social Network","name":"Name","birthdate":"Birthdate","first:name":"First Name","last:name":"Last Name","email":"Email","email:again":"Re-enter Email","username":"Username","password":"Password","day":"Day","month":"Month","year":"Year","male":"Male","female":"Female","account:create:notice":"By clicking Create an account, you agree to our","gender":"Gender","acount:settings":"Account Settings","page:error":"Page Not Found!","page:error:text":"Opps! The Page you requested was not found!","page:error:heading":"404","search:users":"People","admin:logout":"Logout","logout":"Logout","ossn:like:this":"%s liked this","ossn:like:you:and:this":"You and %s liked this","ossn:like:people":"%s People","ossn:like:person":"%s Person","ossn:liked:you":"You liked this","ossn:unlike":"Unlike","ossn:like":"Like","admin:components":"Components","admin:dashboard":"Dashboard","admin:install":"Installer","admin:themes":"Themes","admin:basic":"Basic","admin:cache":"Cache","admin:mode":"Mode","configure":"Configure","admin:help":"Help","admin:support":"Support","ossn:update:check:error":"Error","upload":"Upload","save":"Save","add":"Add","edit":"Edit","search":"Search","delete":"Delete","admin:users":"List Users","admin:add:user":"Add user","admin:user:deleted":"User has been deleted!","admin:user:delete:error":"Cannot delete user! Please try again later.","type":"Type","normal":"Normal","admin":"Administrator","lastlogin":"Last Login","my:version":"My Ossn Version","online:users":"Online Users","themes":"Themes","users":"Users","components":"Components","available:updates":"Available Updates","website:name":"Website Name","owner:email":"Owner Email","default:lang":"Default Language","timeline":"Timeline","photos":"Photos","friends":"Friends","links":"Links","ossn:add:user:mail:subject":"%s please confirm your email address for %s!","ossn:add:user:mail:body":"Before you can start using %s, you must confirm your email address.\r\n\r\nPlease confirm your email address by clicking on the link below:\r\n\r\n%s\r\n\r\nIf you can't click on the link, copy and paste it to your browser manually.\r\n\r\n%s","user:friends":"Friends","user:account:validated":"Account has been successfully validated!","user:account:validate:fail":"Cannot validate account! Please try again later.","cache:enabled":"Cache successfully enabled!","cache:disabled":"Cache successfully disabled!","cache:enable":"Enable Cache","cache:disable":"Disable Cache","cache:1":"Enabled","cache:0":"Disabled","cache:notice":"Cache will store CSS and JS in cache file and help your site load faster.","theme:install:notice":"Upload a valid .zip theme package.","com:install:notice":"Upload a valid .zip component package.","login:error":"Invalid username or passsword!","login:error:sub":"We couldn't log you in. Please check your username or password and try again.","login:success":"You are now logged in!","com:installed":"Component has been installed!","com:install:error":"Cannot install component! Make sure it is a valid package.","settings:saved":"Settings saved","com:deleted":"Component has been deleted!","com:delete:error":"Cannot delete component! Please try again later.","com:disabled":"Successfully disabled!","com:enabled":"Component Enabled!","theme:delete:active":"Cannot delete active theme.","theme:deleted":"Theme has been deleted.","theme:delete:error":"Cannot delete theme! Please try again later.","theme:enabled":"Successfully enabled!","theme:installed":"Theme has been installed!","theme:install:error":"Cannot install theme! Make sure it is a valid theme.","fields:require":"All fields are required!","username:error":"Username is incorrect.","password:error":"Password must be more than 5 words.","account:created":"Your account has been created.","account:create:error:admin":"Cannot register account! Please try again later.","user:updated":"User has been updated!","logged:out":"You are now logged out!","username:inuse":"Username already exist! Please select a different usename.","email:inuse":"Email address already exist! Please try another email address.","email:invalid":"Email address is invalid! Make sure the email address you entered is correct.","email:error:matching":"Email addresses do not match.","account:created:email":"Your account has been registered! We have sent you an account activation email. If you didn't receive the email, please check your spam\/junk folder","administration":"Administration","privacy":"Privacy","close":"Close","open":"Open","public":"Public","privacy:public:note":"Everyone on this site can see this.","privacy:friends:note":"Only your friends can see this.","add:friend":"Add friend","cancel:request":"Cancel Request","remove:friend":"Unfriend","no:friends":"No Friends","settings":"Settings","ossn:add:friend:error":"Cannot add friend!","ossn:friend:request:submitted":"Your friend request was submitted successfully!","upgrade:file:load:error":"Cannot load upgrade file!","upgrade:success":"Your website has been upgraded successfully to release %s.","upgrade:failed":"Cannot upgrade your site to release %s.","upgrade:not:available":"Nothing to upgrade!","site:login":"Login","system:error:title":"Something went wrong!","system:error:text":"Something went wrong! Reload this page and try again.","reset:login":"Reset Password","reset:password":"Reset Password","enter:new:password":"Enter your new password below and click reset.","reset":"Reset","enter:emai:reset:pwd":"Enter the email address of your account in order to reset the password.","ossn:reset:password:subject":"Reset your password","ossn:reset:password:body":"Hello %s,\r\n\t\r\nPlease click the link below to reset password or copy the link and paste into your browser's address bar:\r\n\r\n%s\r\n\r\n%s","passord:reset:success":"Password successfully changed!","passord:reset:fail":"Cannot reset password! Please try again later.","password:reset:email:required":"Email cannot be empty!","passord:reset:email:success":"Password reset instructions have been sent to your email address.","erros:reporting":"Error Reporting","erros:off":"Off","erros:on":"On","basic:settings":"Basic Settings","ossn:new:version:error":"Unknown","ossn:version:avaialbe":"%s","ossn:exception:title":"A system error has occurred. Please try again later. You may email the details of this error to the system administrator at %s.","ossn:securitytoken:failed":"The action you requested is invalid.","ossn:component:delete:exception":"Are you sure you want to delete this component?","ossn:user:delete:exception":"Are you sure you want to delete this user?","title:access:1":"Private","title:access:2":"Public","title:access:3":"Friends","upload:file:error:ini_size":"The file you tried to upload is too large.","upload:file:error:form_size":"The file you tried to upload is too large.","upload:file:error:partial":"The file upload did not complete.","upload:file:error:no_file":"No file was selected.","upload:file:error:no_tmp_dir":"Cannot save the uploaded file.","upload:file:error:cant_write":"Cannot save the uploaded file.","upload:file:error:extension":"Cannot save the uploaded file.","upload:file:error:unknown":"The file upload failed.","ossn:post:size:exceed":"The action you requested exceed the size limit.","admin:com:installer":"Component Installer","admin:theme:installer":"Theme Installer","admin:cache:settings":"Cache Settings","admin:user:list":"Users List","admin:edit:user":"Edit User","admin:login":"Login","admin:notification:email":"Site Notification Email","notification_email":"Notification Email (noreply@domain.com)","owner_email":"Owner Email (mysite@domain.com)","ossn:websitename":"Name of your website","ossn:user:validation:resend":"Your account is not validated! You must validate your account before logging in. Another validation email has been sent to your email address.","site:timepassed:text":"%s ago","site:timepassed:data":"second|seconds|minute|minutes|hour|hours|day|days|week|weeks|month|months|year|years|decade|decades","ossn:notification:no:notification":"Nothing to show","admin:button:enable":"Enable","admin:button:enabled":"Enabled","admin:button:disable":"Disable","admin:button:configure":"Configure","admin:button:delete":"Delete","admin:component:author":"Author","admin:component:website":"Website","admin:sidemenu:components":"Components","admin:sidemenu:themes":"Themes","admin:sidemenu:settings":"Site Settings","admin:sidemenu:usermanager":"User Manager","cancel":"Cancel","ossn:language:complete":"Complete","ossn:pagination:first":"First","ossn:pagination:last":"Last","validate":"Validate","admin:users:unvalidated":"Unvalidated Users","admin:user:validated":"User validated","admin:user:validate:error":"Could not validate user.","aa":"Afar","ab":"Abkhazian","af":"Afrikaans","am":"Amharic","ar":"Arabic","as":"Assamese","ay":"Aymara","az":"Azerbaijani","ba":"Bashkir","be":"Byelorussian","bg":"Bulgarian","bh":"Bihari","bi":"Bislama","bn":"Bengali; Bangla","bo":"Tibetan","br":"Breton","ca":"Catalan","co":"Corsican","cs":"Czech","cy":"Welsh","da":"Danish","de":"German","dz":"Bhutani","el":"Greek","en":"English","eo":"Esperanto","es":"Spanish","et":"Estonian","eu":"Basque","fa":"Persian","fi":"Finnish","fj":"Fiji","fo":"Faeroese","fr":"French","fy":"Frisian","ga":"Irish","gd":"Scots \/ Gaelic","gl":"Galician","gn":"Guarani","gu":"Gujarati","he":"Hebrew","ha":"Hausa","hi":"Hindi","hr":"Croatian","hu":"Hungarian","hy":"Armenian","ia":"Interlingua","id":"Indonesian","ie":"Interlingue","ik":"Inupiak","is":"Icelandic","it":"Italian","iu":"Inuktitut","iw":"Hebrew (obsolete)","ja":"Japanese","ji":"Yiddish (obsolete)","jw":"Javanese","ka":"Georgian","kk":"Kazakh","kl":"Greenlandic","km":"Cambodian","kn":"Kannada","ko":"Korean","ks":"Kashmiri","ku":"Kurdish","ky":"Kirghiz","la":"Latin","ln":"Lingala","lo":"Laothian","lt":"Lithuanian","lv":"Latvian\/Lettish","mg":"Malagasy","mi":"Maori","mk":"Macedonian","ml":"Malayalam","mn":"Mongolian","mo":"Moldavian","mr":"Marathi","ms":"Malay","mt":"Maltese","my":"Burmese","na":"Nauru","ne":"Nepali","nl":"Dutch","no":"Norwegian","oc":"Occitan","om":"(Afan) Oromo","or":"Oriya","pa":"Punjabi","pl":"Polish","ps":"Pashto \/ Pushto","pt":"Portuguese","qu":"Quechua","rm":"Rhaeto-Romance","rn":"Kirundi","ro":"Romanian","ru":"Russian","rw":"Kinyarwanda","sa":"Sanskrit","sd":"Sindhi","sg":"Sangro","sh":"Serbo-Croatian","si":"Singhalese","sk":"Slovak","sl":"Slovenian","sm":"Samoan","sn":"Shona","so":"Somali","sq":"Albanian","sr":"Serbian","ss":"Siswati","st":"Sesotho","su":"Sundanese","sv":"Swedish","sw":"Swahili","ta":"Tamil","te":"Tegulu","tg":"Tajik","th":"Thai","ti":"Tigrinya","tk":"Turkmen","tl":"Tagalog","tn":"Setswana","to":"Tonga","tr":"Turkish","ts":"Tsonga","tt":"Tatar","tw":"Twi","ug":"Uigur","uk":"Ukrainian","ur":"Urdu","uz":"Uzbek","vi":"Vietnamese","vo":"Volapuk","wo":"Wolof","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","za":"Zuang","zh":"Chinese","zu":"Zulu","people:like:this":"People who liked this post","change:cover":"Change Cover","change:photo":"Change Photo","update:info":"Update Info","message":"Message","save:position":"Save Position","ossn:profile:picture:updated":"Changed profile picture.","ossn:profile:cover:picture:updated":"Changed profile cover.","ossnwall":"OssnWall","post:created":"Successfully created post!","post:create:error":"Cannot create post! Please try again later.","post":"Post","enter:location":"Enter Location","tag:friends":"Tag Friends","wall:post:container":"What's on your mind?","post:view":"Post View","ossn:post:delete":"Delete","post:delete:fail":"Cannot delete post! Please try again later.","post:delete:success":"Post successfully deleted!","post:select:privacy":"Please select privacy for wall post","ossn:wall:settings:save:error":"Cannot save settings! Please try again later.","ossn:wall:settings:saved":"Settings saved!","ossn:wall:admin:notice":"Homepage Posts","ossn:wall:allsite:posts":"All site posts","ossn:wall:friends:posts":"Friends posts only","write:comment":"Write a comment...","like":"Like","unlike":"Unlike","comment:deleted":"Comment successfully deleted!","comment:delete:error":"Cannot delete comment! Please try again later.","comment:delete":"Delete","comment:comment":"Comment","comment:view:all":"View all comments","album:name":"Album Name","add:album":"Add Album","photo:select":"Select Photo","no:albums":"No Albums","no:photos":"No Photos","back:to:album":"Back to Album","photo:albums":"Photo Albums","edit:profile":"Edit Profile","reposition:cover":"Reposition","profile:photos":"Profile Photos","photo:deleted:success":"Photo successfully deleted!","photo:delete:error":"Cannot delete photo! Please try again later.","back":"Back","add:photos":"Add photos","delete:photo":"Delete photo","covers":"Covers","cover:view":"Cover View","profile:covers":"Profile Covers","ossn:notifications:comments:post":"%s commented on the post.","ossn:notifications:like:post":"%s liked your post.","ossn:notifications:like:annotation":"%s liked your comment.","ossn:notifications:like:entity:file:ossn:aphoto":"%s liked your photo.","ossn:notifications:comments:entity:file:ossn:aphoto":"%s commented on your photo.","ossn:notifications:wall:friends:tag":"%s tagged you in a post.","ossn:notification:are:friends":"You are now friends!","ossn:notifications:comments:post:group:wall":"%s commented on the group post.","ossn:notifications:like:entity:file:profile:photo":"%s liked the profile photo.","ossn:notifications:comments:entity:file:profile:photo":"%s commented on the profile photo.","ossn:notifications:like:post:group:wall":"%s liked your post.","ossn:notification:delete:friend":"Friend request deleted!","notifications":"Notifications","see:all":"See All","friend:requests":"Friend Requests","ossn:notifications:friendrequest:confirmbutton":"Confirm","ossn:notifications:friendrequest:denybutton":"Deny","ossn:search":"Search","result:type":"RESULT TYPE","search:result":"Search results for %s","ossn:search:topbar:search":"Search groups, friends and more.","ossn:search:no:result":"No results found!","user:messages":"Messages","inbox":"Inbox","send":"Send","ossn:message:between":"Messages %s","messages":"Messages","message:placeholder":"Enter text here","ossnads":"Ads Manager","fields:required":"All fields are required!","ad:created":"Ad has been created!","ad:create:fail":"Cannot create ad!","ad:title":"Title","ad:site:url":"Siteurl","ad:desc":"Description","ad:photo":"Photo","ad:browse":"Browse","ad:clicks":"Clicks","sponsored":"SPONSORED","ad:deleted":"Ad with the title of '%s' has been successfully deleted.","ad:delete:fail":"Cannot delete ad! Please try again later.","ad:edited":"Ad successfully modified.","ad:edit:fail":"Cannot edit ad! Please try again later.","groups":"Groups","add:group":"Add Group","requests":"Requests","members":"Members","member:add:error":"Something went wrong! Please try again later.","member:added":"Membership request approved!","member:request:deleted":"Membership request declined!","member:request:delete:fail":"Cannot decline membership request! Please try again later.","membership:cancel:succes":"Membership request cancelled!","membership:cancel:fail":"Cannot cancel membership request! Please try again later.","group:added":"Successfully created the group!","group:add:fail":"Cannot create group! Please try again later.","memebership:sent":"Request successfully sent!","memebership:sent:fail":"Cannot send request! Please try again later.","group:updated":"Group has been updated!","group:update:fail":"Cannot update group! Please try again later.","group:name":"Group Name","group:desc":"Group Description","privacy:group:public":"Everyone can see this group and its posts. Only members can post to this group.","privacy:group:close":"Everyone can see this group. Only members can post and see posts.","group:memb:remove":"Remove","leave:group":"Leave Group","join:group":"Join Group","total:members":"Total Members","group:members":"Members (%s)","view:all":"View all","member:requests":"REQUESTS (%s)","about:group":"Group About","cancel:membership":"Membership cancel","no:requests":"No Requests","approve":"Approve","decline":"Decline","search:groups":"Search Groups","close:group:notice":"Join this group to see the posts, photos, and comments.","closed:group":"Closed group","group:admin":"Admin","title:access:private:group":"Group post","ossn:notifications:group:joinrequest":"%s has requested to join %s","ossnsitepages":"Site Pages","site:privacy":"Privacy","site:about":"About","site:terms":"Terms and Conditions","page:saved":"Page saved successfully!","page:save:error":"Cannot save page! Please try again later.","user:blocked":"User has been blocked!","user:block:error":"Cannot block user! Please try again later.","user:block":"Block","user:unblock":"Unblock","ossn:chat:no:friend:online":"No one is online","ossn:notifications:ossnpoke:poke":"%s has poked you!","user:poked":"You have poked %s!","user:poke:error":"Cannot poke %s! Please try again later.","poke":"Poke","com:ossn:invite":"Invite","com:ossn:invite:friends":"Invite Friends","com:ossn:invite:friends:note":"To invite friends to join you on this network, enter their email addresses and a brief message. They will receive an email containing your invitation.","com:ossn:invite:emails:note":"Email addresses (separated by a comma)","com:ossn:invite:emails:placeholder":"smith@example.com, john@example.com","com:ossn:invite:message":"Message","com:ossn:invite:mail:subject":"Invitation to join %s","com:ossn:invite:mail:message":"You have been invited to join %s by %s. They included the following message:\r\n\r\n%s\r\n\r\nTo join, click the following link:\r\n\r\n%s\r\n\r\nProfile link: %s\r\n","com:ossn:invite:mail:message:default":"Hi,\r\n\r\nI wanted to invite you to join my network here on %s.\r\n\r\nProfile link : %s\r\n\r\nBest regards.\r\n%s","com:ossn:invite:sent":"Your friends were invited. Invites sent: %s.","com:ossn:invite:wrong:emails":"The following addresses are not valid: %s.","com:ossn:invite:sent:failed":"Cannot invite the following addresses: %s.","com:ossn:invite:already:members":"The following addresses are already members: %s","com:ossn:invite:empty:emails":"Please add at least one email address"}; \ No newline at end of file diff --git a/classes/OssnAnnotation.php b/classes/OssnAnnotation.php index 4da184a9d..2b2ae119a 100644 --- a/classes/OssnAnnotation.php +++ b/classes/OssnAnnotation.php @@ -1,270 +1,335 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnAnnotation extends OssnEntities { - /** - * Initialize the objects. - * - * @return void; - */ - public function initAttributes() { - $this->OssnDatabase = new OssnDatabase; - $this->time_created = time(); - if (empty($this->subtype)) { - $this->subtype = NULL; - } - if (empty($this->permission)) { - $this->permission = OSSN_PUBLIC; - } - if (empty($this->order_by)) { - $this->order_by = ''; - } - } - /** - * Create annotation; - * - * @requires : $object->(owner_guid, subject_guid, type, subtype, value) - * - * @return bool; - */ - public function addAnnotation() { - self::initAttributes(); - $params['into'] = 'ossn_annotations'; - $params['names'] = array( - 'owner_guid', - 'subject_guid', - 'type', - 'time_created' - ); - $params['values'] = array( - $this->owner_guid, - $this->subject_guid, - $this->type, - $this->time_created - ); - $this->annotation_type = $this->type; - $this->owner_guid_old = $this->owner_guid; - if ($this->OssnDatabase->insert($params)) { - $this->annotation_inserted = $this->OssnDatabase->getLastEntry(); - $this->atype = $this->type; - $this->type = 'annotation'; - $this->subtype = $this->atype; - $this->owner_guid = $this->annotation_inserted; - $this->value = $this->value; - $this->add(); - - $params['subject_guid'] = $this->subject_guid; - $params['owner_guid'] = $this->owner_guid_old; - $params['type'] = $this->annotation_type; - $params['annotation_guid'] = $this->OssnDatabase->getLastEntry(); - ossn_trigger_callback('annotations', 'created', $params); - - return true; - } - return false; - } - /** - * Get annotation by annotation id; - * - * @requires : $object->(annotation_id) - * - * @return annotation; - */ - public function getAnnotationById() { - self::initAttributes(); - $params['from'] = 'ossn_annotations'; - $params['wheres'] = array("id='{$this->annotation_id}'"); - $annotation = $this->OssnDatabase->select($params); - - $this->owner_guid = $annotation->id; - $this->type = 'annotation'; - $this->entities = $this->get_entities(); - if (!$this->entities) { - return false; - } - foreach ($this->entities as $entity) { - $entities[$entity->subtype] = $entity->value; - } - $data = array_merge(get_object_vars($annotation), $entities); - return arrayObject($data, get_class($this)); - } - /** - * Get annotations by annotation type - * - * @requires : $object->(annotation_id) - * - * @return annotation; - */ - public function getAnnotationsByType(){ - self::initAttributes(); - $params['from'] = 'ossn_annotations'; - $params['wheres'] = array("type='{$this->type}'"); - $params['order_by'] = $this->order_by; - $annotations = $this->OssnDatabase->select($params, true); - if(!$annotations){ - return false; - } - unset($this->order_by); - foreach($annotations as $annotation){ - $this->owner_guid = $annotation->id; - $this->type = 'annotation'; - $this->entities = $this->get_entities(); - foreach($this->entities as $entity){ - $entities[$entity->subtype] = $entity->value; - } - $data[] = array_merge(get_object_vars($annotation), $entities); + /** + * Initialize the objects. + * + * @return void; + */ + public function initAttributes() { + $this->OssnDatabase = new OssnDatabase; + $this->time_created = time(); + if(empty($this->subtype)) { + $this->subtype = NULL; + } + if(empty($this->permission)) { + $this->permission = OSSN_PUBLIC; + } + if(empty($this->order_by)) { + $this->order_by = ''; + } } - return arrayObject($data, get_class($this)); - } - /** - * Get annotations by owner - * - * @requires : $this->owner_guid - * - * @return object; - */ - public function getAnnotationsByOwner(){ - self::initAttributes(); - if(empty($this->owner_guid)){ - return false; + /** + * Create annotation; + * + * @requires : $object->(owner_guid, subject_guid, type, subtype, value) + * + * @return bool; + */ + public function addAnnotation() { + self::initAttributes(); + if(empty($this->owner_guid) || empty($this->subject_guid)){ + return false; + } + $params['into'] = 'ossn_annotations'; + $params['names'] = array( + 'owner_guid', + 'subject_guid', + 'type', + 'time_created' + ); + $params['values'] = array( + $this->owner_guid, + $this->subject_guid, + $this->type, + $this->time_created + ); + $this->annotation_type = $this->type; + $this->owner_guid_old = $this->owner_guid; + if($this->OssnDatabase->insert($params)) { + $this->annotation_inserted = $this->OssnDatabase->getLastEntry(); + $this->atype = $this->type; + $this->type = 'annotation'; + $this->subtype = $this->atype; + $this->owner_guid = $this->annotation_inserted; + $this->value = $this->value; + $this->add(); + + $params['subject_guid'] = $this->subject_guid; + $params['owner_guid'] = $this->owner_guid_old; + $params['type'] = $this->annotation_type; + $params['annotation_guid'] = $this->OssnDatabase->getLastEntry(); + ossn_trigger_callback('annotations', 'created', $params); + + return true; + } + return false; } - $params['from'] = 'ossn_annotations'; - $params['wheres'] = array("owner_guid='{$this->owner_guid}'"); - $params['order_by'] = $this->order_by; - $annotations = $this->OssnDatabase->select($params, true); - if(!$annotations){ - return false; + /** + * Get annotation by annotation id; + * + * @requires : $object->(annotation_id) + * + * @return annotation; + */ + public function getAnnotationById() { + $params = array(); + $params['annotation_id'] = $this->annotation_id; + + $data = $this->searchAnnotation($params); + if($data){ + return $data[0]; + } } - unset($this->order_by); - foreach($annotations as $annotation){ - $this->owner_guid = $annotation->id; - $this->type = 'annotation'; - $this->entities = $this->get_entities(); - foreach($this->entities as $entity){ - $entities[$entity->subtype] = $entity->value; - } - $data[] = array_merge(get_object_vars($annotation), $entities); + /** + * Get annotations by annotation type + * + * @requires : $object->(annotation_id) + * + * @return annotation; + */ + public function getAnnotationsByType() { + $params = array(); + $params['type'] = $this->type; + $params['subtype'] = $this->subtype; + + return $this->searchAnnotation($params); } - return arrayObject($data, get_class($this)); - } - /** - * Delete annotations by subject guid - * - * @params $subject = subject_guid, - * $type = annotation type - * @param string $type - * - * @return bool; - */ - public function annon_delete_by_subject($subject, $type) { - self::initAttributes(); - $this->subject_guid = $subject; - $this->type = $type; - $annotations = $this->getAnnotationBySubject(); - if ($annotations) { - foreach ($annotations as $annontation) { - $this->deleteAnnotation($annontation->id); - } - return true; - } - return false; - } - - /** - * Get annotation by subject_guid; - * - * @requires : $object->(subject_guid, types(optional)) - * - * @return annotations; - */ - public function getAnnotationBySubject() { - self::initAttributes(); - if (!empty($this->type)) { - $type = "AND type='{$this->type}'"; - } - $params['from'] = 'ossn_annotations'; - $params['wheres'] = array("subject_guid='{$this->subject_guid}' {$type}"); - $params['order_by'] = $this->order_by; - $annotations = $this->OssnDatabase->select($params, true); - unset($this->order_by); - if ($annotations) { - foreach ($annotations as $annotation) { - $this->owner_guid = $annotation->id; - $this->type = 'annotation'; - $this->entities = $this->get_entities(); - if ($this->entities) { - foreach ($this->entities as $entity) { - $entities[$entity->subtype] = $entity->value; - } - $data[] = array_merge(get_object_vars($annotation), $entities); - //should not merge with other objects - unset($entities); - } - - } - return arrayObject($data, get_class($this)); - } - return false; - } - - /** - * Delete Annotation - * - * @params $annotation = annotation_id - * - * @return bool; - */ - public function deleteAnnotation($annotation) { - self::initAttributes(); - if ($this->deleteByOwnerGuid($annotation, 'annotation')) { - $this->statement("DELETE FROM ossn_annotations WHERE(id='{$annotation}')"); - if ($this->execute()) { - $data = ossn_get_userdata("annotation/{$annotation}/"); - if (is_dir($data)) { - OssnFile::DeleteDir($data); - // As of v2.0 DeleteDir delete directory also - //rmdir($data); - } - $params['annotation'] = $annotation; - ossn_trigger_callback('annotation', 'delete', $params); - return true; - } - } - return false; - } - /** - * Delete Annotation - * - * @params $annotation = annotation_id - * - * @return bool; - */ - public function deleteAnnotationByOwner($ownerguid) { - self::initAttributes(); - if(empty($ownerguid)){ - return false; + /** + * Get annotations by owner + * + * @requires : $this->owner_guid + * + * @return object; + */ + public function getAnnotationsByOwner() { + $params = array(); + $params['owner_guid'] = $this->subject_guid; + + return $this->searchAnnotation($params); } - $this->owner_guid = $ownerguid; - $annotations = $this->getAnnotationsByOwner(); - if($annotations){ - foreach($annotations as $annotation){ - $this->deleteAnnotation($annotation->id); - } + /** + * Delete annotations by subject guid + * + * @params $subject = subject_guid, + * $type = annotation type + * @param string $type + * + * @return bool; + */ + public function annon_delete_by_subject($subject, $type) { + self::initAttributes(); + $this->subject_guid = $subject; + $this->type = $type; + $annotations = $this->getAnnotationBySubject(); + if($annotations) { + foreach($annotations as $annontation) { + $this->deleteAnnotation($annontation->id); + } + return true; + } + return false; } - } - /** - * Get newly create annoation id - * - * @return (int); - */ - public function getAnnotationId() { - return $this->annotation_inserted; - } -}//class + + /** + * Get annotation by subject_guid; + * + * @requires : $object->(subject_guid, types(optional)) + * + * @return annotations; + */ + public function getAnnotationBySubject() { + $params = array(); + $params['type'] = $this->type; + $params['subject_guid'] = $this->subject_guid; + + return $this->searchAnnotation($params); + } + + /** + * Delete Annotation + * + * @params $annotation = annotation_id + * + * @return bool; + */ + public function deleteAnnotation($annotation) { + self::initAttributes(); + if($this->deleteByOwnerGuid($annotation, 'annotation')) { + $this->statement("DELETE FROM ossn_annotations WHERE(id='{$annotation}')"); + if($this->execute()) { + $data = ossn_get_userdata("annotation/{$annotation}/"); + if(is_dir($data)) { + OssnFile::DeleteDir($data); + // As of v2.0 DeleteDir delete directory also + //rmdir($data); + } + $params['annotation'] = $annotation; + ossn_trigger_callback('annotation', 'delete', $params); + return true; + } + } + return false; + } + /** + * Delete Annotation + * + * @params $annotation = annotation_id + * + * @return bool; + */ + public function deleteAnnotationByOwner($ownerguid) { + self::initAttributes(); + if(empty($ownerguid)) { + return false; + } + $this->owner_guid = $ownerguid; + $annotations = $this->getAnnotationsByOwner(); + if($annotations) { + foreach($annotations as $annotation) { + $this->deleteAnnotation($annotation->id); + } + } + } + /** + * Get newly create annoation id + * + * @return (int); + */ + public function getAnnotationId() { + return $this->annotation_inserted; + } + /** + * Search annotation by its type, owner etc + * + * @param array $params A valid options in format: + * 'search_type' => true(default) to performs matching on a per-character basis + * false for performs matching on exact value. + * 'type' => Valid annotation type + * 'subject_guid' => A valid subject guid, which results integer value + * 'owner_guid' => A valid owner guid, which results integer value + * 'limit' => Result limit default, Default is 20 values + * 'order_by' => To show result in sepcific order. There is no default order. + * + * reutrn array|false; + * + */ + public function searchAnnotation(array $params = array()) { + self::initAttributes(); + if(empty($params)) { + return false; + } + //prepare default attributes + $default = array( + 'search_type' => true, + 'type' => false, + 'owner_guid' => false, + 'annotation_id' => false, + 'subject_guid' => false, + 'limit' => false, + 'order_by' => false, + 'offset' => input('offset', '', 1), + 'page_limit' => ossn_call_hook('pagination', 'page_limit', false, 10), //call hook for page limit + 'count' => false + ); + $options = array_merge($default, $params); + $wheres = array(); + + //validate offset values + if($options['limit'] !== false) { + $offset_vals = ceil($options['limit'] / $options['page_limit']); + $offset_vals = abs($offset_vals); + $offset_vals = range(1, $offset_vals); + if(!in_array($options['offset'], $offset_vals)) { + return false; + } + } + //get only required result, don't bust your server memory + $getlimit = $this->generateLimit($options['limit'], $options['page_limit'], $options['offset']); + if($getlimit) { + $options['limit'] = $getlimit; + } + + if(!empty($options['annotation_id'])) { + $wheres[] = "a.id='{$options['annotation_id']}'"; + } + if(!empty($params['type'])) { + $wheres[] = "a.type='{$options['type']}'"; + } + if(!empty($params['owner_guid'])) { + $wheres[] = "a.owner_guid ='{$options['owner_guid']}'"; + } + if(!empty($params['subject_guid'])) { + $wheres[] = "a.subject_guid ='{$options['subject_guid']}'"; + } + $wheres[] = "e.owner_guid=a.id"; + $wheres[] = "e.type='annotation'"; + $wheres[] = "emd.guid=e.guid"; + //prepare search + $params = array(); + + $params['from'] = 'ossn_annotations as a, ossn_entities as e , ossn_entities_metadata as emd'; + $params['params'] = array( + 'a.id', + 'a.time_created', + 'a.owner_guid', + 'a.subject_guid', + 'a.type', + 'emd.value' + ); + $params['wheres'] = array( + $this->constructWheres($wheres) + ); + $params['order_by'] = $options['order_by']; + $params['limit'] = $options['limit']; + + $this->get = $this->select($params, true); + + //prepare count data; + if($options['count'] === true) { + unset($params['params']); + unset($params['limit']); + $count = array(); + $count['params'] = array( + "count(*) as total" + ); + $count = array_merge($params, $count); + return $this->select($count)->total; + } + if($this->get) { + foreach($this->get as $annotation) { + $merge = array( + $annotation->type => $annotation->value + ); + //unset value + unset($annotation->value); + + //get object vars and then merge into arrays + $values = get_object_vars($annotation); + $merge = array_merge($values, $merge); + + $this->owner_guid = $annotation->id; + $this->type = 'annotation'; + $entities = $this->get_entities(); + if($entities){ + foreach($entities as $entity){ + $entities_data[$entity->subtype] = $entity->value; + } + $merge = array_merge($merge, $entities_data); + } + //construct object again + $annotations[] = arrayObject($merge, get_class($this)); + } + return $annotations; + } + return false; + } +} //class diff --git a/classes/OssnBase.php b/classes/OssnBase.php index ebe4c2dd3..00f5bb666 100644 --- a/classes/OssnBase.php +++ b/classes/OssnBase.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnBase { /** diff --git a/classes/OssnComponents.php b/classes/OssnComponents.php index 8f2252fd9..72a3bb3cb 100644 --- a/classes/OssnComponents.php +++ b/classes/OssnComponents.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnComponents extends OssnDatabase { /** @@ -145,6 +145,7 @@ public function loadComs() { $dir = ossn_route()->com; $name = $this->getCom($com->com_id); if (!empty($name->com_name)) { + ossn_register_plugins_by_path("{$dir}{$com->com_id}/plugins/"); if (is_file("{$dir}{$com->com_id}/locale/ossn.{$lang}.php")) { include("{$dir}{$com->com_id}/locale/ossn.{$lang}.php"); } diff --git a/classes/OssnDatabase.php b/classes/OssnDatabase.php index fd5d2528e..48218df17 100644 --- a/classes/OssnDatabase.php +++ b/classes/OssnDatabase.php @@ -1,241 +1,291 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ -class OssnDatabase extends OssnBase{ - /** - * Connect to mysql database - * - * @return bool; - */ - public function Connect() { - $settings = ossn_database_settings(); - $connect = new mysqli($settings->host, $settings->user, $settings->password, $settings->database); - if (!$connect->connect_errno) { - return $connect; - } else { - return false; - } - } - /** - * Prepare a query to insert data in database - * - * @params = array(); - * $params['names'] = names of columns - * $params['values'] = values that need to be inserted - * $params['into'] = table name - * - * @return bool; - */ - public function insert($params) { - if (is_array($params)) { - if (count($params['names']) == count($params['values'])) { - $colums = "`" . implode("`, `", $params['names']) . '`'; - $values = "'" . implode("', '", $params['values']) . "'"; - $query = "INSERT INTO {$params['into']} ($colums) VALUES ($values);"; - $this->statement($query); - if ($this->execute()) { - return true; - } - } - } - return false; - } - - /** - * Prepare a mysqli query - * - * @return bool; - */ - public function statement($query) { - if (!empty($query)) { - $this->query = $query; - return true; - } - return false; - } - - /** - * Execute a mysqli query and store result in memory - * - * @return bool; - */ - public function execute() { - $this->database = $this->Connect(); - if (isset($this->query) && !empty($this->query)) { - $this->database->set_charset("utf8"); - $this->exe = $this->database->query($this->query); - $exception = ossn_call_hook('database', 'execution:message', false, true); - if (!$this->exe && $exception) { - throw new OssnDatabaseException("{$this->database->error} \n {$this->query} "); - } - if (isset($this->database->insert_id)) { - $this->last_id = $this->database->insert_id; - } - unset($this->query); - $this->database->close(); - return true; - } - return false; - } - - /** - * Prepare a query to update data in database - * - * @params = array(); - * $params['names'] = names of columns - * $params['values'] = values that need to be updated - * $params['table'] = table name - * $params['wheres'] = specify a selection criteria to update required records - * - * @return bool; - */ - public function update($params = array()) { - if (is_array($params)) { - if (count($params['names']) == count($params['values']) && !empty($params['table'])) { - $valuec = count($params['names']); - $i = 1; - foreach ($params['names'] as $key => $val) { - $data[$val] = $params['values'][$key]; - } - foreach ($data as $keys => $vals) { - if ($i == $valuec) { - $valyes[] = "`{$keys}` = '{$vals}'"; - } else { - $valyes[] = "`{$keys}` = '{$vals}',"; - } - $i++; - } - $q = implode('', $valyes); - $params['wheres'] = implode(' ', $params['wheres']); - $query = "UPDATE {$params['table']} SET {$q} WHERE {$params['wheres']}"; - $this->statement($query); - if ($this->execute()) { - return true; - } - - } - } - } - - /** - * Prepare a query to select data from database - * - * @params = array(); - * $params['from'] = names of table - * $params['params'] = names of columns which you want to select - * $params['wheres'] = specify a selection criteria to get required records - * - * @return bool; - */ - public function select($params, $multi = '') { - if (is_array($params)) { - if (!isset($params['params'])) { - $parameters = '*'; - } else { - $parameters = implode(', ', $params['params']); - } - $order_by = ''; - if (!empty($params['order_by'])) { - $order_by = "ORDER by {$params['order_by']}"; - } - $where = ''; - if (isset($params['wheres']) && is_array($params['wheres'])) { - $where = implode(' ', $params['wheres']); - } - $wheres = ''; - if (!empty($params['wheres'])) { - $wheres = "WHERE({$where})"; - } - $limit = ''; - if (!empty($params['limit'])){ - $limit = "LIMIT {$params['limit']}"; - } - $joins = ''; - if(!empty($params['joins'])){ - $joins = $params['joins']; - } - $query = "SELECT {$parameters} FROM {$params['from']} {$joins} {$wheres} {$order_by} {$limit};"; - $this->statement($query); - if ($this->execute()) { - return $this->fetch($multi); - } - } - return false; - } - - /** - * Fetch the data from memory that is stored during execution; - * - * @params = $data = (ture if you want to fetch all data , or flase if only one row) - * - * @return bool; - */ - public function fetch($data = false) { - if (isset($this->exe)) { - if ($data !== true) { - if ($fetch = $this->exe) { - return arrayObject($fetch->fetch_assoc()); - } - } - if ($data === true) { - if ($fetch = $this->exe) { - while ($all = $fetch->fetch_assoc()) { - $alldata[] = arrayObject($all); - } - } - if (isset($alldata) && !empty($alldata)) { - return arrayObject($alldata); - } - } - } - return false; - } - - /** - * Prepare a query to delete data from database - * - * @params = array(); - * $params['from'] = names of table - * $params['wheres'] = specify a criteria for deletion - * - * @return bool; - */ - public function delete($params) { - if (is_array($params)) { - $where = implode(' ', $params['wheres']); - if (!empty($params['wheres'])) { - $wheres = "WHERE({$where})"; - } - //don't let any component or query to empty entire table - if(empty($params['wheres'])){ +class OssnDatabase extends OssnBase { + /** + * Connect to mysql database + * + * @return bool; + */ + public function Connect() { + $settings = ossn_database_settings(); + $connect = new mysqli($settings->host, $settings->user, $settings->password, $settings->database); + if(!$connect->connect_errno) { + return $connect; + } else { + return false; + } + } + /** + * Prepare a query to insert data in database + * + * @params = array(); + * $params['names'] = names of columns + * $params['values'] = values that need to be inserted + * $params['into'] = table name + * + * @return bool; + */ + public function insert($params) { + if(is_array($params)) { + if(count($params['names']) == count($params['values'])) { + $colums = "`" . implode("`, `", $params['names']) . '`'; + $values = "'" . implode("', '", $params['values']) . "'"; + $query = "INSERT INTO {$params['into']} ($colums) VALUES ($values);"; + $this->statement($query); + if($this->execute()) { + return true; + } + } + } return false; - } - $query = "DELETE FROM `{$params['from']}` {$wheres};"; - $this->statement($query); - if ($this->execute()) { - return true; - } - } - return false; - } - - /** - * Get a guid of newly create entry - * - * @return (int); - */ - public function getLastEntry() { - if (!empty($this->last_id)) { - return $this->last_id; - } - } - -}//class + } + + /** + * Prepare a mysqli query + * + * @return bool; + */ + public function statement($query) { + if(!empty($query)) { + $this->query = $query; + return true; + } + return false; + } + + /** + * Execute a mysqli query and store result in memory + * + * @return bool; + */ + public function execute() { + $this->database = $this->Connect(); + if(isset($this->query) && !empty($this->query)) { + $this->database->set_charset("utf8"); + $this->exe = $this->database->query($this->query); + $exception = ossn_call_hook('database', 'execution:message', false, true); + if(!$this->exe && $exception) { + throw new OssnDatabaseException("{$this->database->error} \n {$this->query} "); + } + if(isset($this->database->insert_id)) { + $this->last_id = $this->database->insert_id; + } + unset($this->query); + $this->database->close(); + return true; + } + return false; + } + + /** + * Prepare a query to update data in database + * + * @params = array(); + * $params['names'] = names of columns + * $params['values'] = values that need to be updated + * $params['table'] = table name + * $params['wheres'] = specify a selection criteria to update required records + * + * @return bool; + */ + public function update($params = array()) { + if(is_array($params)) { + if(count($params['names']) == count($params['values']) && !empty($params['table'])) { + $valuec = count($params['names']); + $i = 1; + foreach($params['names'] as $key => $val) { + $data[$val] = $params['values'][$key]; + } + foreach($data as $keys => $vals) { + if($i == $valuec) { + $valyes[] = "`{$keys}` = '{$vals}'"; + } else { + $valyes[] = "`{$keys}` = '{$vals}',"; + } + $i++; + } + $q = implode('', $valyes); + $params['wheres'] = implode(' ', $params['wheres']); + $query = "UPDATE {$params['table']} SET {$q} WHERE {$params['wheres']}"; + $this->statement($query); + if($this->execute()) { + return true; + } + + } + } + } + + /** + * Prepare a query to select data from database + * + * @params = array(); + * $params['from'] = names of table + * $params['params'] = names of columns which you want to select + * $params['wheres'] = specify a selection criteria to get required records + * + * @return bool; + */ + public function select($params, $multi = '') { + if(is_array($params)) { + if(!isset($params['params'])) { + $parameters = '*'; + } else { + $parameters = implode(', ', $params['params']); + } + $order_by = ''; + if(!empty($params['order_by'])) { + $order_by = "ORDER by {$params['order_by']}"; + } + $where = ''; + if(isset($params['wheres']) && is_array($params['wheres'])) { + $where = implode(' ', $params['wheres']); + } + $wheres = ''; + if(!empty($params['wheres'])) { + $wheres = "WHERE({$where})"; + } + $limit = ''; + if(!empty($params['limit'])) { + $limit = "LIMIT {$params['limit']}"; + } + $joins = ''; + if(!empty($params['joins']) && !is_array($params['joins'])) { + $joins = $params['joins']; + } elseif(!empty($params['joins']) && is_array($params['joins'])) { + $joins = implode(' ', $params['joins']); + } + $query = "SELECT {$parameters} FROM {$params['from']} {$joins} {$wheres} {$order_by} {$limit};"; + + $this->statement($query); + if($this->execute()) { + return $this->fetch($multi); + } + } + return false; + } + + /** + * Fetch the data from memory that is stored during execution; + * + * @params = $data = (ture if you want to fetch all data , or flase if only one row) + * + * @return bool; + */ + public function fetch($data = false) { + if(isset($this->exe)) { + if($data !== true) { + if($fetch = $this->exe) { + return arrayObject($fetch->fetch_assoc()); + } + } + if($data === true) { + if($fetch = $this->exe) { + while($all = $fetch->fetch_assoc()) { + $alldata[] = arrayObject($all); + } + } + if(isset($alldata) && !empty($alldata)) { + return arrayObject($alldata); + } + } + } + return false; + } + + /** + * Prepare a query to delete data from database + * + * @params = array(); + * $params['from'] = names of table + * $params['wheres'] = specify a criteria for deletion + * + * @return bool; + */ + public function delete($params) { + if(is_array($params)) { + $where = implode(' ', $params['wheres']); + if(!empty($params['wheres'])) { + $wheres = "WHERE({$where})"; + } + //don't let any component or query to empty entire table + if(empty($params['wheres'])) { + return false; + } + $query = "DELETE FROM `{$params['from']}` {$wheres};"; + $this->statement($query); + if($this->execute()) { + return true; + } + } + return false; + } + + /** + * Get a guid of newly create entry + * + * @return (int); + */ + public function getLastEntry() { + if(!empty($this->last_id)) { + return $this->last_id; + } + } + /** + * Create a wheres clause for database + * + * @param array $array A valid array containg wheres clauses; + * @param string $operator AND, OR, LIKE + * + * @return string; + */ + public function constructWheres(array $array, $operator = "AND") { + if(!empty($array) && !empty($operator)) { + $result = implode(" {$operator} ", $array); + return $result; + } + return false; + } + /** + * Generate limit from options + * + * @param integer $data_limit How much data should be fetched? + * @param integer $page_limit Limit of data on one page + * @param integer $offset Offset value + * + * @return string|false + */ + public function generateLimit($data_limit = false, $page_limit = false, $offset = false) { + $limit = $data_limit; + //get only required result, don't bust your server memory + if(isset($offset) && $offset !== false && $page_limit !== false) { + $limitfrom = ($offset - 1) * ($page_limit); + $limitto = $page_limit; + + $data_limit = "{$limitfrom}, {$limitto}"; + if($offset > 1) { + if($limit > $limitfrom) { + $limitto = $limit - $limitfrom; + if($limitto <= $page_limit) { + $data_limit = "{$limitfrom}, {$limitto}"; + } + } + } + if(!empty($limit) && $limit < $page_limit) { + $data_limit = $limit; + } + return $data_limit; + } + return false; + } + +} //class diff --git a/classes/OssnDatabaseException.php b/classes/OssnDatabaseException.php index 0cc6989d4..95d93467c 100644 --- a/classes/OssnDatabaseException.php +++ b/classes/OssnDatabaseException.php @@ -1,14 +1,14 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnDatabaseException extends Exception {} \ No newline at end of file diff --git a/classes/OssnEntities.php b/classes/OssnEntities.php index 972bea34c..86aa3a9fd 100644 --- a/classes/OssnEntities.php +++ b/classes/OssnEntities.php @@ -1,326 +1,472 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnEntities extends OssnDatabase { - /** - * Add new entity. - * - * @params = $this->type => entity type; (this usually is user, object, annotation, site) - * $this->subtype => entity subtype; - * $this->entity_permission => OSSN_ACCESS - * $this->active = is entity is active or not - * $this->value = data you want to insert - * $this->owner_guid = entity owner guid - * - * @return bool; - */ - public function add() { - self::initAttributes(); - if (!empty($this->owner_guid) && in_array($this->type, $this->entity_types)) { - $this->params['into'] = 'ossn_entities'; - $this->params['names'] = array( - 'owner_guid', - 'type', - 'subtype', - 'time_created', - 'time_updated', - 'permission', - 'active' - ); - $this->params['values'] = array( - $this->owner_guid, - $this->type, - $this->subtype, - $this->time_created, - $this->time_updated, - $this->permission, - $this->active - ); - if ($this->insert($this->params)) { - $this->params['into'] = 'ossn_entities_metadata'; - $this->params['names'] = array( - 'guid', - 'value' - ); - $this->params['values'] = array( - $this->getLastEntry(), - $this->value - ); - $this->insert($this->params); - return true; - } - } - return false; - } - - /** - * Initialize the objects. - * - * @return void; - */ - private function initAttributes() { - $this->data = new stdClass; - $this->time_created = time(); - $this->time_updated = ''; - $this->active = 1; - - if (empty($this->permission)) { - $this->permission = OSSN_PUBLIC; - } - - $this->types = array( - 'object' => 'OssnObject', - 'user' => 'OssnUser', - 'annotation' => 'OssnAnnotation', - 'entity' => 'OssnEntities', - 'site' => 'OssnSite', - 'component' => 'OssnComponents', - ); - - //generate entity types from $this->types - foreach ($this->types as $type => $class) { - $this->entity_types[] = $type; - } - - if (empty($this->order_by)) { - $this->order_by = ''; - } - if (empty($this->limit)){ - $this->limit = ''; + /** + * Initialize the objects. + * + * @return void; + */ + private function initAttributes() { + $this->data = new stdClass; + $this->time_created = time(); + $this->time_updated = ''; + $this->active = 1; + + if(empty($this->permission)) { + $this->permission = OSSN_PUBLIC; + } + + $this->types = array( + 'object' => 'OssnObject', + 'user' => 'OssnUser', + 'annotation' => 'OssnAnnotation', + 'entity' => 'OssnEntities', + 'site' => 'OssnSite', + 'component' => 'OssnComponents' + ); + + //generate entity types from $this->types + foreach($this->types as $type => $class) { + $this->entity_types[] = $type; + } + + if(empty($this->order_by)) { + $this->order_by = ''; + } + if(empty($this->limit)) { + $this->limit = false; + } + if(empty($this->type)) { + $this->type = 'entity'; + } + $this->data = new stdClass; + $this->annotations = new OssnAnnotation; + + if(!isset($this->offset)) { + $this->offset = 1; + } + if(!isset($this->page_limit)) { + //default OssnPagination limit + $this->page_limit = ossn_call_hook('pagination', 'per_page', false, 10); + } + if(!isset($this->count)) { + $this->count = false; + } } - if (empty($this->type)) { - $this->type = 'entity'; - } - $this->data = new stdClass; - $this->annotations = new OssnAnnotation; - } - - /** - * Get Entity. - * - * @params = $this->entity_guid => entity guid in database; - * - * @return (object); - */ - public function get_entity() { - self::initAttributes(); - $params = array(); - $params['from'] = 'ossn_entities as e'; - $params['params'] = array('e.guid, e.time_created, e.time_updated, e.permission, e.active, e.owner_guid, emd.value, e.type, e.subtype'); - $params['joins'] = "JOIN ossn_entities_metadata as emd ON e.guid=emd.guid"; - $params['wheres'] = array("e.guid ='{$this->entity_guid}'"); + /** + * Add new entity. + * + * @params = $this->type => entity type; (this usually is user, object, annotation, site) + * $this->subtype => entity subtype; + * $this->entity_permission => OSSN_ACCESS + * $this->active = is entity is active or not + * $this->value = data you want to insert + * $this->owner_guid = entity owner guid + * + * @return bool; + */ + public function add() { + self::initAttributes(); + if(!empty($this->owner_guid) && in_array($this->type, $this->entity_types)) { + $this->params['into'] = 'ossn_entities'; + $this->params['names'] = array( + 'owner_guid', + 'type', + 'subtype', + 'time_created', + 'time_updated', + 'permission', + 'active' + ); + $this->params['values'] = array( + $this->owner_guid, + $this->type, + $this->subtype, + $this->time_created, + $this->time_updated, + $this->permission, + $this->active + ); + if($this->insert($this->params)) { + $this->params['into'] = 'ossn_entities_metadata'; + $this->params['names'] = array( + 'guid', + 'value' + ); + $this->params['values'] = array( + $this->getLastEntry(), + $this->value + ); + $this->insert($this->params); + return true; + } + } + return false; + } + /** + * Get Entity. + * + * @params = $this->entity_guid => entity guid in database; + * + * @return (object); + */ + public function get_entity() { + self::initAttributes(); + + $params = array(); + $params['from'] = 'ossn_entities as e'; + $params['params'] = array( + 'e.guid', + 'e.time_created', + 'e.time_updated', + 'e.permission', + 'e.active', + 'e.owner_guid', + 'emd.value', + 'e.type', + 'e.subtype' + ); + $params['joins'] = "JOIN ossn_entities_metadata as emd ON e.guid=emd.guid"; + $params['wheres'] = array( + "e.guid ='{$this->entity_guid}'" + ); + + $data = $this->select($params); + if($data) { + $entity = arrayObject($data, $this->types[$this->type]); + return $entity; + } + } - $data = $this->select($params); - if($data){ - $entity = arrayObject($data, $this->types[$this->type]); - return $entity; + /** + * Update Entity in database. + * + * @required (object)->data + * + * @return bool; + */ + public function save() { + if(!empty($this->owner_guid)) { + $this->datavars = $this->get_data_vars(); + // i don't think we need to add new data on save $arsalanshah; v1.x to 2.x + // added again in v3.0 $arsalanshah + foreach($this->datavars as $vars => $value) { + if(!in_array($vars, $this->get_data_dbvars())) { + $this->subtype = $vars; + $this->value = $value; + $this->add(); + } + } + foreach($this->get_entities() as $entity) { + if(isset($this->datavars[$entity->subtype])) { + $params['table'] = 'ossn_entities_metadata'; + $params['names'] = array( + 'value' + ); + $params['values'] = array( + $this->datavars[$entity->subtype] + ); + $params['wheres'] = array( + "guid='{$entity->guid}'" + ); + if($this->update($params)) { + $params['table'] = 'ossn_entities'; + $params['names'] = array( + 'time_updated' + ); + $params['values'] = array( + time() + ); + $params['wheres'] = array( + "guid='{$entity->guid}'" + ); + $this->update($params); + } + } + } + return true; + } + return false; } - } - - /** - * Update Entity in database. - * - * @required (object)->data - * - * @return bool; - */ - public function save() { - if (!empty($this->owner_guid)) { - $this->datavars = $this->get_data_vars(); - // i don't think we need to add new data on save $arsalanshah; - /* foreach($this->datavars as $vars => $value){ - if(!in_array($vars, $this->get_data_dbvars())){ - $this->subtype = $vars; - $this->value = $value; - $this->add(); - } - }*/ - foreach ($this->get_entities() as $entity) { - if (isset($this->datavars[$entity->subtype])) { - $params['table'] = 'ossn_entities_metadata'; - $params['names'] = array('value'); - $params['values'] = array($this->datavars[$entity->subtype]); - $params['wheres'] = array("guid='{$entity->guid}'"); - if ($this->update($params)) { - $params['table'] = 'ossn_entities'; - $params['names'] = array('time_updated'); - $params['values'] = array(time()); - $params['wheres'] = array("guid='{$entity->guid}'"); - $this->update($params); - } - } - } - return true; - } - return false; - } - - /** - * Get data object. - * - * @required (object)->data - * - * @return (array); - */ - private function get_data_vars() { - if (!$this->data) { - return false; - } - foreach ($this->data as $name => $value) { - $vars[$name] = $value; - } - return $vars; - } - - /** - * Get entities. - * - * @params = $this->type => entity type; - * $this->subtype => entity subtype; - * $this->owner_guid => guid of entity owner - * $this->order_by = to sort the data in a recordset - * - * @return (object); - */ - public function get_entities() { - self::initAttributes(); - if (!empty($this->subtype)) { - $this->subtype = "AND subtype='{$this->subtype}'"; - } else { - $this->subtype = ''; - } - if(isset($this->owner_guid)){ - $this->byowner = "owner_guid ='{$this->owner_guid}' AND"; - } - $params = array(); - $params['from'] = 'ossn_entities as e'; - $params['params'] = array('e.guid, e.time_created, e.time_updated, e.permission, e.active, e.owner_guid, emd.value, e.type, e.subtype'); - $params['joins'] = "JOIN ossn_entities_metadata as emd ON e.guid=emd.guid"; - $params['wheres'] = array("{$this->byowner} type='{$this->type}' {$this->subtype}"); - $params['order_by'] = $this->order_by; - $params['limit'] = $this->limit; - - $this->get = $this->select($params, true); - if ($this->get) { - foreach($this->get as $entity){ - $entities[] = arrayObject($entity, $this->types[$this->type]); + /** + * Get data object. + * + * @required (object)->data + * + * @return (array); + */ + private function get_data_vars() { + if(!$this->data) { + return false; + } + foreach($this->data as $name => $value) { + $vars[$name] = $value; + } + return $vars; + } + + /** + * Get entities. + * + * @params = $this->type => entity type; + * $this->subtype => entity subtype; + * $this->owner_guid => guid of entity owner + * $this->order_by = to sort the data in a recordset + * + * @return (object); + */ + public function get_entities() { + self::initAttributes(); + $options = array( + 'subtype' => $this->subtype, + 'type' => $this->type, + 'owner_guid' => $this->owner_guid, + 'offset' => $this->offset, + 'order_by' => $this->order_by, + 'page_limit' => $this->page_limit, + 'count' => $this->count, + 'limit' => $this->limit + ); + return $this->searchEntities($options); + } + + /** + * Get newly added entity guid. + * + * @return (int); + */ + public function AddedEntityGuid() { + return $this->getLastEntry(); } - return $entities; - } - return false; - } - - /** - * Get newly added entity guid. - * - * @return (int); - */ - public function AddedEntityGuid() { - return $this->getLastEntry(); - } - - /** - * Update entity metadata only. - * - * @return bool; - */ - public function updateEntity() { - if (!empty($this->guid)) { - - $params['table'] = 'ossn_entities_metadata'; - $params['names'] = array('value'); - $params['values'] = array($this->value); - $params['wheres'] = array("guid='{$this->guid}'"); - - if ($this->update($params)) { - - $params['table'] = 'ossn_entities'; - $params['names'] = array('time_updated'); - $params['values'] = array(time()); - $params['wheres'] = array("guid='{$this->guid}'"); - - $this->update($params); - return true; - } - } - return false; - } - - /** - * Delete all entities related to owner guid. - * - * @params = $guid = Entity guid in database - * $type = Entity type - * @param string $type - * - * @todo why not there is subtype? - * @return (bool); - */ - public function deleteByOwnerGuid($guid, $type) { - - $params['from'] = 'ossn_entities'; - $params['wheres'] = array("owner_guid='{$guid}' AND type='{$type}'"); - $ids = $this->select($params, true); - if (!$ids) { - return false; - } - foreach ($ids as $entity) { - $this->deleteEntity($entity->guid); - } - return true; - } - - /** - * Delete entity. - * - * @params = $guid = Entity guid in database - * - * @return (bool); - */ - public function deleteEntity($guid) { - if(isset($this->guid) && !empty($this->guid) && empty($guid)){ - $guid = $this->guid; + /** + * Update entity metadata only. + * + * @return bool; + */ + public function updateEntity() { + if(!empty($this->guid)) { + + $params['table'] = 'ossn_entities_metadata'; + $params['names'] = array( + 'value' + ); + $params['values'] = array( + $this->value + ); + $params['wheres'] = array( + "guid='{$this->guid}'" + ); + + if($this->update($params)) { + + $params['table'] = 'ossn_entities'; + $params['names'] = array( + 'time_updated' + ); + $params['values'] = array( + time() + ); + $params['wheres'] = array( + "guid='{$this->guid}'" + ); + + $this->update($params); + return true; + } + } + return false; } - $params['from'] = 'ossn_entities'; - $params['wheres'] = array("guid = '{$guid}'"); - if ($this->delete($params)) { - $metadata['from'] = 'ossn_entities_metadata'; - $metadata['wheres'] = array("guid = '{$guid}'"); - $this->delete($metadata); - - $vars['entity'] = $guid; - ossn_trigger_callback('delete', 'entity', $vars); - return true; - } - return false; - } - /** - * Get subtypes from entites. - * - * @required (object)->data - * - * @return (array); - */ - private function get_data_dbvars() { - $entities = $this->get_entities(); - if ($entities) { - foreach ($entities as $entity) { - $vars[] = $entity->subtype; - } - return $vars; - } - return false; - } -}//class + /** + * Delete all entities related to owner guid. + * + * @params = $guid = Entity guid in database + * $type = Entity type + * @param string $type + * + * @todo why not there is subtype? + * @return (bool); + */ + public function deleteByOwnerGuid($guid, $type) { + + $params['from'] = 'ossn_entities'; + $params['wheres'] = array( + "owner_guid='{$guid}' AND type='{$type}'" + ); + + $ids = $this->select($params, true); + if(!$ids) { + return false; + } + foreach($ids as $entity) { + $this->deleteEntity($entity->guid); + } + return true; + } + + /** + * Delete entity. + * + * @params = $guid = Entity guid in database + * + * @return (bool); + */ + public function deleteEntity($guid) { + if(isset($this->guid) && !empty($this->guid) && empty($guid)) { + $guid = $this->guid; + } + $params['from'] = 'ossn_entities'; + $params['wheres'] = array( + "guid = '{$guid}'" + ); + + if($this->delete($params)) { + $metadata['from'] = 'ossn_entities_metadata'; + $metadata['wheres'] = array( + "guid = '{$guid}'" + ); + $this->delete($metadata); + + $vars['entity'] = $guid; + ossn_trigger_callback('delete', 'entity', $vars); + return true; + } + return false; + } + /** + * Get subtypes from entites. + * + * @required (object)->data + * + * @return (array); + */ + private function get_data_dbvars() { + $entities = $this->get_entities(); + if($entities) { + foreach($entities as $entity) { + $vars[] = $entity->subtype; + } + return $vars; + } + return false; + } + /** + * Search entities + * + * @param array $params A valid options in format: + * 'search_type' => true(default) to performs matching on a per-character basis + * false for performs matching on exact value. + * 'subtype' => Valid entity subtype + * 'type' => Valid entity type + * 'value' => Value which you want to search + * 'owner_guid' => A valid owner guid, which results integer value + * 'limit' => Result limit default, Default is 20 values + * 'order_by' => To show result in sepcific order. There is no default order. + * + * reutrn array|false; + * + */ + public function searchEntities(array $params = array()) { + self::initAttributes(); + //set default values + $default = array( + 'search_type' => true, + 'subtype' => false, + 'type' => false, + 'value' => false, + 'owner_guid' => false, + 'limit' => false, + 'order_by' => false, + 'offset' => 1, + 'page_limit' => ossn_call_hook('pagination', 'per_page', false, 10), //call hook for page limit + 'count' => false + ); + $options = array_merge($default, $params); + $wheres = array(); + //prepare limit + $limit = $options['limit']; + + //validate offset values + if($limit !== false) { + $offset_vals = ceil($options['limit'] / $options['page_limit']); + $offset_vals = abs($offset_vals); + $offset_vals = range(1, $offset_vals); + if(!in_array($options['offset'], $offset_vals)) { + return false; + } + } + //get only required result, don't bust your server memory + $getlimit = $this->generateLimit($options['limit'], $options['page_limit'], $options['offset']); + if($getlimit) { + $options['limit'] = $getlimit; + } + + //search entities + if(!empty($options['subtype'])) { + $wheres[] = "e.subtype='{$options['subtype']}'"; + } + if(!empty($options['type'])) { + $wheres[] = "e.type='{$options['type']}'"; + } + if(!empty($options['owner_guid'])) { + $wheres[] = "e.owner_guid ='{$options['owner_guid']}'"; + } + if(!empty($options['value']) && $options['search_type'] === true) { + $wheres[] = "emd.value LIKE '%{$options['value']}%'"; + } elseif(!empty($options['value']) && $options['search_type'] === false) { + $wheres[] = "emd.value = '{$options['value']}'"; + } + $params = array(); + $params['from'] = 'ossn_entities as e'; + $params['params'] = array( + 'e.guid', + 'e.time_created', + 'e.time_updated', + 'e.permission', + 'e.active', + 'e.owner_guid', + 'emd.value', + 'e.type', + 'e.subtype' + ); + $params['joins'] = "JOIN ossn_entities_metadata as emd ON e.guid=emd.guid"; + $params['wheres'] = array( + $this->constructWheres($wheres) + ); + $params['order_by'] = $options['order_by']; + $params['limit'] = $options['limit']; + + $this->get = $this->select($params, true); + + //prepare count data; + if($options['count'] === true) { + unset($params['params']); + unset($params['limit']); + $count = array(); + $count['params'] = array( + "count(*) as total" + ); + $count = array_merge($params, $count); + return $this->select($count)->total; + } + if($this->get) { + foreach($this->get as $entity) { + //prepare entities for display + $entities[] = arrayObject($entity, $this->types[$this->type]); + } + return $entities; + } + return false; + } +} //class diff --git a/classes/OssnFile.php b/classes/OssnFile.php index 34ebfd0dc..27b69cdbf 100644 --- a/classes/OssnFile.php +++ b/classes/OssnFile.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnFile extends OssnEntities { /** diff --git a/classes/OssnMail.php b/classes/OssnMail.php index be016a838..f28190bd2 100644 --- a/classes/OssnMail.php +++ b/classes/OssnMail.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ //get phpmailer autload diff --git a/classes/OssnObject.php b/classes/OssnObject.php index 8266b5b20..5338ca41d 100644 --- a/classes/OssnObject.php +++ b/classes/OssnObject.php @@ -1,261 +1,354 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnObject extends OssnEntities { - - /** - * Initialize the objects. - * - * @return void; - */ - public function initAttributes() { - $this->OssnDatabase = new OssnDatabase; - $this->time_created = time(); - if (empty($this->subtype)) { - $this->subtype = NULL; - } - if (empty($this->order_by)) { - $this->order_by = ''; - } - } - - /** - * Create object; - * - * @requires : (object)->(owner_guid, type, subtype, title, description) - * - * @return bool; - */ - public function addObject() { - self::initAttributes(); - $params['into'] = 'ossn_object'; - $params['names'] = array( - 'owner_guid', - 'type', - 'subtype', - 'time_created', - 'title', - 'description' - ); - $params['values'] = array( - $this->owner_guid, - $this->type, - $this->subtype, - $this->time_created, - $this->title, - $this->description - ); - if ($this->OssnDatabase->insert($params)) { - $this->createdObject = $this->OssnDatabase->getLastEntry(); - if (isset($this->data) && is_object($this->data)) { - foreach ($this->data as $name => $value) { - $this->owner_guid = $this->OssnDatabase->getLastEntry(); - $this->type = 'object'; - $this->subtype = $name; - $this->value = $value; - $this->add(); - } - } - return true; - } - return false; - } - /** - * Get object by owner guid; - * - * @requires : (object)->(owner_guid) - * (object)->order_by => to sort the data in a recordset - * - * @return (object); - */ - public function getObjectByOwner() { - self::initAttributes(); - if (!empty($this->type)) { - $type = "AND type='{$this->type}'"; - } - if (!empty($this->subtype)) { - $subtype = "AND subtype='{$this->subtype}'"; - } - $params['from'] = 'ossn_object'; - $params['wheres'] = array("owner_guid='{$this->owner_guid}' {$type} {$subtype}"); - $params['order_by'] = $this->order_by; - $objects = $this->OssnDatabase->select($params, true); - if ($objects) { - foreach ($objects as $object) { - $this->owner_guid = $object->guid; - $this->subtype = ''; - $this->type = 'object'; - $this->entities = $this->get_entities(); - foreach ($this->entities as $entity) { - $fields[$entity->subtype] = $entity->value; - } - if (!empty($fields)) { - $data[] = array_merge(get_object_vars($object), $fields); - unset($fields); - } else { - $data[] = arrayObject($object, get_class($this)); - } - } - } - if (isset($data) && is_array($data)) { - return arrayObject($data, get_class($this)); - } - return false; - } - - /** - * Get object by types; - * - * @requires : (object)->(type , subtype(optional)) - * (object)->order_by => to sort the data in a recordset - * - * @return (object); - */ - public function getObjectsByTypes() { - self::initAttributes(); - if (empty($this->type)) { - return false; - } - if (!empty($this->subtype)) { - $subtype = "AND subtype='{$this->subtype}'"; - } - $params['from'] = 'ossn_object'; - $params['wheres'] = array("type='{$this->type}' {$subtype}"); - $params['order_by'] = $this->order_by; - $objects = $this->OssnDatabase->select($params, true); - if ($objects) { - foreach ($objects as $object) { - $this->owner_guid = $object->guid; - $this->subtype = ''; - $this->type = 'object'; - $this->entities = $this->get_entities(); - if ($this->entities) { - foreach ($this->entities as $entity) { - $fields[$entity->subtype] = $entity->value; - } - } - if (!empty($fields)) { - $data[] = array_merge(get_object_vars($object), $fields); - unset($fields); - } else { - $data[] = arrayObject($object, get_class($this)); - } - } //end of loop - if (isset($data) && is_array($data)) { - return arrayObject($data, get_class($this)); - } - }//end of if ($objects) - return false; - } - - /** - * Get object by object guid; - * - * @requires : (object)->(object_guid) - * - * @return (object); - */ - public function getObjectById() { - self::initAttributes(); - if (empty($this->object_guid)) { - return false; - } - $params['from'] = 'ossn_object'; - $params['wheres'] = array("guid='{$this->object_guid}'"); - $params['order_by'] = $this->order_by; - $object = $this->OssnDatabase->select($params); - - $this->owner_guid = $object->guid; - $this->subtype = ''; - $this->type = 'object'; - $this->entities = $this->get_entities(); - if ($this->entities) { - foreach ($this->entities as $entity) { - $fields[$entity->subtype] = $entity->value; - } - $data = array_merge(get_object_vars($object), $fields); - if (!empty($fields)) { - return arrayObject($data, get_class($this)); - } - } - if(empty($fields)){ - return arrayObject($object, get_class($this)); - } - return false; - } - - /** - * Get newly created object - * - * @return (int); - */ - public function getObjectId() { - if (isset($this->createdObject)) { - return $this->createdObject; - } - } - - /** - * Update Object; - * - * @params = $name => array(column names) - * $values => array(new values) - * $guid => object_guid - * (object)->data->object(update object entities) - * @param string[] $name - * @param string[] $value - * - * @return bool; - */ - public function updateObject($name, $value, $guid) { - self::initAttributes(); - $params['table'] = 'ossn_object'; - $params['names'] = $name; - $params['values'] = $value; - $params['wheres'] = array("guid='{$guid}'"); - if ($this->OssnDatabase->update($params)) { - if (isset($this->data)) { - $this->owner_guid = $guid; - $this->type = 'object'; - $this->save(); - } - return true; - } - return false; - } - - /** - * Delete object; - * - * @params = $object => object guid - * - * @return bool; - */ - public function deleteObject($object) { - self::initAttributes(); - if(isset($this->guid)){ - $object = $this->guid; - } - //delete entites of (this) object - if ($this->deleteByOwnerGuid($object, 'object')) { - $data = ossn_get_userdata("object/{$object}/"); - if (is_dir($data)) { - OssnFile::DeleteDir($data); - } + /** + * Initialize the objects. + * + * @return void; + */ + public function initAttributes() { + $this->OssnDatabase = new OssnDatabase; + $this->time_created = time(); + if(empty($this->subtype)) { + $this->subtype = NULL; + } + if(empty($this->order_by)) { + $this->order_by = ''; + } + } + + /** + * Create object; + * + * @requires : (object)->(owner_guid, type, subtype, title, description) + * + * @return bool; + */ + public function addObject() { + self::initAttributes(); + if(empty($this->owner_guid) || empty($this->type)){ + return false; + } + $params['into'] = 'ossn_object'; + $params['names'] = array( + 'owner_guid', + 'type', + 'subtype', + 'time_created', + 'title', + 'description' + ); + $params['values'] = array( + $this->owner_guid, + $this->type, + $this->subtype, + $this->time_created, + $this->title, + $this->description + ); + if($this->OssnDatabase->insert($params)) { + $this->createdObject = $this->OssnDatabase->getLastEntry(); + if(isset($this->data) && is_object($this->data)) { + foreach($this->data as $name => $value) { + $this->owner_guid = $this->OssnDatabase->getLastEntry(); + $this->type = 'object'; + $this->subtype = $name; + $this->value = $value; + $this->add(); + } + } + return true; + } + return false; + } + /** + * Get object by owner guid; + * + * @requires : (object)->(owner_guid) + * (object)->order_by => to sort the data in a recordset + * + * @return (object); + */ + public function getObjectByOwner() { + if(empty($this->type)) { + return false; + } + $params = array(); + $params['type'] = $this->type; + $params['subtype'] = $this->subtype; + $params['ower_guid'] = $this->owner_guid; + $objects = $this->searchObject($params); + if($objects) { + return $objects; + } + return false; + } + + /** + * Get object by types; + * + * @requires : (object)->(type , subtype(optional)) + * (object)->order_by => to sort the data in a recordset + * + * @return (object); + */ + public function getObjectsByTypes() { + $options = array( + 'subtype' => $this->subtype, + 'type' => $this->type, + 'owner_guid' => $this->owner_guid, + 'offset' => $this->offset, + 'order_by' => $this->order_by, + 'page_limit' => $this->page_limit, + 'count' => $this->count, + 'limit' => $this->limit + ); + $objects = $this->searchObject($options); + if($objects) { + return $objects; + } + return false; + } + + /** + * Get object by object guid; + * + * @requires : (object)->(object_guid) + * + * @return (object); + */ + public function getObjectById() { + self::initAttributes(); + if(empty($this->object_guid)) { + return false; + } + $params['from'] = 'ossn_object as o'; + $params['wheres'] = array( + "o.guid='{$this->object_guid}'" + ); + //there is no need to order as its will fetch only one record + //$params['order_by'] = $this->order_by; + unset($this->order_by); + + $object = $this->OssnDatabase->select($params); + + $this->owner_guid = $object->guid; + $this->subtype = ''; + $this->type = 'object'; + $this->entities = $this->get_entities(); + + if($this->entities) { + foreach($this->entities as $entity) { + $fields[$entity->subtype] = $entity->value; + } + $data = array_merge(get_object_vars($object), $fields); + if(!empty($fields)) { + return arrayObject($data, get_class($this)); + } + } + if(empty($fields)) { + return arrayObject($object, get_class($this)); + } + return false; + } + + /** + * Get newly created object + * + * @return (int); + */ + public function getObjectId() { + if(isset($this->createdObject)) { + return $this->createdObject; + } + } + + /** + * Update Object; + * + * @params = $name => array(column names) + * $values => array(new values) + * $guid => object_guid + * (object)->data->object(update object entities) + * @param string[] $name + * @param string[] $value + * + * @return bool; + */ + public function updateObject($name, $value, $guid) { + self::initAttributes(); + $params['table'] = 'ossn_object'; + $params['names'] = $name; + $params['values'] = $value; + $params['wheres'] = array( + "guid='{$guid}'" + ); + if($this->OssnDatabase->update($params)) { + if(isset($this->data)) { + $this->owner_guid = $guid; + $this->type = 'object'; + $this->save(); + } + return true; + } + return false; + } + + /** + * Delete object; + * + * @params = $object => object guid + * + * @return bool; + */ + public function deleteObject($object) { + self::initAttributes(); + if(isset($this->guid)) { + $object = $this->guid; + } + //delete entites of (this) object + if($this->deleteByOwnerGuid($object, 'object')) { + $data = ossn_get_userdata("object/{$object}/"); + if(is_dir($data)) { + OssnFile::DeleteDir($data); + } + } + $delete['from'] = 'ossn_object'; + $delete['wheres'] = array( + "guid='{$object}'" + ); + if($this->OssnDatabase->delete($delete)) { + return true; + } + return false; + } + /** + * Search object by its title, description etc + * + * @param array $params A valid options in format: + * 'search_type' => true(default) to performs matching on a per-character basis + * false for performs matching on exact value. + * 'subtype' => Valid object subtype + * 'type' => Valid object type + * 'title' => Valid object title + * 'description' => Valid object description + * 'owner_guid' => A valid owner guid, which results integer value + * 'limit' => Result limit default, Default is 20 values + * 'order_by' => To show result in sepcific order. There is no default order. + * + * reutrn array|false; + * + */ + public function searchObject(array $params = array()) { + self::initAttributes(); + if(empty($params)){ + return false; + } + //prepare default attributes + $default = array( + 'search_type' => true, + 'subtype' => false, + 'type' => false, + 'owner_guid' => false, + 'limit' => false, + 'order_by' => false, + 'offset' => input('offset', '', 1), + 'page_limit' => ossn_call_hook('pagination', 'page_limit', false, 10), //call hook for page limit + 'count' => false + ); + $options = array_merge($default, $params); + $wheres = array(); + + //validate offset values + if($options['limit']!== false) { + $offset_vals = ceil($options['limit'] / $options['page_limit']); + $offset_vals = abs($offset_vals); + $offset_vals = range(1, $offset_vals); + if(!in_array($options['offset'], $offset_vals)) { + return false; + } + } + //get only required result, don't bust your server memory + $getlimit = $this->generateLimit($options['limit'], $options['page_limit'], $options['offset']); + if($getlimit){ + $options['limit'] = $getlimit; + } + + if(!empty($options['object_guid'])) { + $wheres[] = "o.guid='{$options['object_guid']}'"; + } + if(!empty($options['subtype'])) { + $wheres[] = "o.subtype='{$options['subtype']}'"; + } + if(!empty($params['type'])) { + $wheres[] = "o.type='{$options['type']}'"; + } + if(!empty($params['owner_guid'])) { + $wheres[] = "o.owner_guid ='{$options['owner_guid']}'"; + } + //check if developer want to search title or description + if($options['search_type'] === true) { + if(!empty($params['title'])) { + $wheres[] = "o.title LIKE '%{$options['title']}%'"; + } + if(!empty($params['description'])) { + $wheres[] = "o.description LIKE '%{$options['description']}%'"; + } + } elseif($options['search_type'] === false) { + if(!empty($params['title'])) { + $wheres[] = "o.title = '{$options['title']}'"; + } + if(!empty($params['description'])) { + $wheres[] = "o.description = '{$options['description']}'"; + } + } + //prepare search + $params = array(); + + $params['from'] = 'ossn_object as o'; + $params['params'] = array( + 'o.guid', + 'o.time_created', + 'o.owner_guid', + 'o.description', + 'o.title', + 'o.subtype' + ); + $params['wheres'] = array( + $this->constructWheres($wheres) + ); + $params['order_by'] = $options['order_by']; + $params['limit'] = $options['limit']; + + $this->get = $this->select($params, true); + + //prepare count data; + if($options['count'] === true) { + unset($params['params']); + unset($params['limit']); + $count = array(); + $count['params'] = array( + "count(*) as total" + ); + $count = array_merge($params, $count); + return $this->select($count)->total; + } + if($this->get) { + foreach($this->get as $object) { + $this->object_guid = $object->guid; + $objects[] = $this->getObjectById(); + } + return $objects; + } + return false; } - $delete['from'] = 'ossn_object'; - $delete['wheres'] = array("guid='{$object}'"); - if($this->OssnDatabase->delete($delete)){ - return true; - } - return false; - } } diff --git a/classes/OssnPagination.php b/classes/OssnPagination.php index 8ec6bebc9..8ba76828a 100644 --- a/classes/OssnPagination.php +++ b/classes/OssnPagination.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnPagination { /** @@ -15,8 +15,11 @@ class OssnPagination { * * @return void; */ - public function __construct($ppage = 10) { - $this->ppage = (int)$ppage; + public function __construct($ppage = 10, array $options = array()) { + if(is_integer($ppage)){ + $this->ppage = (int)$ppage; + } + $this->options = $options; } /** @@ -113,10 +116,16 @@ private function getItems() { * * @return html; */ - public function pagination() { - if (!isset($this->setItem)) { + public function pagination($vars = array()) { + if (!isset($this->setItem) && !isset($vars)) { return false; } + if(!empty($vars)){ + $vars['offset'] = (int)input('offset'); + $vars['total'] = abs($vars['limit']/$vars['page_limit']); + $vars['total'] = ceil($vars['total']); + return $this->view($vars); + } $item = $this->setItem; if (is_array($item)) { $newitem = array_chunk($item, $this->ppage); @@ -148,5 +157,4 @@ private function view($params) { return ossn_view("themes/{$theme}/pagination/view", $params); } - }//CLASS diff --git a/classes/OssnSite.php b/classes/OssnSite.php index cf5cdf8af..6dd6951ae 100644 --- a/classes/OssnSite.php +++ b/classes/OssnSite.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnSite extends OssnDatabase { /** diff --git a/classes/OssnSiteException.php b/classes/OssnSiteException.php index bb237f6cb..58b6599ad 100644 --- a/classes/OssnSiteException.php +++ b/classes/OssnSiteException.php @@ -1,14 +1,14 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnSiteException extends Exception {} \ No newline at end of file diff --git a/classes/OssnThemes.php b/classes/OssnThemes.php index b6957caa7..855b21a64 100644 --- a/classes/OssnThemes.php +++ b/classes/OssnThemes.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnThemes extends OssnSite { /** diff --git a/classes/OssnTranslit.php b/classes/OssnTranslit.php new file mode 100644 index 000000000..6ff9326c6 --- /dev/null +++ b/classes/OssnTranslit.php @@ -0,0 +1,271 @@ + + * + * For creating "friendly titles" for URLs + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * and is licensed under the LGPL. For more information, see + * . + * + * @package + * @author Elgg + * @author Konsta Vesterinen + * @author Jonathan H. Wage + * @author Steve Clay + * + * @access private Components authors should not use this directly + */ +class OssnTranslit { + + /** + * Create a version of a string for embedding in a URL + * + * @param string $string A UTF-8 string + * @param string $separator The character to separate words with + * @return string + */ + static public function urlize($string, $separator = '-') { + // Iñtërnâtiônàlizætiøn, AND 日本語! + + // try to force combined chars because the translit map and others expect it + if (self::hasNormalizerSupport()) { + $nfc = normalizer_normalize($string); + if (is_string($nfc)) { + $string = $nfc; + } + } + // Internationalization, AND 日本語! + $string = self::transliterateAscii($string); + + // allow HTML tags in titles + $string = preg_replace('~<([a-zA-Z][^>]*)>~', ' $1 ', $string); + + // more substitutions + // @todo put these somewhere else + $string = strtr($string, array( + // currency + "\xE2\x82\xAC" /* € */ => ' E ', + "\xC2\xA3" /* £ */ => ' GBP ', + )); + + // remove all ASCII except 0-9a-zA-Z, hyphen, underscore, and whitespace + // note: "x" modifier did not work with this pattern. + $string = preg_replace('~[' + . '\x00-\x08' // control chars + . '\x0b\x0c' // vert tab, form feed + . '\x0e-\x1f' // control chars + . '\x21-\x2c' // ! ... , + . '\x2e\x2f' // . slash + . '\x3a-\x40' // : ... @ + . '\x5b-\x5e' // [ ... ^ + . '\x60' // ` + . '\x7b-\x7f' // { ... DEL + . ']~', '', $string); + $string = strtr($string, '', ''); + + // internationalization, and 日本語! + // note: not using elgg_strtolower to keep this class portable + $string = is_callable('mb_strtolower') ? mb_strtolower($string, 'UTF-8') : strtolower($string); + + // split by ASCII chars not in 0-9a-zA-Z + // note: we cannot use [^0-9a-zA-Z] because that matches multibyte chars. + // note: "x" modifier did not work with this pattern. + $pattern = '~[' + . '\x00-\x2f' // controls ... slash + . '\x3a-\x40' // : ... @ + . '\x5b-\x60' // [ ... ` + . '\x7b-\x7f' // { ... DEL + . ']+~x'; + + // ['internationalization', 'and', '日本語'] + $words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY); + + // ['internationalization', 'and', '%E6%97%A5%E6%9C%AC%E8%AA%9E'] + $words = array_map('urlencode', $words); + + // internationalization-and-%E6%97%A5%E6%9C%AC%E8%AA%9E + return implode($separator, $words); + } + + /** + * Transliterate Western multibyte chars to ASCII + * + * @param string $utf8 a UTF-8 string + * @return string + */ + static public function transliterateAscii($utf8) { + static $map = null; + if (!preg_match('/[\x80-\xff]/', $utf8)) { + return $utf8; + } + if (null === $map) { + $map = self::getAsciiTranslitMap(); + } + return strtr($utf8, $map); + } + + /** + * Get array of UTF-8 (NFC) character replacements. + * + * @return array + */ + static public function getAsciiTranslitMap() { + return array( + // Decompositions for Latin-1 Supplement + "\xC2\xAA" /* ª */ => 'a', "\xC2\xBA" /* º */ => 'o', "\xC3\x80" /* À */ => 'A', + "\xC3\x81" /* Á */ => 'A', "\xC3\x82" /*  */ => 'A', "\xC3\x83" /* à */ => 'A', + "\xC3\x84" /* Ä */ => 'A', "\xC3\x85" /* Å */ => 'A', "\xC3\x86" /* Æ */ => 'AE', + "\xC3\x87" /* Ç */ => 'C', "\xC3\x88" /* È */ => 'E', "\xC3\x89" /* É */ => 'E', + "\xC3\x8A" /* Ê */ => 'E', "\xC3\x8B" /* Ë */ => 'E', "\xC3\x8C" /* Ì */ => 'I', + "\xC3\x8D" /* Í */ => 'I', "\xC3\x8E" /* Î */ => 'I', "\xC3\x8F" /* Ï */ => 'I', + "\xC3\x90" /* Ð */ => 'D', "\xC3\x91" /* Ñ */ => 'N', "\xC3\x92" /* Ò */ => 'O', + "\xC3\x93" /* Ó */ => 'O', "\xC3\x94" /* Ô */ => 'O', "\xC3\x95" /* Õ */ => 'O', + "\xC3\x96" /* Ö */ => 'O', "\xC3\x99" /* Ù */ => 'U', "\xC3\x9A" /* Ú */ => 'U', + "\xC3\x9B" /* Û */ => 'U', "\xC3\x9C" /* Ü */ => 'U', "\xC3\x9D" /* Ý */ => 'Y', + "\xC3\x9E" /* Þ */ => 'TH', "\xC3\x9F" /* ß */ => 'ss', "\xC3\xA0" /* à */ => 'a', + "\xC3\xA1" /* á */ => 'a', "\xC3\xA2" /* â */ => 'a', "\xC3\xA3" /* ã */ => 'a', + "\xC3\xA4" /* ä */ => 'a', "\xC3\xA5" /* å */ => 'a', "\xC3\xA6" /* æ */ => 'ae', + "\xC3\xA7" /* ç */ => 'c', "\xC3\xA8" /* è */ => 'e', "\xC3\xA9" /* é */ => 'e', + "\xC3\xAA" /* ê */ => 'e', "\xC3\xAB" /* ë */ => 'e', "\xC3\xAC" /* ì */ => 'i', + "\xC3\xAD" /* í */ => 'i', "\xC3\xAE" /* î */ => 'i', "\xC3\xAF" /* ï */ => 'i', + "\xC3\xB0" /* ð */ => 'd', "\xC3\xB1" /* ñ */ => 'n', "\xC3\xB2" /* ò */ => 'o', + "\xC3\xB3" /* ó */ => 'o', "\xC3\xB4" /* ô */ => 'o', "\xC3\xB5" /* õ */ => 'o', + "\xC3\xB6" /* ö */ => 'o', "\xC3\xB8" /* ø */ => 'o', "\xC3\xB9" /* ù */ => 'u', + "\xC3\xBA" /* ú */ => 'u', "\xC3\xBB" /* û */ => 'u', "\xC3\xBC" /* ü */ => 'u', + "\xC3\xBD" /* ý */ => 'y', "\xC3\xBE" /* þ */ => 'th', "\xC3\xBF" /* ÿ */ => 'y', + "\xC3\x98" /* Ø */ => 'O', + // Decompositions for Latin Extended-A + "\xC4\x80" /* Ā */ => 'A', "\xC4\x81" /* ā */ => 'a', "\xC4\x82" /* Ă */ => 'A', + "\xC4\x83" /* ă */ => 'a', "\xC4\x84" /* Ą */ => 'A', "\xC4\x85" /* ą */ => 'a', + "\xC4\x86" /* Ć */ => 'C', "\xC4\x87" /* ć */ => 'c', "\xC4\x88" /* Ĉ */ => 'C', + "\xC4\x89" /* ĉ */ => 'c', "\xC4\x8A" /* Ċ */ => 'C', "\xC4\x8B" /* ċ */ => 'c', + "\xC4\x8C" /* Č */ => 'C', "\xC4\x8D" /* č */ => 'c', "\xC4\x8E" /* Ď */ => 'D', + "\xC4\x8F" /* ď */ => 'd', "\xC4\x90" /* Đ */ => 'D', "\xC4\x91" /* đ */ => 'd', + "\xC4\x92" /* Ē */ => 'E', "\xC4\x93" /* ē */ => 'e', "\xC4\x94" /* Ĕ */ => 'E', + "\xC4\x95" /* ĕ */ => 'e', "\xC4\x96" /* Ė */ => 'E', "\xC4\x97" /* ė */ => 'e', + "\xC4\x98" /* Ę */ => 'E', "\xC4\x99" /* ę */ => 'e', "\xC4\x9A" /* Ě */ => 'E', + "\xC4\x9B" /* ě */ => 'e', "\xC4\x9C" /* Ĝ */ => 'G', "\xC4\x9D" /* ĝ */ => 'g', + "\xC4\x9E" /* Ğ */ => 'G', "\xC4\x9F" /* ğ */ => 'g', "\xC4\xA0" /* Ġ */ => 'G', + "\xC4\xA1" /* ġ */ => 'g', "\xC4\xA2" /* Ģ */ => 'G', "\xC4\xA3" /* ģ */ => 'g', + "\xC4\xA4" /* Ĥ */ => 'H', "\xC4\xA5" /* ĥ */ => 'h', "\xC4\xA6" /* Ħ */ => 'H', + "\xC4\xA7" /* ħ */ => 'h', "\xC4\xA8" /* Ĩ */ => 'I', "\xC4\xA9" /* ĩ */ => 'i', + "\xC4\xAA" /* Ī */ => 'I', "\xC4\xAB" /* ī */ => 'i', "\xC4\xAC" /* Ĭ */ => 'I', + "\xC4\xAD" /* ĭ */ => 'i', "\xC4\xAE" /* Į */ => 'I', "\xC4\xAF" /* į */ => 'i', + "\xC4\xB0" /* İ */ => 'I', "\xC4\xB1" /* ı */ => 'i', "\xC4\xB2" /* IJ */ => 'IJ', + "\xC4\xB3" /* ij */ => 'ij', "\xC4\xB4" /* Ĵ */ => 'J', "\xC4\xB5" /* ĵ */ => 'j', + "\xC4\xB6" /* Ķ */ => 'K', "\xC4\xB7" /* ķ */ => 'k', "\xC4\xB8" /* ĸ */ => 'k', + "\xC4\xB9" /* Ĺ */ => 'L', "\xC4\xBA" /* ĺ */ => 'l', "\xC4\xBB" /* Ļ */ => 'L', + "\xC4\xBC" /* ļ */ => 'l', "\xC4\xBD" /* Ľ */ => 'L', "\xC4\xBE" /* ľ */ => 'l', + "\xC4\xBF" /* Ŀ */ => 'L', "\xC5\x80" /* ŀ */ => 'l', "\xC5\x81" /* Ł */ => 'L', + "\xC5\x82" /* ł */ => 'l', "\xC5\x83" /* Ń */ => 'N', "\xC5\x84" /* ń */ => 'n', + "\xC5\x85" /* Ņ */ => 'N', "\xC5\x86" /* ņ */ => 'n', "\xC5\x87" /* Ň */ => 'N', + "\xC5\x88" /* ň */ => 'n', "\xC5\x89" /* ʼn */ => 'N', "\xC5\x8A" /* Ŋ */ => 'n', + "\xC5\x8B" /* ŋ */ => 'N', "\xC5\x8C" /* Ō */ => 'O', "\xC5\x8D" /* ō */ => 'o', + "\xC5\x8E" /* Ŏ */ => 'O', "\xC5\x8F" /* ŏ */ => 'o', "\xC5\x90" /* Ő */ => 'O', + "\xC5\x91" /* ő */ => 'o', "\xC5\x92" /* Œ */ => 'OE', "\xC5\x93" /* œ */ => 'oe', + "\xC5\x94" /* Ŕ */ => 'R', "\xC5\x95" /* ŕ */ => 'r', "\xC5\x96" /* Ŗ */ => 'R', + "\xC5\x97" /* ŗ */ => 'r', "\xC5\x98" /* Ř */ => 'R', "\xC5\x99" /* ř */ => 'r', + "\xC5\x9A" /* Ś */ => 'S', "\xC5\x9B" /* ś */ => 's', "\xC5\x9C" /* Ŝ */ => 'S', + "\xC5\x9D" /* ŝ */ => 's', "\xC5\x9E" /* Ş */ => 'S', "\xC5\x9F" /* ş */ => 's', + "\xC5\xA0" /* Š */ => 'S', "\xC5\xA1" /* š */ => 's', "\xC5\xA2" /* Ţ */ => 'T', + "\xC5\xA3" /* ţ */ => 't', "\xC5\xA4" /* Ť */ => 'T', "\xC5\xA5" /* ť */ => 't', + "\xC5\xA6" /* Ŧ */ => 'T', "\xC5\xA7" /* ŧ */ => 't', "\xC5\xA8" /* Ũ */ => 'U', + "\xC5\xA9" /* ũ */ => 'u', "\xC5\xAA" /* Ū */ => 'U', "\xC5\xAB" /* ū */ => 'u', + "\xC5\xAC" /* Ŭ */ => 'U', "\xC5\xAD" /* ŭ */ => 'u', "\xC5\xAE" /* Ů */ => 'U', + "\xC5\xAF" /* ů */ => 'u', "\xC5\xB0" /* Ű */ => 'U', "\xC5\xB1" /* ű */ => 'u', + "\xC5\xB2" /* Ų */ => 'U', "\xC5\xB3" /* ų */ => 'u', "\xC5\xB4" /* Ŵ */ => 'W', + "\xC5\xB5" /* ŵ */ => 'w', "\xC5\xB6" /* Ŷ */ => 'Y', "\xC5\xB7" /* ŷ */ => 'y', + "\xC5\xB8" /* Ÿ */ => 'Y', "\xC5\xB9" /* Ź */ => 'Z', "\xC5\xBA" /* ź */ => 'z', + "\xC5\xBB" /* Ż */ => 'Z', "\xC5\xBC" /* ż */ => 'z', "\xC5\xBD" /* Ž */ => 'Z', + "\xC5\xBE" /* ž */ => 'z', "\xC5\xBF" /* ſ */ => 's', + // Decompositions for Latin Extended-B + "\xC8\x98" /* Ș */ => 'S', "\xC8\x99" /* ș */ => 's', + "\xC8\x9A" /* Ț */ => 'T', "\xC8\x9B" /* ț */ => 't', + // unmarked + "\xC6\xA0" /* Ơ */ => 'O', "\xC6\xA1" /* ơ */ => 'o', + "\xC6\xAF" /* Ư */ => 'U', "\xC6\xB0" /* ư */ => 'u', + // grave accent + "\xE1\xBA\xA6" /* Ầ */ => 'A', "\xE1\xBA\xA7" /* ầ */ => 'a', + "\xE1\xBA\xB0" /* Ằ */ => 'A', "\xE1\xBA\xB1" /* ằ */ => 'a', + "\xE1\xBB\x80" /* Ề */ => 'E', "\xE1\xBB\x81" /* ề */ => 'e', + "\xE1\xBB\x92" /* Ồ */ => 'O', "\xE1\xBB\x93" /* ồ */ => 'o', + "\xE1\xBB\x9C" /* Ờ */ => 'O', "\xE1\xBB\x9D" /* ờ */ => 'o', + "\xE1\xBB\xAA" /* Ừ */ => 'U', "\xE1\xBB\xAB" /* ừ */ => 'u', + "\xE1\xBB\xB2" /* Ỳ */ => 'Y', "\xE1\xBB\xB3" /* ỳ */ => 'y', + // hook + "\xE1\xBA\xA2" /* Ả */ => 'A', "\xE1\xBA\xA3" /* ả */ => 'a', + "\xE1\xBA\xA8" /* Ẩ */ => 'A', "\xE1\xBA\xA9" /* ẩ */ => 'a', + "\xE1\xBA\xB2" /* Ẳ */ => 'A', "\xE1\xBA\xB3" /* ẳ */ => 'a', + "\xE1\xBA\xBA" /* Ẻ */ => 'E', "\xE1\xBA\xBB" /* ẻ */ => 'e', + "\xE1\xBB\x82" /* Ể */ => 'E', "\xE1\xBB\x83" /* ể */ => 'e', + "\xE1\xBB\x88" /* Ỉ */ => 'I', "\xE1\xBB\x89" /* ỉ */ => 'i', + "\xE1\xBB\x8E" /* Ỏ */ => 'O', "\xE1\xBB\x8F" /* ỏ */ => 'o', + "\xE1\xBB\x94" /* Ổ */ => 'O', "\xE1\xBB\x95" /* ổ */ => 'o', + "\xE1\xBB\x9E" /* Ở */ => 'O', "\xE1\xBB\x9F" /* ở */ => 'o', + "\xE1\xBB\xA6" /* Ủ */ => 'U', "\xE1\xBB\xA7" /* ủ */ => 'u', + "\xE1\xBB\xAC" /* Ử */ => 'U', "\xE1\xBB\xAD" /* ử */ => 'u', + "\xE1\xBB\xB6" /* Ỷ */ => 'Y', "\xE1\xBB\xB7" /* ỷ */ => 'y', + // tilde + "\xE1\xBA\xAA" /* Ẫ */ => 'A', "\xE1\xBA\xAB" /* ẫ */ => 'a', + "\xE1\xBA\xB4" /* Ẵ */ => 'A', "\xE1\xBA\xB5" /* ẵ */ => 'a', + "\xE1\xBA\xBC" /* Ẽ */ => 'E', "\xE1\xBA\xBD" /* ẽ */ => 'e', + "\xE1\xBB\x84" /* Ễ */ => 'E', "\xE1\xBB\x85" /* ễ */ => 'e', + "\xE1\xBB\x96" /* Ỗ */ => 'O', "\xE1\xBB\x97" /* ỗ */ => 'o', + "\xE1\xBB\xA0" /* Ỡ */ => 'O', "\xE1\xBB\xA1" /* ỡ */ => 'o', + "\xE1\xBB\xAE" /* Ữ */ => 'U', "\xE1\xBB\xAF" /* ữ */ => 'u', + "\xE1\xBB\xB8" /* Ỹ */ => 'Y', "\xE1\xBB\xB9" /* ỹ */ => 'y', + // acute accent + "\xE1\xBA\xA4" /* Ấ */ => 'A', "\xE1\xBA\xA5" /* ấ */ => 'a', + "\xE1\xBA\xAE" /* Ắ */ => 'A', "\xE1\xBA\xAF" /* ắ */ => 'a', + "\xE1\xBA\xBE" /* Ế */ => 'E', "\xE1\xBA\xBF" /* ế */ => 'e', + "\xE1\xBB\x90" /* Ố */ => 'O', "\xE1\xBB\x91" /* ố */ => 'o', + "\xE1\xBB\x9A" /* Ớ */ => 'O', "\xE1\xBB\x9B" /* ớ */ => 'o', + "\xE1\xBB\xA8" /* Ứ */ => 'U', "\xE1\xBB\xA9" /* ứ */ => 'u', + // dot below + "\xE1\xBA\xA0" /* Ạ */ => 'A', "\xE1\xBA\xA1" /* ạ */ => 'a', + "\xE1\xBA\xAC" /* Ậ */ => 'A', "\xE1\xBA\xAD" /* ậ */ => 'a', + "\xE1\xBA\xB6" /* Ặ */ => 'A', "\xE1\xBA\xB7" /* ặ */ => 'a', + "\xE1\xBA\xB8" /* Ẹ */ => 'E', "\xE1\xBA\xB9" /* ẹ */ => 'e', + "\xE1\xBB\x86" /* Ệ */ => 'E', "\xE1\xBB\x87" /* ệ */ => 'e', + "\xE1\xBB\x8A" /* Ị */ => 'I', "\xE1\xBB\x8B" /* ị */ => 'i', + "\xE1\xBB\x8C" /* Ọ */ => 'O', "\xE1\xBB\x8D" /* ọ */ => 'o', + "\xE1\xBB\x98" /* Ộ */ => 'O', "\xE1\xBB\x99" /* ộ */ => 'o', + "\xE1\xBB\xA2" /* Ợ */ => 'O', "\xE1\xBB\xA3" /* ợ */ => 'o', + "\xE1\xBB\xA4" /* Ụ */ => 'U', "\xE1\xBB\xA5" /* ụ */ => 'u', + "\xE1\xBB\xB0" /* Ự */ => 'U', "\xE1\xBB\xB1" /* ự */ => 'u', + "\xE1\xBB\xB4" /* Ỵ */ => 'Y', "\xE1\xBB\xB5" /* ỵ */ => 'y', + ); + } + + /** + * Tests that "normalizer_normalize" exists and works + * + * @return bool + */ + static public function hasNormalizerSupport() { + static $ret = null; + if (null === $ret) { + $form_c = "\xC3\x85"; // 'LATIN CAPITAL LETTER A WITH RING ABOVE' (U+00C5) + $form_d = "A\xCC\x8A"; // A followed by 'COMBINING RING ABOVE' (U+030A) + $ret = (function_exists('normalizer_normalize') + && $form_c === normalizer_normalize($form_d)); + } + return $ret; + } +} diff --git a/classes/OssnUser.php b/classes/OssnUser.php index 313aa3894..31c241964 100644 --- a/classes/OssnUser.php +++ b/classes/OssnUser.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnUser extends OssnEntities { /** @@ -25,10 +25,10 @@ public function addUser() { $this->salt = $this->generateSalt(); $password = $this->generate_password($this->password, $this->salt); $activation = md5($this->password . time() . rand()); - $this->sendactiviation = ossn_call_hook('user', 'send:activation', false, $this->sendactiviation); + $this->sendactiviation = ossn_call_hook('user', 'send:activation', false, $this->sendactiviation); if ($this->sendactiviation === false) { //don't set null , set empty value for users created by admin - $activation = ''; + $activation = ''; } $params['into'] = 'ossn_users'; $params['names'] = array( @@ -67,7 +67,7 @@ public function addUser() { } if ($this->sendactiviation === true) { $link = ossn_site_url("uservalidate/activate/{$guid}/{$activation}"); - $link = ossn_call_hook('user', 'validation:email:url', $this, $link); + $link = ossn_call_hook('user', 'validation:email:url', $this, $link); $sitename = ossn_site_settings('site_name'); $activation = ossn_print('ossn:add:user:mail:body', array( $sitename, diff --git a/components/OssnAds/actions/add.php b/components/OssnAds/actions/add.php index b4aa8fc2a..026e86a69 100644 --- a/components/OssnAds/actions/add.php +++ b/components/OssnAds/actions/add.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $add = new OssnAds; diff --git a/components/OssnAds/actions/delete.php b/components/OssnAds/actions/delete.php index 6ab9229db..b78883dfc 100644 --- a/components/OssnAds/actions/delete.php +++ b/components/OssnAds/actions/delete.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $delete = new OssnAds; $entites = $_REQUEST['entites']; diff --git a/components/OssnAds/actions/edit.php b/components/OssnAds/actions/edit.php index 9905a96a6..5d0e4346f 100644 --- a/components/OssnAds/actions/edit.php +++ b/components/OssnAds/actions/edit.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $edit = new OssnAds; diff --git a/components/OssnAds/classes/OssnAds.php b/components/OssnAds/classes/OssnAds.php index 619058301..9cfd56f4d 100644 --- a/components/OssnAds/classes/OssnAds.php +++ b/components/OssnAds/classes/OssnAds.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnAds extends OssnObject { /** diff --git a/components/OssnAds/locale/ossn.de.php b/components/OssnAds/locale/ossn.de.php index d696b77ec..f7873403b 100644 --- a/components/OssnAds/locale/ossn.de.php +++ b/components/OssnAds/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'ossnads' => 'Anzeigen-Verwaltung', diff --git a/components/OssnAds/locale/ossn.en.php b/components/OssnAds/locale/ossn.en.php index dae856b4d..0266fce41 100644 --- a/components/OssnAds/locale/ossn.en.php +++ b/components/OssnAds/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'ossnads' => 'Ads Manager', diff --git a/components/OssnAds/ossn_com.php b/components/OssnAds/ossn_com.php index 3898a4a45..a3a8ac4ed 100644 --- a/components/OssnAds/ossn_com.php +++ b/components/OssnAds/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_ADS__', ossn_route()->com . 'OssnAds/'); require_once(__OSSN_ADS__ . 'classes/OssnAds.php'); @@ -25,8 +25,8 @@ function ossn_ads() { } ossn_register_page('ossnads', 'ossn_ads_handler'); - ossn_extend_view('css/ossn.default', 'components/OssnAds/css/ads'); - ossn_extend_view('css/ossn.admin.default', 'components/OssnAds/css/ads.admin'); + ossn_extend_view('css/ossn.default', 'css/ads'); + ossn_extend_view('css/ossn.admin.default', 'css/ads.admin'); } /** diff --git a/components/OssnAds/ossn_com.xml b/components/OssnAds/ossn_com.xml index c27828564..8e0f55c69 100644 --- a/components/OssnAds/ossn_com.xml +++ b/components/OssnAds/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnAds Core Team Create a profile page for users. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnAds/page/view.php b/components/OssnAds/plugins/default/ads/page/view.php similarity index 81% rename from components/OssnAds/page/view.php rename to components/OssnAds/plugins/default/ads/page/view.php index 716d02c8e..2fd513a20 100644 --- a/components/OssnAds/page/view.php +++ b/components/OssnAds/plugins/default/ads/page/view.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $ads = new OssnAds; $ads = $ads->getAds(); diff --git a/components/OssnAds/page/view_small.php b/components/OssnAds/plugins/default/ads/page/view_small.php similarity index 83% rename from components/OssnAds/page/view_small.php rename to components/OssnAds/plugins/default/ads/page/view_small.php index f94f8ecd6..411eda12d 100644 --- a/components/OssnAds/page/view_small.php +++ b/components/OssnAds/plugins/default/ads/page/view_small.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $ads = new OssnAds; $ads = $ads->getAds(); diff --git a/components/OssnAds/pages/add.php b/components/OssnAds/plugins/default/ads/pages/add.php similarity index 63% rename from components/OssnAds/pages/add.php rename to components/OssnAds/plugins/default/ads/pages/add.php index 7f06ad09e..5d75c9ab3 100644 --- a/components/OssnAds/pages/add.php +++ b/components/OssnAds/plugins/default/ads/pages/add.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ echo ossn_view_form('add', array( 'action' => ossn_site_url() . 'action/ossnads/add', diff --git a/components/OssnAds/pages/edit.php b/components/OssnAds/plugins/default/ads/pages/edit.php similarity index 64% rename from components/OssnAds/pages/edit.php rename to components/OssnAds/plugins/default/ads/pages/edit.php index cef00b96e..804d78c74 100644 --- a/components/OssnAds/pages/edit.php +++ b/components/OssnAds/plugins/default/ads/pages/edit.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ echo ossn_view_form('edit', array( 'action' => ossn_site_url() . 'action/ossnads/edit', diff --git a/components/OssnAds/pages/list.php b/components/OssnAds/plugins/default/ads/pages/list.php similarity index 61% rename from components/OssnAds/pages/list.php rename to components/OssnAds/plugins/default/ads/pages/list.php index dac056938..a0f7e6c40 100644 --- a/components/OssnAds/pages/list.php +++ b/components/OssnAds/plugins/default/ads/pages/list.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ echo ossn_view_form('list', array( 'action' => ossn_site_url() . 'action/ossnads/delete', diff --git a/components/OssnAds/pages/view.php b/components/OssnAds/plugins/default/ads/pages/view.php similarity index 73% rename from components/OssnAds/pages/view.php rename to components/OssnAds/plugins/default/ads/pages/view.php index 8e6c4aa6b..57251affb 100644 --- a/components/OssnAds/pages/view.php +++ b/components/OssnAds/plugins/default/ads/pages/view.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>

    title;?>

    diff --git a/components/OssnAds/css/ads.admin.php b/components/OssnAds/plugins/default/css/ads.admin.php similarity index 100% rename from components/OssnAds/css/ads.admin.php rename to components/OssnAds/plugins/default/css/ads.admin.php diff --git a/components/OssnAds/css/ads.php b/components/OssnAds/plugins/default/css/ads.php similarity index 100% rename from components/OssnAds/css/ads.php rename to components/OssnAds/plugins/default/css/ads.php diff --git a/components/OssnAds/forms/add.php b/components/OssnAds/plugins/default/forms/OssnAds/add.php similarity index 77% rename from components/OssnAds/forms/add.php rename to components/OssnAds/plugins/default/forms/OssnAds/add.php index b29c0026e..e71d6aa7d 100644 --- a/components/OssnAds/forms/add.php +++ b/components/OssnAds/plugins/default/forms/OssnAds/add.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?> diff --git a/components/OssnAds/forms/edit.php b/components/OssnAds/plugins/default/forms/OssnAds/edit.php similarity index 84% rename from components/OssnAds/forms/edit.php rename to components/OssnAds/plugins/default/forms/OssnAds/edit.php index aeab7eefc..3628883e5 100644 --- a/components/OssnAds/forms/edit.php +++ b/components/OssnAds/plugins/default/forms/OssnAds/edit.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?> diff --git a/components/OssnAds/forms/list.php b/components/OssnAds/plugins/default/forms/OssnAds/list.php similarity index 90% rename from components/OssnAds/forms/list.php rename to components/OssnAds/plugins/default/forms/OssnAds/list.php index 8b198c94f..e1a9ba154 100644 --- a/components/OssnAds/forms/list.php +++ b/components/OssnAds/plugins/default/forms/OssnAds/list.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $ads = new OssnAds; diff --git a/components/OssnAds/administrator/settings.php b/components/OssnAds/plugins/default/settings/administrator/OssnAds/settings.php similarity index 61% rename from components/OssnAds/administrator/settings.php rename to components/OssnAds/plugins/default/settings/administrator/OssnAds/settings.php index f15773e7b..845168483 100644 --- a/components/OssnAds/administrator/settings.php +++ b/components/OssnAds/plugins/default/settings/administrator/OssnAds/settings.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $settings = input('settings'); if (empty($settings)) { @@ -14,17 +14,17 @@ } switch ($settings) { case 'list': - echo ossn_view('components/OssnAds/pages/list'); + echo ossn_plugin_view('ads/pages/list'); break; case 'add': - echo ossn_view('components/OssnAds/pages/add'); + echo ossn_plugin_view('ads/pages/add'); break; case 'edit': $id = input('id'); if(!empty($id)){ $ads = new OssnAds; $params['entity'] = $ads->getAd($id); - echo ossn_view('components/OssnAds/pages/edit', $params); + echo ossn_plugin_view('ads/pages/edit', $params); } break; //missing 'view' case - 'Browse' didn't work #233 @@ -33,7 +33,7 @@ if(!empty($id)){ $ads = new OssnAds; $params['entity'] = $ads->getAd($id); - echo ossn_view('components/OssnAds/pages/view', $params); + echo ossn_plugin_view('ads/pages/view', $params); } break; default: diff --git a/components/OssnBlock/actions/user/block.php b/components/OssnBlock/actions/user/block.php index 277640d52..8eb2b2956 100644 --- a/components/OssnBlock/actions/user/block.php +++ b/components/OssnBlock/actions/user/block.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $block = new OssnBlock; $user = input('user'); diff --git a/components/OssnBlock/actions/user/unblock.php b/components/OssnBlock/actions/user/unblock.php index 3252e9158..feb5f0797 100644 --- a/components/OssnBlock/actions/user/unblock.php +++ b/components/OssnBlock/actions/user/unblock.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $block = new OssnBlock; $user = input('user'); diff --git a/components/OssnBlock/classes/OssnBlock.php b/components/OssnBlock/classes/OssnBlock.php index 293c3ac72..89391fb82 100644 --- a/components/OssnBlock/classes/OssnBlock.php +++ b/components/OssnBlock/classes/OssnBlock.php @@ -3,11 +3,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ class OssnBlock extends OssnEntities { /** diff --git a/components/OssnBlock/locale/ossn.de.php b/components/OssnBlock/locale/ossn.de.php index 0d6d20c86..f0515388f 100644 --- a/components/OssnBlock/locale/ossn.de.php +++ b/components/OssnBlock/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'user:blocked' => 'Der Benutzer wurde geblockt', diff --git a/components/OssnBlock/locale/ossn.en.php b/components/OssnBlock/locale/ossn.en.php index 4f665c4e2..026ad3aba 100644 --- a/components/OssnBlock/locale/ossn.en.php +++ b/components/OssnBlock/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'user:blocked' => 'User has been blocked!', diff --git a/components/OssnBlock/ossn_com.php b/components/OssnBlock/ossn_com.php index 882d68e3d..cc7bbbe17 100644 --- a/components/OssnBlock/ossn_com.php +++ b/components/OssnBlock/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ /* Define Paths */ diff --git a/components/OssnBlock/ossn_com.xml b/components/OssnBlock/ossn_com.xml index 3c55afc9f..ab56894f1 100644 --- a/components/OssnBlock/ossn_com.xml +++ b/components/OssnBlock/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnBlock Core Team Allow users to block each other. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnChat/actions/markread.php b/components/OssnChat/actions/markread.php index 41c416f57..df450ad27 100644 --- a/components/OssnChat/actions/markread.php +++ b/components/OssnChat/actions/markread.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $friend = input('fid'); if (!empty($friend)) { diff --git a/components/OssnChat/actions/message/send.php b/components/OssnChat/actions/message/send.php index 0a206151e..6df74c8da 100644 --- a/components/OssnChat/actions/message/send.php +++ b/components/OssnChat/actions/message/send.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $message = input('message'); @@ -23,7 +23,7 @@ $vars['time'] = time(); echo json_encode(array( 'type' => 1, - 'message' => ossn_view('components/OssnChat/views/OssnChat/message-item-send', $vars), + 'message' => ossn_plugin_view('chat/message-item-send', $vars), )); } else { echo json_encode(array('type' => 0)); diff --git a/components/OssnChat/classes/OssnChat.php b/components/OssnChat/classes/OssnChat.php index bac4f4703..0a6c7d716 100644 --- a/components/OssnChat/classes/OssnChat.php +++ b/components/OssnChat/classes/OssnChat.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ class OssnChat extends OssnDatabase { /** diff --git a/components/OssnChat/libs/ossn.lib.chat.php b/components/OssnChat/libs/ossn.lib.chat.php index f40247fc0..519e57944 100644 --- a/components/OssnChat/libs/ossn.lib.chat.php +++ b/components/OssnChat/libs/ossn.lib.chat.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ function ossn_chat() { diff --git a/components/OssnChat/locale/ossn.de.php b/components/OssnChat/locale/ossn.de.php index 23940cde2..c9827b5ef 100644 --- a/components/OssnChat/locale/ossn.de.php +++ b/components/OssnChat/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'ossn:chat:no:friend:online' => 'Niemand da', diff --git a/components/OssnChat/locale/ossn.en.php b/components/OssnChat/locale/ossn.en.php index 555987f16..5d2fbfaeb 100644 --- a/components/OssnChat/locale/ossn.en.php +++ b/components/OssnChat/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'ossn:chat:no:friend:online' => 'No one is online', diff --git a/components/OssnChat/ossn_com.php b/components/OssnChat/ossn_com.php index 523ee8521..5594f7fb3 100644 --- a/components/OssnChat/ossn_com.php +++ b/components/OssnChat/ossn_com.php @@ -2,25 +2,25 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_CHAT__', ossn_route()->com . 'OssnChat/'); require_once(__OSSN_CHAT__ . 'classes/OssnChat.php'); require_once(__OSSN_CHAT__ . 'libs/ossn.lib.chat.php'); function ossn_chat_init() { - ossn_extend_view('css/ossn.default', 'components/OssnChat/css/OssnChat'); + ossn_extend_view('css/ossn.default', 'css/OssnChat'); - ossn_new_js('ossn.chat', 'components/OssnChat/js/OssnChat'); + ossn_new_js('ossn.chat', 'js/OssnChat'); ossn_load_js('ossn.chat'); //chat bar if (ossn_isLoggedIn()) { - ossn_extend_view('ossn/page/footer', 'components/OssnChat/views/OssnChat/chatbar'); + ossn_extend_view('ossn/page/footer', 'chat/chatbar'); } ossn_register_page('ossnchat', 'ossn_js_page_handler'); @@ -46,7 +46,7 @@ function ossn_js_page_handler($pages) { $user = ossn_user_by_guid($user); OssnChat::setUserChatSession($user); $friend['user'] = $user; - echo ossn_view('components/OssnChat/views/OssnChat/selectfriend', $friend); + echo ossn_plugin_view('chat/selectfriend', $friend); } break; default: diff --git a/components/OssnChat/ossn_com.xml b/components/OssnChat/ossn_com.xml index dbc9f8a8b..5ee272c7a 100644 --- a/components/OssnChat/ossn_com.xml +++ b/components/OssnChat/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnChat Core Team Allow users to chat with each other. GPL V2 http://www.informatikon.com/ - http://www.opensource-socialnetwork.org/licence + http://www.Open Source Social Network.org/licence 1.0 \ No newline at end of file diff --git a/components/OssnChat/views/OssnChat/chatbar.php b/components/OssnChat/plugins/default/chat/chatbar.php similarity index 68% rename from components/OssnChat/views/OssnChat/chatbar.php rename to components/OssnChat/plugins/default/chat/chatbar.php index 868cc60ab..c7cbdabb0 100644 --- a/components/OssnChat/views/OssnChat/chatbar.php +++ b/components/OssnChat/plugins/default/chat/chatbar.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    @@ -19,7 +19,7 @@
    @@ -36,13 +36,13 @@
    + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ // load active chats @@ -51,7 +51,7 @@ foreach ($active_sessions as $user) { $user = ossn_user_by_guid($user); $friend['user'] = $user; - echo ossn_view('components/OssnChat/views/OssnChat/selectfriend', $friend); + echo ossn_plugin_view('chat/selectfriend', $friend); } } ?> @@ -62,7 +62,7 @@
    \ No newline at end of file diff --git a/components/OssnChat/views/OssnChat/friends-item.php b/components/OssnChat/plugins/default/chat/friends-item.php similarity index 66% rename from components/OssnChat/views/OssnChat/friends-item.php rename to components/OssnChat/plugins/default/chat/friends-item.php index f42b48249..0daba8fda 100644 --- a/components/OssnChat/views/OssnChat/friends-item.php +++ b/components/OssnChat/plugins/default/chat/friends-item.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $friend = $params['entity']; ?> diff --git a/components/OssnChat/views/OssnChat/friends/friend-item.php b/components/OssnChat/plugins/default/chat/friends/friend-item.php similarity index 72% rename from components/OssnChat/views/OssnChat/friends/friend-item.php rename to components/OssnChat/plugins/default/chat/friends/friend-item.php index c20aa9dc9..630e2ac9e 100644 --- a/components/OssnChat/views/OssnChat/friends/friend-item.php +++ b/components/OssnChat/plugins/default/chat/friends/friend-item.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $friend = $params['entity']; if ($friend->isOnline(10)) { diff --git a/components/OssnChat/views/OssnChat/friends/status.php b/components/OssnChat/plugins/default/chat/friends/status.php similarity index 57% rename from components/OssnChat/views/OssnChat/friends/status.php rename to components/OssnChat/plugins/default/chat/friends/status.php index 946a64ea8..4eddcd06f 100644 --- a/components/OssnChat/views/OssnChat/friends/status.php +++ b/components/OssnChat/plugins/default/chat/friends/status.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $friends = ossn_loggedin_user()->getFriends(); $have = ''; @@ -15,7 +15,7 @@ $vars['entity'] = $friend; $vars['icon'] = $friend->iconURL()->smaller; $have = 1; - echo ossn_view('components/OssnChat/views/OssnChat/friends/friend-item', $vars); + echo ossn_plugin_view('chat/friends/friend-item', $vars); } } if ($have !== 1) { diff --git a/components/OssnChat/views/OssnChat/friendslist.php b/components/OssnChat/plugins/default/chat/friendslist.php similarity index 64% rename from components/OssnChat/views/OssnChat/friendslist.php rename to components/OssnChat/plugins/default/chat/friendslist.php index 3f3a24ba9..fa118ebd0 100644 --- a/components/OssnChat/views/OssnChat/friendslist.php +++ b/components/OssnChat/plugins/default/chat/friendslist.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $friends = ossn_chat()->getOnlineFriends('', 10); $have = ''; @@ -17,7 +17,7 @@ $vars['entity'] = $friend; $vars['icon'] = $friend->iconURL()->smaller; $have = 1; - echo ossn_view('components/OssnChat/views/OssnChat/friends-item', $vars); + echo ossn_plugin_view('chat/friends-item', $vars); } } if ($have !== 1) { diff --git a/components/OssnChat/views/OssnChat/message-item-received.php b/components/OssnChat/plugins/default/chat/message-item-received.php similarity index 71% rename from components/OssnChat/views/OssnChat/message-item-received.php rename to components/OssnChat/plugins/default/chat/message-item-received.php index 722127ced..b90debe71 100644 --- a/components/OssnChat/views/OssnChat/message-item-received.php +++ b/components/OssnChat/plugins/default/chat/message-item-received.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    diff --git a/components/OssnChat/views/OssnChat/message-item-send.php b/components/OssnChat/plugins/default/chat/message-item-send.php similarity index 66% rename from components/OssnChat/views/OssnChat/message-item-send.php rename to components/OssnChat/plugins/default/chat/message-item-send.php index b20404771..7daa831fa 100644 --- a/components/OssnChat/views/OssnChat/message-item-send.php +++ b/components/OssnChat/plugins/default/chat/message-item-send.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    diff --git a/components/OssnChat/views/OssnChat/messages/getnew.php b/components/OssnChat/plugins/default/chat/messages/getnew.php similarity index 55% rename from components/OssnChat/views/OssnChat/messages/getnew.php rename to components/OssnChat/plugins/default/chat/messages/getnew.php index 1e8cd5b24..a75c3d1b3 100644 --- a/components/OssnChat/views/OssnChat/messages/getnew.php +++ b/components/OssnChat/plugins/default/chat/messages/getnew.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $from = $params['message_to']; $to = ossn_loggedin_user(); @@ -15,11 +15,11 @@ foreach ($messages as as $message){ if (ossn_loggedin_user()->guid == $message->message_from) { $vars['message'] = $message->message; - echo ossn_view('components/OssnChat/views/OssnChat/message-item-send', $vars); + echo ossn_plugin_view('chat/message-item-send', $vars); } else { $vars['reciever'] = ossn_user_by_guid($message->message_from); $vars['message'] = $message->message; - echo ossn_view('components/OssnChat/views/OssnChat/message-item-received', $vars); + echo ossn_plugin_view('chat/message-item-received', $vars); } } } \ No newline at end of file diff --git a/components/OssnChat/views/OssnChat/selectfriend.php b/components/OssnChat/plugins/default/chat/selectfriend.php similarity index 86% rename from components/OssnChat/views/OssnChat/selectfriend.php rename to components/OssnChat/plugins/default/chat/selectfriend.php index 948a35148..3e8f9a431 100644 --- a/components/OssnChat/views/OssnChat/selectfriend.php +++ b/components/OssnChat/plugins/default/chat/selectfriend.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ $user = $params['user']; if (OssnChat::getChatUserStatus($user->guid) == 'online') { @@ -49,7 +49,7 @@
    guid; - echo ossn_view('components/OssnChat/views/OssnChat/smilies/view', $vars); + echo ossn_plugin_view('chat/smilies/view', $vars); ?>
    @@ -61,12 +61,12 @@ if (ossn_loggedin_user()->guid == $message->message_from) { $vars['message'] = $message->message; $vars['time'] = $message->time; - echo ossn_view('components/OssnChat/views/OssnChat/message-item-send', $vars); + echo ossn_plugin_view('chat/message-item-send', $vars); } else { $vars['reciever'] = ossn_user_by_guid($message->message_from); $vars['message'] = $message->message; $vars['time'] = $message->time; - echo ossn_view('components/OssnChat/views/OssnChat/message-item-received', $vars); + echo ossn_plugin_view('chat/message-item-received', $vars); } } } @@ -89,7 +89,7 @@
    - +
    >
    diff --git a/components/OssnChat/views/OssnChat/smilies/view.php b/components/OssnChat/plugins/default/chat/smilies/view.php similarity index 58% rename from components/OssnChat/views/OssnChat/smilies/view.php rename to components/OssnChat/plugins/default/chat/smilies/view.php index 2aec579e8..2b482f180 100644 --- a/components/OssnChat/views/OssnChat/smilies/view.php +++ b/components/OssnChat/plugins/default/chat/smilies/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ foreach (OssnChat::loadIcons() as $val => $Icon) { echo '
    ' . $Icon . '
    '; diff --git a/components/OssnChat/css/OssnChat.php b/components/OssnChat/plugins/default/css/OssnChat.php similarity index 100% rename from components/OssnChat/css/OssnChat.php rename to components/OssnChat/plugins/default/css/OssnChat.php diff --git a/components/OssnChat/js/OssnChat.Boot.php b/components/OssnChat/plugins/default/js/OssnChat.Boot.php similarity index 88% rename from components/OssnChat/js/OssnChat.Boot.php rename to components/OssnChat/plugins/default/js/OssnChat.Boot.php index bb0dda3ad..aea7d70ef 100644 --- a/components/OssnChat/js/OssnChat.Boot.php +++ b/components/OssnChat/plugins/default/js/OssnChat.Boot.php @@ -1,22 +1,22 @@ /** -* OpenSource-SocialNetwork +* Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team - + * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://opensource-socialnetwork.com/licence -* @link http://www.opensource-socialnetwork.org/licence +* @license General Public Licence http://www.opensource-socialnetwork.org/licence +* @link http://www.Open Source Social Network.org/licence */ * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $new_all = ossn_chat()->getNewAll(array('message_from')); $allfriends = OssnChat::AllNew(); @@ -34,12 +34,12 @@ if (ossn_loggedin_user()->guid == $message->message_from) { $vars['message'] = $message->message; $vars['time'] = $message->time; - $messageitem = ossn_view('components/OssnChat/views/OssnChat/message-item-send', $vars); + $messageitem = ossn_plugin_view('chat/message-item-send', $vars); } else { $vars['reciever'] = ossn_user_by_guid($message->message_from); $vars['message'] = $message->message; $vars['time'] = $message->time; - $messageitem = ossn_view('components/OssnChat/views/OssnChat/message-item-received', $vars); + $messageitem = ossn_plugin_view('chat/message-item-received', $vars); } $total = get_object_vars($messages); $new_messages[] = array( @@ -63,7 +63,7 @@ 'allfriends' => $allfriends, 'friends' => array( 'online' => ossn_chat()->countOnlineFriends('', 10), - 'data' => ossn_view('components/OssnChat/views/OssnChat/friendslist'), + 'data' => ossn_plugin_view('chat/friendslist'), ), 'newmessages' => $new_messages, 'all_new' => $new_all, diff --git a/components/OssnChat/js/OssnChat.php b/components/OssnChat/plugins/default/js/OssnChat.php similarity index 95% rename from components/OssnChat/js/OssnChat.php rename to components/OssnChat/plugins/default/js/OssnChat.php index e2cc000b0..b9b25bf8b 100644 --- a/components/OssnChat/js/OssnChat.php +++ b/components/OssnChat/plugins/default/js/OssnChat.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.Open Source Social Network.org/licence */ Ossn.RegisterStartupFunction(function() { $(document).ready(function() { diff --git a/components/OssnComments/actions/comment/delete.php b/components/OssnComments/actions/comment/delete.php index e50a11e2c..0c470825c 100644 --- a/components/OssnComments/actions/comment/delete.php +++ b/components/OssnComments/actions/comment/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $comment = input('comment'); $delete = new OssnComments; diff --git a/components/OssnComments/actions/post/comment.php b/components/OssnComments/actions/post/comment.php index 392a8b14b..4c47e970f 100644 --- a/components/OssnComments/actions/post/comment.php +++ b/components/OssnComments/actions/post/comment.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $OssnComment = new OssnComments; $image = input('comment-attachment'); @@ -21,7 +21,7 @@ $comment = input('comment'); if ($OssnComment->PostComment($post, ossn_loggedin_user()->guid, $comment)) { $data['comment'] = ossn_get_comment($OssnComment->getCommentId()); - $data = ossn_view('components/OssnComments/templates/comment', $data);; + $data = ossn_plugin_view('comments/templates/comment', $data);; if (!ossn_is_xhr()) { redirect(REF); } else { diff --git a/components/OssnComments/actions/post/entity/comment.php b/components/OssnComments/actions/post/entity/comment.php index 066acea14..2bad1533d 100644 --- a/components/OssnComments/actions/post/entity/comment.php +++ b/components/OssnComments/actions/post/entity/comment.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $OssnComment = new OssnComments; $image = input('comment-attachment'); @@ -21,7 +21,7 @@ $comment = input('comment'); if ($OssnComment->PostComment($entity, ossn_loggedin_user()->guid, $comment, 'entity')) { $data['comment'] = ossn_get_comment($OssnComment->getCommentId()); - $data = ossn_view('components/OssnComments/templates/comment', $data);; + $data = ossn_plugin_view('comments/templates/comment', $data);; if (!ossn_is_xhr()) { redirect(REF); } else { diff --git a/components/OssnComments/classes/OssnComments.php b/components/OssnComments/classes/OssnComments.php index 62a9a2e30..1daa8c422 100644 --- a/components/OssnComments/classes/OssnComments.php +++ b/components/OssnComments/classes/OssnComments.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnComments extends OssnAnnotation { /** diff --git a/components/OssnComments/libs/comments.php b/components/OssnComments/libs/comments.php index a16e875e1..61f9edce8 100644 --- a/components/OssnComments/libs/comments.php +++ b/components/OssnComments/libs/comments.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ function ossn_get_comment($id) { diff --git a/components/OssnComments/locale/ossn.de.php b/components/OssnComments/locale/ossn.de.php index d5fba841a..10972bd0a 100644 --- a/components/OssnComments/locale/ossn.de.php +++ b/components/OssnComments/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'write:comment' => 'Schreibe einen Kommentar ...', diff --git a/components/OssnComments/locale/ossn.en.php b/components/OssnComments/locale/ossn.en.php index aee4fb5d4..44bee53c8 100644 --- a/components/OssnComments/locale/ossn.en.php +++ b/components/OssnComments/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'write:comment' => 'Write a comment...', diff --git a/components/OssnComments/ossn_com.php b/components/OssnComments/ossn_com.php index 08b260231..863821a17 100644 --- a/components/OssnComments/ossn_com.php +++ b/components/OssnComments/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_COMMENTS__', ossn_route()->com . 'OssnComments/'); require_once(__OSSN_COMMENTS__ . 'classes/OssnComments.php'); @@ -29,8 +29,8 @@ function ossn_comments() { ossn_register_callback('comment', 'load', 'ossn_comment_menu'); - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnComments/js/OssnComments'); - ossn_extend_view('css/ossn.default', 'components/OssnComments/css/comments'); + ossn_extend_view('js/opensource.socialnetwork', 'js/OssnComments'); + ossn_extend_view('css/ossn.default', 'css/comments'); ossn_register_page('comment', 'ossn_comment_page'); @@ -45,7 +45,7 @@ function ossn_comments() { * @access private */ function ossn_post_comments($hook, $type, $return, $params) { - return ossn_view('components/OssnComments/post/comments', $params); + return ossn_plugin_view('comments/post/comments', $params); } /** @@ -55,7 +55,7 @@ function ossn_post_comments($hook, $type, $return, $params) { * @access private */ function ossn_post_comments_entity($hook, $type, $return, $params) { - return ossn_view('components/OssnComments/post/comments_entity', $params); + return ossn_plugin_view('comments/post/comments_entity', $params); } /** @@ -187,6 +187,6 @@ function ossn_comment_page($pages) { */ function ossn_comment_view($params, $template = 'comment'){ $vars = ossn_call_hook('comment:view', 'template:params', $params, $params); - return ossn_view("components/OssnComments/templates/{$template}", $vars); + return ossn_plugin_view("comments/templates/{$template}", $vars); } ossn_register_callback('ossn', 'init', 'ossn_comments'); diff --git a/components/OssnComments/ossn_com.xml b/components/OssnComments/ossn_com.xml index 79da1369f..2ad3786eb 100644 --- a/components/OssnComments/ossn_com.xml +++ b/components/OssnComments/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnComments Core Team Allow users to comments on the posts. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 diff --git a/components/OssnComments/base.php b/components/OssnComments/plugins/default/comments/base.php similarity index 73% rename from components/OssnComments/base.php rename to components/OssnComments/plugins/default/comments/base.php index 851b10974..19443bd08 100644 --- a/components/OssnComments/base.php +++ b/components/OssnComments/plugins/default/comments/base.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ echo '
    '; if (ossn_is_hook('post', 'likes:entity')) { diff --git a/components/OssnComments/menu/comments.php b/components/OssnComments/plugins/default/comments/menu/comments.php similarity index 65% rename from components/OssnComments/menu/comments.php rename to components/OssnComments/plugins/default/comments/menu/comments.php index 07f4337c4..9b165d344 100644 --- a/components/OssnComments/menu/comments.php +++ b/components/OssnComments/plugins/default/comments/menu/comments.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (!empty($params['menu'])) { echo ''; diff --git a/components/OssnComments/post/comments.php b/components/OssnComments/plugins/default/comments/post/comments.php similarity index 90% rename from components/OssnComments/post/comments.php rename to components/OssnComments/plugins/default/comments/post/comments.php index 66b3a53ec..4316d3538 100644 --- a/components/OssnComments/post/comments.php +++ b/components/OssnComments/plugins/default/comments/post/comments.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $object = $params->guid; diff --git a/components/OssnComments/post/comments_entity.php b/components/OssnComments/plugins/default/comments/post/comments_entity.php similarity index 82% rename from components/OssnComments/post/comments_entity.php rename to components/OssnComments/plugins/default/comments/post/comments_entity.php index 8fc132ab9..e64518f73 100644 --- a/components/OssnComments/post/comments_entity.php +++ b/components/OssnComments/plugins/default/comments/post/comments_entity.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $object = $params['entity_guid']; @@ -20,10 +20,10 @@ foreach ($comments as $comment) { if ($count <= 5) { $data['comment'] = get_object_vars($comment); - echo ossn_view('components/OssnComments/templates/comment', $data); + echo ossn_plugin_view('comments/templates/comment', $data); } elseif($params->full_view === true){ $data['comment'] = get_object_vars($comment); - echo ossn_view('components/OssnComments/templates/comment', $data); + echo ossn_plugin_view('comments/templates/comment', $data); } $count++; } diff --git a/components/OssnComments/templates/comment.php b/components/OssnComments/plugins/default/comments/templates/comment.php similarity index 85% rename from components/OssnComments/templates/comment.php rename to components/OssnComments/plugins/default/comments/templates/comment.php index 0dd2ad010..d5e61063d 100644 --- a/components/OssnComments/templates/comment.php +++ b/components/OssnComments/plugins/default/comments/templates/comment.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ossn_trigger_callback('comment', 'load', $params['comment']); $OssnLikes = new OssnLikes; @@ -25,7 +25,7 @@
    @@ -34,7 +34,7 @@

    $user->profileURL(), 'text' => $user->fullname, 'class' => 'owner-link', @@ -56,7 +56,7 @@

    @@ -54,7 +54,7 @@ $link['onclick'] = "Ossn.ViewLikes({$object}, 'entity');"; $link['href'] = '#'; $link['text'] = ossn_print("ossn:like:{$total}", array($count)); - $link = ossn_view('system/templates/output/url', $link); + $link = ossn_plugin_view('output/url', $link); echo ossn_print("ossn:like:you:and:this", array($link)); } elseif (!$user_liked) { $total = 'person'; @@ -64,7 +64,7 @@ $link['onclick'] = "Ossn.ViewLikes({$object}, 'entity');"; $link['href'] = '#'; $link['text'] = ossn_print("ossn:like:{$total}", array($count)); - $link = ossn_view('system/templates/output/url', $link); + $link = ossn_plugin_view('output/url', $link); echo ossn_print("ossn:like:this", array($link)); }?>
    diff --git a/components/OssnMessages/actions/message/send.php b/components/OssnMessages/actions/message/send.php index efc26ab45..fcd841261 100644 --- a/components/OssnMessages/actions/message/send.php +++ b/components/OssnMessages/actions/message/send.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $send = new OssnMessages; $message = input('message'); @@ -17,7 +17,7 @@ $params['user'] = $user; $params['message'] = $message; - echo ossn_view('components/OssnMessages/templates/message-send', $params); + echo ossn_plugin_view('messages/templates/message-send', $params); } else { echo 0; diff --git a/components/OssnMessages/classes/OssnMessages.php b/components/OssnMessages/classes/OssnMessages.php index 29f7819a4..27cec089c 100644 --- a/components/OssnMessages/classes/OssnMessages.php +++ b/components/OssnMessages/classes/OssnMessages.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnMessages extends OssnDatabase { /** diff --git a/components/OssnMessages/locale/ossn.de.php b/components/OssnMessages/locale/ossn.de.php index c96d44a56..36f185f2e 100644 --- a/components/OssnMessages/locale/ossn.de.php +++ b/components/OssnMessages/locale/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $de = array( 'user:messages' => 'Nachrichten', diff --git a/components/OssnMessages/locale/ossn.en.php b/components/OssnMessages/locale/ossn.en.php index f9d95c835..38fe5f547 100644 --- a/components/OssnMessages/locale/ossn.en.php +++ b/components/OssnMessages/locale/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $en = array( 'user:messages' => 'Messages', diff --git a/components/OssnMessages/ossn_com.php b/components/OssnMessages/ossn_com.php index 3cdc85d1e..b0d175fdf 100644 --- a/components/OssnMessages/ossn_com.php +++ b/components/OssnMessages/ossn_com.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ define('__OSSN_MESSAGES__', ossn_route()->com . 'OssnMessages/'); require_once(__OSSN_MESSAGES__ . 'classes/OssnMessages.php'); @@ -16,9 +16,9 @@ function OssnMessages() { return $OssnMessages; } function ossn_messages() { - ossn_extend_view('css/ossn.default', 'components/OssnMessages/css/message'); + ossn_extend_view('css/ossn.default', 'css/message'); ossn_register_page('messages', 'ossn_messages_page'); - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnMessages/js/OssnMessages'); + ossn_extend_view('js/opensource.socialnetwork', 'js/OssnMessages'); if (ossn_isLoggedin()) { ossn_register_action('message/send', __OSSN_MESSAGES__ . 'actions/message/send.php'); @@ -57,7 +57,7 @@ function ossn_messages_page($pages) { $params['data'] = $OssnMessages->get(ossn_loggedin_user()->guid, $user->guid); $params['user'] = $user; $params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid); - $contents = array('content' => ossn_view('components/OssnMessages/pages/view', $params),); + $contents = array('content' => ossn_plugin_view('messages/pages/view', $params),); $content = ossn_set_page_layout('media', $contents); echo ossn_view_page($title, $content); @@ -81,9 +81,9 @@ function ossn_messages_page($pages) { $params['user'] = $user; } - $contents = array('content' => ossn_view('components/OssnMessages/pages/messages', $params),); + $contents = array('content' => ossn_plugin_view('messages/pages/messages', $params),); if (!isset($getuser)) { - $contents = array('content' => ossn_view('components/OssnMessages/pages/messages-none'),); + $contents = array('content' => ossn_plugin_view('messages/pages/messages-none'),); } $title = ossn_print('messages'); $content = ossn_set_page_layout('media', $contents); @@ -99,7 +99,7 @@ function ossn_messages_page($pages) { $message = $message->message; $params['user'] = $user; $params['message'] = $message; - echo ossn_view('components/OssnMessages/templates/message-send', $params); + echo ossn_plugin_view('messages/templates/message-send', $params); } $OssnMessages->markViewed($guid, ossn_loggedin_user()->guid); echo ''; @@ -108,7 +108,7 @@ function ossn_messages_page($pages) { case 'getrecent': $params['recent'] = $OssnMessages->recentChat(ossn_loggedin_user()->guid); - echo ossn_view('components/OssnMessages/templates/message-with', $params); + echo ossn_plugin_view('messages/templates/message-with', $params); break; default: ossn_error_page(); diff --git a/components/OssnMessages/ossn_com.xml b/components/OssnMessages/ossn_com.xml index ea6358b63..7950f25ba 100644 --- a/components/OssnMessages/ossn_com.xml +++ b/components/OssnMessages/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnMessages Core Team Allow users to communite with each other. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnMessages/css/message.php b/components/OssnMessages/plugins/default/css/message.php similarity index 100% rename from components/OssnMessages/css/message.php rename to components/OssnMessages/plugins/default/css/message.php diff --git a/components/OssnMessages/js/OssnMessages.php b/components/OssnMessages/plugins/default/js/OssnMessages.php similarity index 86% rename from components/OssnMessages/js/OssnMessages.php rename to components/OssnMessages/plugins/default/js/OssnMessages.php index 04a22dbfb..a6dfcb034 100644 --- a/components/OssnMessages/js/OssnMessages.php +++ b/components/OssnMessages/plugins/default/js/OssnMessages.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ Ossn.SendMessage = function($user) { Ossn.ajaxRequest({ diff --git a/components/OssnMessages/pages/messages-none.php b/components/OssnMessages/plugins/default/messages/pages/messages-none.php similarity index 100% rename from components/OssnMessages/pages/messages-none.php rename to components/OssnMessages/plugins/default/messages/pages/messages-none.php diff --git a/components/OssnMessages/pages/messages.php b/components/OssnMessages/plugins/default/messages/pages/messages.php similarity index 94% rename from components/OssnMessages/pages/messages.php rename to components/OssnMessages/plugins/default/messages/pages/messages.php index 7f6301028..e5d1513d6 100644 --- a/components/OssnMessages/pages/messages.php +++ b/components/OssnMessages/plugins/default/messages/pages/messages.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (isset($params['user']->guid)) { ?> @@ -107,7 +107,7 @@
    diff --git a/components/OssnMessages/pages/view.php b/components/OssnMessages/plugins/default/messages/pages/view.php similarity index 94% rename from components/OssnMessages/pages/view.php rename to components/OssnMessages/plugins/default/messages/pages/view.php index 269fead7a..22f0535d1 100644 --- a/components/OssnMessages/pages/view.php +++ b/components/OssnMessages/plugins/default/messages/pages/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    @@ -106,7 +106,7 @@
    diff --git a/components/OssnMessages/templates/message-send.php b/components/OssnMessages/plugins/default/messages/templates/message-send.php similarity index 66% rename from components/OssnMessages/templates/message-send.php rename to components/OssnMessages/plugins/default/messages/templates/message-send.php index a0504c9dc..89851cb45 100644 --- a/components/OssnMessages/templates/message-send.php +++ b/components/OssnMessages/plugins/default/messages/templates/message-send.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = $params['user']; $message = ossn_message_print($params['message']); diff --git a/components/OssnMessages/templates/message-with-notifi.php b/components/OssnMessages/plugins/default/messages/templates/message-with-notifi.php similarity index 89% rename from components/OssnMessages/templates/message-with-notifi.php rename to components/OssnMessages/plugins/default/messages/templates/message-with-notifi.php index 12fbdf913..09fc952ab 100644 --- a/components/OssnMessages/templates/message-with-notifi.php +++ b/components/OssnMessages/plugins/default/messages/templates/message-with-notifi.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnMessages/templates/message-with.php b/components/OssnMessages/plugins/default/messages/templates/message-with.php similarity index 87% rename from components/OssnMessages/templates/message-with.php rename to components/OssnMessages/plugins/default/messages/templates/message-with.php index 774e29992..d981da7ca 100644 --- a/components/OssnMessages/templates/message-with.php +++ b/components/OssnMessages/plugins/default/messages/templates/message-with.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnNotifications/classes/OssnNotifications.php b/components/OssnNotifications/classes/OssnNotifications.php index 4179a62ad..50a394586 100644 --- a/components/OssnNotifications/classes/OssnNotifications.php +++ b/components/OssnNotifications/classes/OssnNotifications.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnNotifications extends OssnDatabase { /** diff --git a/components/OssnNotifications/locale/ossn.de.php b/components/OssnNotifications/locale/ossn.de.php index 52c333134..1efa1c2e4 100644 --- a/components/OssnNotifications/locale/ossn.de.php +++ b/components/OssnNotifications/locale/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $de = array( diff --git a/components/OssnNotifications/locale/ossn.en.php b/components/OssnNotifications/locale/ossn.en.php index 6fd1b4f48..6e724bf72 100644 --- a/components/OssnNotifications/locale/ossn.en.php +++ b/components/OssnNotifications/locale/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $en = array( diff --git a/components/OssnNotifications/ossn_com.php b/components/OssnNotifications/ossn_com.php index b3e2dffb1..752a0b106 100644 --- a/components/OssnNotifications/ossn_com.php +++ b/components/OssnNotifications/ossn_com.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ define('__OSSN_NOTIF__', ossn_route()->com . 'OssnNotifications/'); @@ -19,9 +19,9 @@ */ function ossn_notifications() { //css - ossn_extend_view('css/ossn.default', 'components/OssnNotifications/css/notifications'); + ossn_extend_view('css/ossn.default', 'css/notifications'); //js - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnNotifications/js/OssnNotifications'); + ossn_extend_view('js/opensource.socialnetwork', 'js/OssnNotifications'); //pages ossn_register_page('notification', 'ossn_notification_page'); diff --git a/components/OssnNotifications/ossn_com.xml b/components/OssnNotifications/ossn_com.xml index 8389e4c70..d3303908c 100644 --- a/components/OssnNotifications/ossn_com.xml +++ b/components/OssnNotifications/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnNotifications Core Team Create a notifications for users. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnNotifications/page/topbar.php b/components/OssnNotifications/page/topbar.php index c7a4ecac5..c2b536765 100644 --- a/components/OssnNotifications/page/topbar.php +++ b/components/OssnNotifications/page/topbar.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ //declear empty variables; diff --git a/components/OssnNotifications/pages/all.php b/components/OssnNotifications/pages/all.php index cba19d3ef..c5b798188 100644 --- a/components/OssnNotifications/pages/all.php +++ b/components/OssnNotifications/pages/all.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>

    diff --git a/components/OssnNotifications/pages/notification/friends.php b/components/OssnNotifications/pages/notification/friends.php index 64b3b1a71..6c6ef3f1a 100644 --- a/components/OssnNotifications/pages/notification/friends.php +++ b/components/OssnNotifications/pages/notification/friends.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    diff --git a/components/OssnNotifications/pages/notification/notification.php b/components/OssnNotifications/pages/notification/notification.php index e6d8ccd9b..9d6506ed7 100644 --- a/components/OssnNotifications/pages/notification/notification.php +++ b/components/OssnNotifications/pages/notification/notification.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnNotifications/css/notifications.php b/components/OssnNotifications/plugins/default/css/notifications.php similarity index 89% rename from components/OssnNotifications/css/notifications.php rename to components/OssnNotifications/plugins/default/css/notifications.php index 9aa04c9a2..90c64a07c 100644 --- a/components/OssnNotifications/css/notifications.php +++ b/components/OssnNotifications/plugins/default/css/notifications.php @@ -1,12 +1,12 @@ /** -* OpenSource-SocialNetwork +* Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team - + * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://opensource-socialnetwork.com/licence -* @link http://www.opensource-socialnetwork.com/licence +* @license General Public Licence http://www.opensource-socialnetwork.org/licence +* @link http://www.opensource-socialnetwork.org/licence */ .ossn-notifications-all li{ padding: 10px; diff --git a/components/OssnNotifications/js/OssnNotifications.php b/components/OssnNotifications/plugins/default/js/OssnNotifications.php similarity index 97% rename from components/OssnNotifications/js/OssnNotifications.php rename to components/OssnNotifications/plugins/default/js/OssnNotifications.php index fffff8d6c..bd28c39c2 100644 --- a/components/OssnNotifications/js/OssnNotifications.php +++ b/components/OssnNotifications/plugins/default/js/OssnNotifications.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ Ossn.NotificationBox = function($title, $meta, $type, height) { //trigger notification box again: diff --git a/components/OssnPhotos/actions/album/add.php b/components/OssnPhotos/actions/album/add.php index 565a5e41d..1664af6f5 100644 --- a/components/OssnPhotos/actions/album/add.php +++ b/components/OssnPhotos/actions/album/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $add = new OssnAlbums; if ($add->CreateAlbum(ossn_loggedin_user()->guid, input('title'), input('privacy'))) { diff --git a/components/OssnPhotos/actions/photo/delete.php b/components/OssnPhotos/actions/photo/delete.php index fdc5b8626..e0a39d94a 100644 --- a/components/OssnPhotos/actions/photo/delete.php +++ b/components/OssnPhotos/actions/photo/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $photoid = input('id'); diff --git a/components/OssnPhotos/actions/photo/profile/cover/delete.php b/components/OssnPhotos/actions/photo/profile/cover/delete.php index f6bcfdcb0..134792dda 100644 --- a/components/OssnPhotos/actions/photo/profile/cover/delete.php +++ b/components/OssnPhotos/actions/photo/profile/cover/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $photoid = input('id'); diff --git a/components/OssnPhotos/actions/photo/profile/delete.php b/components/OssnPhotos/actions/photo/profile/delete.php index 180979804..4eb05f4c9 100644 --- a/components/OssnPhotos/actions/photo/profile/delete.php +++ b/components/OssnPhotos/actions/photo/profile/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $photoid = input('id'); diff --git a/components/OssnPhotos/actions/photos/add.php b/components/OssnPhotos/actions/photos/add.php index fda535ca0..98056d71a 100644 --- a/components/OssnPhotos/actions/photos/add.php +++ b/components/OssnPhotos/actions/photos/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $add = new OssnPhotos; if ($add->AddPhoto(input('album'), 'ossnphoto', input('privacy'))) { diff --git a/components/OssnPhotos/classes/OssnAlbums.php b/components/OssnPhotos/classes/OssnAlbums.php index 1248edf03..acf3ca30b 100644 --- a/components/OssnPhotos/classes/OssnAlbums.php +++ b/components/OssnPhotos/classes/OssnAlbums.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnAlbums extends OssnObject { /** diff --git a/components/OssnPhotos/classes/OssnPhotos.php b/components/OssnPhotos/classes/OssnPhotos.php index 18dc82633..6cb9703c4 100644 --- a/components/OssnPhotos/classes/OssnPhotos.php +++ b/components/OssnPhotos/classes/OssnPhotos.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnPhotos extends OssnFile { /** diff --git a/components/OssnPhotos/forms/album/add.php b/components/OssnPhotos/forms/album/add.php deleted file mode 100644 index 3700073e1..000000000 --- a/components/OssnPhotos/forms/album/add.php +++ /dev/null @@ -1,17 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -?> - - - - \ No newline at end of file diff --git a/components/OssnPhotos/libraries/ossn.lib.albums.php b/components/OssnPhotos/libraries/ossn.lib.albums.php index ba82a2c5b..50aa46a32 100644 --- a/components/OssnPhotos/libraries/ossn.lib.albums.php +++ b/components/OssnPhotos/libraries/ossn.lib.albums.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ function ossn_albums() { $albums = new OssnAlbums; diff --git a/components/OssnPhotos/libraries/ossn.lib.photos.php b/components/OssnPhotos/libraries/ossn.lib.photos.php index ca83be2fb..3d950972c 100644 --- a/components/OssnPhotos/libraries/ossn.lib.photos.php +++ b/components/OssnPhotos/libraries/ossn.lib.photos.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ function ossn_photos() { $photos = new OssnPhotos; diff --git a/components/OssnPhotos/locale/ossn.de.php b/components/OssnPhotos/locale/ossn.de.php index 81c764dc6..25cb36e74 100644 --- a/components/OssnPhotos/locale/ossn.de.php +++ b/components/OssnPhotos/locale/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $de = array( diff --git a/components/OssnPhotos/locale/ossn.en.php b/components/OssnPhotos/locale/ossn.en.php index 9ff06471b..15442d082 100644 --- a/components/OssnPhotos/locale/ossn.en.php +++ b/components/OssnPhotos/locale/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $en = array( diff --git a/components/OssnPhotos/ossn_com.php b/components/OssnPhotos/ossn_com.php index 7f2929f14..2e93c1031 100644 --- a/components/OssnPhotos/ossn_com.php +++ b/components/OssnPhotos/ossn_com.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ define('__OSSN_PHOTOS__', ossn_route()->com . 'OssnPhotos/'); @@ -26,9 +26,9 @@ */ function ossn_photos_initialize() { //css - ossn_extend_view('css/ossn.default', 'components/OssnPhotos/css/photos'); + ossn_extend_view('css/ossn.default', 'css/photos'); //js - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnPhotos/js/OssnPhotos'); + ossn_extend_view('js/opensource.socialnetwork', 'js/OssnPhotos'); //hooks ossn_add_hook('profile', 'subpage', 'ossn_profile_photos_page'); @@ -142,7 +142,7 @@ function ossn_photos_sizes() { */ function profile_modules_albums($hook, $type, $module, $params) { $user['user'] = $params['user']; - $content = ossn_view("components/OssnPhotos/modules/profile/albums", $user); + $content = ossn_plugin_view("photos/modules/profile/albums", $user); $module[] = ossn_view_widget('profile/widget', strtoupper(ossn_print('photo:albums')), $content); return $module; } @@ -192,10 +192,10 @@ function ossn_photos_page_handler($album) { 'href' => 'javascript::;', 'class' => 'button-grey', ); - $control = ossn_view('system/templates/output/url', $addphotos); + $control = ossn_plugin_view('output/url', $addphotos); $contents = array( 'title' => ossn_print('photos'), - 'content' => ossn_view('components/OssnPhotos/pages/photo/view', $photo), + 'content' => ossn_plugin_view('photos/pages/photo/view', $photo), 'controls' => $control, ); //set page layout @@ -224,10 +224,10 @@ function ossn_photos_page_handler($album) { 'href' => 'javascript::;', 'class' => 'button-grey', ); - $control = ossn_view('system/templates/output/url', $addphotos); + $control = ossn_plugin_view('output/url', $addphotos); $contents = array( 'title' => 'Photos', - 'content' => ossn_view('components/OssnPhotos/pages/profile/photos/view', $photo), + 'content' => ossn_plugin_view('photos/pages/profile/photos/view', $photo), 'controls' => $control, ); //set page layout @@ -255,10 +255,10 @@ function ossn_photos_page_handler($album) { 'href' => 'javascript::;', 'class' => 'button-grey', ); - $control = ossn_view('system/templates/output/url', $addphotos); + $control = ossn_plugin_view('output/url', $addphotos); $contents = array( 'title' => 'Photos', - 'content' => ossn_view('components/OssnPhotos/pages/profile/covers/view', $photo), + 'content' => ossn_plugin_view('photos/pages/profile/covers/view', $photo), 'controls' => $control, ); //set page layout @@ -272,9 +272,9 @@ function ossn_photos_page_handler($album) { if (!ossn_is_xhr()) { ossn_error_page(); } - echo ossn_view('system/templates/output/ossnbox', array( + echo ossn_plugin_view('output/ossnbox', array( 'title' => ossn_print('add:photos'), - 'contents' => ossn_view('components/OssnPhotos/pages/photos/add'), + 'contents' => ossn_plugin_view('photos/pages/photos/add'), 'callback' => '#ossn-photos-submit', )); break; @@ -287,8 +287,8 @@ function ossn_photos_page_handler($album) { $photo_guid = get_profile_photo_guid(ossn_user_by_username($image)->guid); //set viewer sidebar (comments and likes) - $sidebar = ossn_view('components/OssnPhotos/viewer/comments', array('entity_guid' => $photo_guid)); - echo ossn_view('system/templates/output/viewer', array( + $sidebar = ossn_plugin_view('photos/viewer/comments', array('entity_guid' => $photo_guid)); + echo ossn_plugin_view('output/viewer', array( 'media' => $media, 'sidebar' => $sidebar, )); @@ -392,14 +392,14 @@ function ossn_album_page_handler($album) { 'data-url' => '?album=' . $album[1], 'class' => 'button-grey', ); - $control = ossn_view('system/templates/output/url', $addphotos); + $control = ossn_plugin_view('output/url', $addphotos); } else { $control = false; } //set photos in module $contents = array( 'title' => ossn_print('photos'), - 'content' => ossn_view('components/OssnPhotos/pages/albums', $user), + 'content' => ossn_plugin_view('photos/pages/albums', $user), 'controls' => $control, 'module_width' => '850px', ); @@ -420,7 +420,7 @@ function ossn_album_page_handler($album) { //view profile photos in module layout $contents = array( 'title' => ossn_print('photos'), - 'content' => ossn_view('components/OssnPhotos/pages/profile/photos/all', $user), + 'content' => ossn_plugin_view('photos/pages/profile/photos/all', $user), 'controls' => false, 'module_width' => '850px', ); @@ -441,7 +441,7 @@ function ossn_album_page_handler($album) { //view profile photos in module layout $contents = array( 'title' => ossn_print('covers'), - 'content' => ossn_view('components/OssnPhotos/pages/profile/covers/all', $user), + 'content' => ossn_plugin_view('photos/pages/profile/covers/all', $user), 'controls' => false, 'module_width' => '850px', ); @@ -453,9 +453,9 @@ function ossn_album_page_handler($album) { break; case 'add': //add photos (ajax) - echo ossn_view('system/templates/output/ossnbox', array( + echo ossn_plugin_view('output/ossnbox', array( 'title' => ossn_print('add:album'), - 'contents' => ossn_view('components/OssnPhotos/pages/album/add'), + 'contents' => ossn_plugin_view('photos/pages/album/add'), 'success_id' => 'aga', 'callback' => '#ossn-album-submit', )); @@ -486,9 +486,9 @@ function ossn_profile_photos_page($hook, $type, $return, $params) { 'id' => 'ossn-add-album', 'class' => 'button-grey', ); - $control = ossn_view('system/templates/output/url', $addalbum); + $control = ossn_plugin_view('output/url', $addalbum); } - $friends = ossn_view('components/OssnPhotos/pages/photos', $user); + $friends = ossn_plugin_view('photos/pages/photos', $user); echo ossn_set_page_layout('module', array( 'title' => ossn_print('photo:albums'), 'content' => $friends, @@ -505,7 +505,7 @@ function ossn_profile_photos_page($hook, $type, $return, $params) { */ function ossn_profile_photo_menu($hook, $type, $return, $params) { if ($params->owner_guid == ossn_loggedin_user()->guid || ossn_isAdminLoggedin()) { - return ossn_view('components/OssnPhotos/views/profilephoto/menu', $params); + return ossn_plugin_view('photos/views/profilephoto/menu', $params); } } @@ -518,7 +518,7 @@ function ossn_profile_photo_menu($hook, $type, $return, $params) { function ossn_album_photo_menu($hook, $type, $return, $params) { $album = ossn_albums()->getAlbum($params->owner_guid); if ($album->album->owner_guid == ossn_loggedin_user()->guid || ossn_isAdminLoggedin()) { - return ossn_view('components/OssnPhotos/views/albumphoto/menu', $params); + return ossn_plugin_view('photos/views/albumphoto/menu', $params); } } /** @@ -529,7 +529,7 @@ function ossn_album_photo_menu($hook, $type, $return, $params) { */ function ossn_album_cover_photo_menu($hook, $type, $return, $params) { if ($params->owner_guid == ossn_loggedin_user()->guid || ossn_isAdminLoggedin()) { - return ossn_view('components/OssnPhotos/views/coverphoto/menu', $params); + return ossn_plugin_view('photos/views/coverphoto/menu', $params); } } /** diff --git a/components/OssnPhotos/ossn_com.xml b/components/OssnPhotos/ossn_com.xml index e8fd9e6c3..840de7be6 100644 --- a/components/OssnPhotos/ossn_com.xml +++ b/components/OssnPhotos/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnPhotos Core Team Allow users to share photos. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnPhotos/css/photos.php b/components/OssnPhotos/plugins/default/css/photos.php similarity index 100% rename from components/OssnPhotos/css/photos.php rename to components/OssnPhotos/plugins/default/css/photos.php diff --git a/components/OssnPhotos/plugins/default/forms/OssnPhotos/album/add.php b/components/OssnPhotos/plugins/default/forms/OssnPhotos/album/add.php new file mode 100644 index 000000000..1ee43cbe9 --- /dev/null +++ b/components/OssnPhotos/plugins/default/forms/OssnPhotos/album/add.php @@ -0,0 +1,17 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +?> + + + + \ No newline at end of file diff --git a/components/OssnPhotos/forms/photos/add.php b/components/OssnPhotos/plugins/default/forms/OssnPhotos/photos/add.php similarity index 53% rename from components/OssnPhotos/forms/photos/add.php rename to components/OssnPhotos/plugins/default/forms/OssnPhotos/photos/add.php index 3d15edbbd..16cee6fb0 100644 --- a/components/OssnPhotos/forms/photos/add.php +++ b/components/OssnPhotos/plugins/default/forms/OssnPhotos/photos/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?> @@ -14,5 +14,5 @@ diff --git a/components/OssnPhotos/js/OssnPhotos.php b/components/OssnPhotos/plugins/default/js/OssnPhotos.php similarity index 70% rename from components/OssnPhotos/js/OssnPhotos.php rename to components/OssnPhotos/plugins/default/js/OssnPhotos.php index bf9e488b1..0a2302651 100644 --- a/components/OssnPhotos/js/OssnPhotos.php +++ b/components/OssnPhotos/plugins/default/js/OssnPhotos.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ Ossn.RegisterStartupFunction(function(){ $(document).ready(function(){ diff --git a/components/OssnPhotos/modules/profile/albums.php b/components/OssnPhotos/plugins/default/photos/modules/profile/albums.php similarity index 80% rename from components/OssnPhotos/modules/profile/albums.php rename to components/OssnPhotos/plugins/default/photos/modules/profile/albums.php index bcf0cbdb2..652b5e399 100644 --- a/components/OssnPhotos/modules/profile/albums.php +++ b/components/OssnPhotos/plugins/default/photos/modules/profile/albums.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; $albums = new OssnAlbums; diff --git a/components/OssnPhotos/pages/album/add.php b/components/OssnPhotos/plugins/default/photos/pages/album/add.php similarity index 50% rename from components/OssnPhotos/pages/album/add.php rename to components/OssnPhotos/plugins/default/photos/pages/album/add.php index c6a1aad5d..28978fd3d 100644 --- a/components/OssnPhotos/pages/album/add.php +++ b/components/OssnPhotos/plugins/default/photos/pages/album/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo ossn_view_form('album/add', array( 'action' => ossn_site_url() . 'action/ossn/album/add', diff --git a/components/OssnPhotos/pages/albums.php b/components/OssnPhotos/plugins/default/photos/pages/albums.php similarity index 73% rename from components/OssnPhotos/pages/albums.php rename to components/OssnPhotos/plugins/default/photos/pages/albums.php index 4b4cccf1d..17c8cebfe 100644 --- a/components/OssnPhotos/pages/albums.php +++ b/components/OssnPhotos/plugins/default/photos/pages/albums.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $albums = new OssnAlbums; diff --git a/components/OssnPhotos/pages/photo/view.php b/components/OssnPhotos/plugins/default/photos/pages/photo/view.php similarity index 86% rename from components/OssnPhotos/pages/photo/view.php rename to components/OssnPhotos/plugins/default/photos/pages/photo/view.php index 594ba52f6..7573f0ae1 100644 --- a/components/OssnPhotos/pages/photo/view.php +++ b/components/OssnPhotos/plugins/default/photos/pages/photo/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $album = new OssnAlbums; $image = $params['entity']; diff --git a/components/OssnPhotos/pages/photos.php b/components/OssnPhotos/plugins/default/photos/pages/photos.php similarity index 88% rename from components/OssnPhotos/pages/photos.php rename to components/OssnPhotos/plugins/default/photos/pages/photos.php index 2dbd5e1cd..cfd74920c 100644 --- a/components/OssnPhotos/pages/photos.php +++ b/components/OssnPhotos/plugins/default/photos/pages/photos.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; $albums = new OssnAlbums; diff --git a/components/OssnPhotos/pages/photos/add.php b/components/OssnPhotos/plugins/default/photos/pages/photos/add.php similarity index 56% rename from components/OssnPhotos/pages/photos/add.php rename to components/OssnPhotos/plugins/default/photos/pages/photos/add.php index 4b2dd5f31..bc25d854c 100644 --- a/components/OssnPhotos/pages/photos/add.php +++ b/components/OssnPhotos/plugins/default/photos/pages/photos/add.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $album = input('album'); echo ossn_view_form('photos/add', array( diff --git a/components/OssnPhotos/pages/profile/covers/all.php b/components/OssnPhotos/plugins/default/photos/pages/profile/covers/all.php similarity index 73% rename from components/OssnPhotos/pages/profile/covers/all.php rename to components/OssnPhotos/plugins/default/photos/pages/profile/covers/all.php index b64921590..c0f303f31 100644 --- a/components/OssnPhotos/pages/profile/covers/all.php +++ b/components/OssnPhotos/plugins/default/photos/pages/profile/covers/all.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $albums = new OssnAlbums; diff --git a/components/OssnPhotos/pages/profile/covers/view.php b/components/OssnPhotos/plugins/default/photos/pages/profile/covers/view.php similarity index 85% rename from components/OssnPhotos/pages/profile/covers/view.php rename to components/OssnPhotos/plugins/default/photos/pages/profile/covers/view.php index 4c6f626f5..de48738d7 100644 --- a/components/OssnPhotos/pages/profile/covers/view.php +++ b/components/OssnPhotos/plugins/default/photos/pages/profile/covers/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = $params['entity']; $img = str_replace('profile/cover/', '', $image->value); diff --git a/components/OssnPhotos/pages/profile/photos/all.php b/components/OssnPhotos/plugins/default/photos/pages/profile/photos/all.php similarity index 74% rename from components/OssnPhotos/pages/profile/photos/all.php rename to components/OssnPhotos/plugins/default/photos/pages/profile/photos/all.php index 69afdcb96..841ff5e88 100644 --- a/components/OssnPhotos/pages/profile/photos/all.php +++ b/components/OssnPhotos/plugins/default/photos/pages/profile/photos/all.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $albums = new OssnAlbums; diff --git a/components/OssnPhotos/pages/profile/photos/view.php b/components/OssnPhotos/plugins/default/photos/pages/profile/photos/view.php similarity index 85% rename from components/OssnPhotos/pages/profile/photos/view.php rename to components/OssnPhotos/plugins/default/photos/pages/profile/photos/view.php index 07fcc9dd7..27465a76d 100644 --- a/components/OssnPhotos/pages/profile/photos/view.php +++ b/components/OssnPhotos/plugins/default/photos/pages/profile/photos/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = $params['entity']; $img = str_replace('profile/photo/', '', $image->value); diff --git a/components/OssnPhotos/plugins/default/photos/viewer/comments.php b/components/OssnPhotos/plugins/default/photos/viewer/comments.php new file mode 100644 index 000000000..1104d6ae9 --- /dev/null +++ b/components/OssnPhotos/plugins/default/photos/viewer/comments.php @@ -0,0 +1,13 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +echo '
    '; + echo ossn_plugin_view('comments/base', array('entity_guid' => $params['entity_guid'])); +echo '
    '; \ No newline at end of file diff --git a/components/OssnPhotos/views/albumphoto/menu.php b/components/OssnPhotos/plugins/default/photos/views/albumphoto/menu.php similarity index 58% rename from components/OssnPhotos/views/albumphoto/menu.php rename to components/OssnPhotos/plugins/default/photos/views/albumphoto/menu.php index 77b01f7cd..2febd4651 100644 --- a/components/OssnPhotos/views/albumphoto/menu.php +++ b/components/OssnPhotos/plugins/default/photos/views/albumphoto/menu.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_isLoggedIn()) { ?> diff --git a/components/OssnPhotos/views/coverphoto/menu.php b/components/OssnPhotos/plugins/default/photos/views/coverphoto/menu.php similarity index 60% rename from components/OssnPhotos/views/coverphoto/menu.php rename to components/OssnPhotos/plugins/default/photos/views/coverphoto/menu.php index 854b82124..f0c8980c7 100644 --- a/components/OssnPhotos/views/coverphoto/menu.php +++ b/components/OssnPhotos/plugins/default/photos/views/coverphoto/menu.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_isLoggedIn()) { ?> diff --git a/components/OssnPhotos/views/profilephoto/menu.php b/components/OssnPhotos/plugins/default/photos/views/profilephoto/menu.php similarity index 59% rename from components/OssnPhotos/views/profilephoto/menu.php rename to components/OssnPhotos/plugins/default/photos/views/profilephoto/menu.php index dbda2d2a2..b190de141 100644 --- a/components/OssnPhotos/views/profilephoto/menu.php +++ b/components/OssnPhotos/plugins/default/photos/views/profilephoto/menu.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (ossn_isLoggedIn()) { ?> diff --git a/components/OssnPhotos/viewer/comments.php b/components/OssnPhotos/viewer/comments.php deleted file mode 100644 index 3cb2d93ba..000000000 --- a/components/OssnPhotos/viewer/comments.php +++ /dev/null @@ -1,13 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -echo '
    '; -echo ossn_view('components/OssnComments/base', array('entity_guid' => $params['entity_guid'])); -echo '
    '; \ No newline at end of file diff --git a/components/OssnPoke/actions/user/poke.php b/components/OssnPoke/actions/user/poke.php index 33fd70881..961805d18 100644 --- a/components/OssnPoke/actions/user/poke.php +++ b/components/OssnPoke/actions/user/poke.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $poke = new OssnPoke; $user = input('user'); diff --git a/components/OssnPoke/classes/OssnPoke.php b/components/OssnPoke/classes/OssnPoke.php index d225e99e8..7a757d799 100644 --- a/components/OssnPoke/classes/OssnPoke.php +++ b/components/OssnPoke/classes/OssnPoke.php @@ -3,11 +3,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ class OssnPoke extends OssnDatabase { /** diff --git a/components/OssnPoke/locale/ossn.de.php b/components/OssnPoke/locale/ossn.de.php index f310c1619..818f578a2 100644 --- a/components/OssnPoke/locale/ossn.de.php +++ b/components/OssnPoke/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'ossn:notifications:ossnpoke:poke' => "%s hat Dich angestubst", diff --git a/components/OssnPoke/locale/ossn.en.php b/components/OssnPoke/locale/ossn.en.php index 4c60e7241..a402065a1 100644 --- a/components/OssnPoke/locale/ossn.en.php +++ b/components/OssnPoke/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'ossn:notifications:ossnpoke:poke' => "%s has poked you!", diff --git a/components/OssnPoke/ossn_com.php b/components/OssnPoke/ossn_com.php index 7e728ec62..777c9f49c 100644 --- a/components/OssnPoke/ossn_com.php +++ b/components/OssnPoke/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ /* Define Paths */ @@ -23,7 +23,7 @@ */ function ossn_poke() { //css - ossn_extend_view('css/ossn.default', 'components/OssnPoke/css/poke'); + ossn_extend_view('css/ossn.default', 'css/poke'); //actions if (ossn_isLoggedin()) { diff --git a/components/OssnPoke/ossn_com.xml b/components/OssnPoke/ossn_com.xml index 50428df93..7cb39bab8 100644 --- a/components/OssnPoke/ossn_com.xml +++ b/components/OssnPoke/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnPoke Core Team Allow users to poke other user. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnPoke/css/poke.php b/components/OssnPoke/plugins/default/css/poke.php similarity index 100% rename from components/OssnPoke/css/poke.php rename to components/OssnPoke/plugins/default/css/poke.php diff --git a/components/OssnProfile/actions/cover/reposition.php b/components/OssnProfile/actions/cover/reposition.php index b72224193..43a36d280 100644 --- a/components/OssnProfile/actions/cover/reposition.php +++ b/components/OssnProfile/actions/cover/reposition.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ header('Content-Type: application/json'); $pos = new OssnProfile; diff --git a/components/OssnProfile/actions/cover/upload.php b/components/OssnProfile/actions/cover/upload.php index 2bf04370e..a77afbaad 100644 --- a/components/OssnProfile/actions/cover/upload.php +++ b/components/OssnProfile/actions/cover/upload.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $file = new OssnFile; $file->owner_guid = ossn_loggedin_user()->guid;; diff --git a/components/OssnProfile/actions/edit.php b/components/OssnProfile/actions/edit.php index a36698239..a654f18f8 100644 --- a/components/OssnProfile/actions/edit.php +++ b/components/OssnProfile/actions/edit.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $entity = ossn_user_by_username(input('username')); if(!$entity){ diff --git a/components/OssnProfile/actions/photo/upload.php b/components/OssnProfile/actions/photo/upload.php index 807065d0e..b17334662 100644 --- a/components/OssnProfile/actions/photo/upload.php +++ b/components/OssnProfile/actions/photo/upload.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $profile = new OssnProfile; $file = new OssnFile; diff --git a/components/OssnProfile/classes/OssnProfile.php b/components/OssnProfile/classes/OssnProfile.php index af7b1c404..1011d09bd 100644 --- a/components/OssnProfile/classes/OssnProfile.php +++ b/components/OssnProfile/classes/OssnProfile.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnProfile extends OssnDatabase { /** diff --git a/components/OssnProfile/locale/ossn.de.php b/components/OssnProfile/locale/ossn.de.php index aee997b2e..a4bc91910 100644 --- a/components/OssnProfile/locale/ossn.de.php +++ b/components/OssnProfile/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'people:like:this' => 'Leute, denen dieser Beitrag gefällt', diff --git a/components/OssnProfile/locale/ossn.en.php b/components/OssnProfile/locale/ossn.en.php index 9f9d2e709..bf5cdf737 100644 --- a/components/OssnProfile/locale/ossn.en.php +++ b/components/OssnProfile/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'people:like:this' => 'People who liked this post', diff --git a/components/OssnProfile/menus/extra.php b/components/OssnProfile/menus/extra.php deleted file mode 100644 index 658aee5e9..000000000 --- a/components/OssnProfile/menus/extra.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -?> -
    - $link) { - echo "
  • {$text}
  • "; - } - } - } - ?> -
    \ No newline at end of file diff --git a/components/OssnProfile/ossn_com.php b/components/OssnProfile/ossn_com.php index 0697bf7ec..1c1ccb9b8 100644 --- a/components/OssnProfile/ossn_com.php +++ b/components/OssnProfile/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_PROFILE__', ossn_route()->com . 'OssnProfile/'); require_once(__OSSN_PROFILE__ . 'classes/OssnProfile.php'); @@ -22,8 +22,8 @@ function ossn_profile() { ossn_register_page('avatar', 'avatar_page_handler'); ossn_register_page('cover', 'cover_page_handler'); //css and js - ossn_extend_view('css/ossn.default', 'components/OssnProfile/css/profile'); - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnProfile/js/OssnProfile'); + ossn_extend_view('css/ossn.default', 'css/profile'); + ossn_extend_view('js/opensource.socialnetwork', 'js/OssnProfile'); //actions if (ossn_isLoggedin()) { ossn_register_action('profile/photo/upload', __OSSN_PROFILE__ . 'actions/photo/upload.php'); @@ -122,7 +122,7 @@ function profile_user_friends($hook, $type, $return, $params) { $page = $params['subpage']; if ($page == 'friends') { $user['user'] = $params['user']; - $friends = ossn_view('components/OssnProfile/pages/friends', $user); + $friends = ossn_plugin_view('profile/pages/friends', $user); echo ossn_set_page_layout('module', array( 'title' => ossn_print('friends'), 'content' => $friends, @@ -166,7 +166,7 @@ function profile_search_handler($hook, $type, $return, $params) { $data = $users->searchUsers($params['q']); $Pagination->setItem($data); $user['users'] = $Pagination->getItem(); - $search = ossn_view('system/templates/output/users', $user); + $search = ossn_plugin_view('output/users', $user); $search .= $Pagination->pagination(); if (empty($data)) { return ossn_print('ossn:search:no:result'); @@ -185,7 +185,7 @@ function profile_modules($h, $t, $module, $params) { /*$content = ossn_view("components/OssnProfile/modules/about", $user); $modules[] = ossn_view_widget('profile/widget', 'ABOUT', $content);*/ - $content = ossn_view("components/OssnProfile/modules/friends", $user); + $content = ossn_plugin_view("profile/modules/friends", $user); $modules[] = ossn_view_widget('profile/widget', strtoupper(ossn_print('friends')), $content); return $modules; @@ -196,7 +196,7 @@ function profile_modules($h, $t, $module, $params) { * @return mixed data; */ function profile_photo_newsefeed($hook, $type, $return) { - $return[] = ossn_view('components/OssnProfile/newsfeed/info'); + $return[] = ossn_plugin_view('profile/newsfeed/info'); return $return; } /** @@ -223,7 +223,7 @@ function profile_page_handler($page) { return false; } $title = $user->fullname; - $contents['content'] = ossn_view('components/OssnProfile/pages/profile', $params); + $contents['content'] = ossn_plugin_view('profile/pages/profile', $params); $content = ossn_set_page_layout('contents', $contents); echo ossn_view_page($title, $content); } @@ -364,7 +364,7 @@ function ossn_notification_like_profile_photo($hook, $type, $return, $params) { * @return mixed data; */ function ossn_wall_profile_photo($hook, $type, $return, $params){ - return ossn_view("components/OssnProfile/templates/wall/profile/photo", $params); + return ossn_plugin_view("profile/wall/profile/photo", $params); } /** * Template for profile cover photo created by ossnwall @@ -372,7 +372,7 @@ function ossn_wall_profile_photo($hook, $type, $return, $params){ * @return mixed data; */ function ossn_wall_profile_cover_photo($hook, $type, $return, $params){ - return ossn_view("components/OssnProfile/templates/wall/cover/photo", $params); + return ossn_plugin_view("profile/wall/cover/photo", $params); } /** * Get profile photo url for wall diff --git a/components/OssnProfile/ossn_com.xml b/components/OssnProfile/ossn_com.xml index 2d1676878..65975bb55 100644 --- a/components/OssnProfile/ossn_com.xml +++ b/components/OssnProfile/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnSearch Core Team Allow users to search site. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnProfile/css/profile.php b/components/OssnProfile/plugins/default/css/profile.php similarity index 94% rename from components/OssnProfile/css/profile.php rename to components/OssnProfile/plugins/default/css/profile.php index efe100d50..a0521c5ce 100644 --- a/components/OssnProfile/css/profile.php +++ b/components/OssnProfile/plugins/default/css/profile.php @@ -1,12 +1,12 @@ /** -* OpenSource-SocialNetwork +* Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team - + * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://opensource-socialnetwork.com/licence -* @link http://www.opensource-socialnetwork.com/licence +* @license General Public Licence http://www.opensource-socialnetwork.org/licence +* @link http://www.opensource-socialnetwork.org/licence */ .ossn-profile { width:850px; diff --git a/components/OssnProfile/forms/edit.php b/components/OssnProfile/plugins/default/forms/OssnProfile/edit.php similarity index 92% rename from components/OssnProfile/forms/edit.php rename to components/OssnProfile/plugins/default/forms/OssnProfile/edit.php index 25b6a1762..c006b0130 100644 --- a/components/OssnProfile/forms/edit.php +++ b/components/OssnProfile/plugins/default/forms/OssnProfile/edit.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = $params['user']; ?> diff --git a/components/OssnProfile/js/OssnProfile.php b/components/OssnProfile/plugins/default/js/OssnProfile.php similarity index 95% rename from components/OssnProfile/js/OssnProfile.php rename to components/OssnProfile/plugins/default/js/OssnProfile.php index 92ea17dd6..728677254 100644 --- a/components/OssnProfile/js/OssnProfile.php +++ b/components/OssnProfile/plugins/default/js/OssnProfile.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ Ossn.RegisterStartupFunction(function() { $(document).ready(function() { diff --git a/components/OssnProfile/plugins/default/profile/menus/extra.php b/components/OssnProfile/plugins/default/profile/menus/extra.php new file mode 100644 index 000000000..72fa4a6ea --- /dev/null +++ b/components/OssnProfile/plugins/default/profile/menus/extra.php @@ -0,0 +1,12 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ + + echo ossn_plugin_view("profile/menus/extra", $params); \ No newline at end of file diff --git a/components/OssnProfile/modules/about.php b/components/OssnProfile/plugins/default/profile/modules/about.php similarity index 75% rename from components/OssnProfile/modules/about.php rename to components/OssnProfile/plugins/default/profile/modules/about.php index 172d5e615..ccb2231ea 100644 --- a/components/OssnProfile/modules/about.php +++ b/components/OssnProfile/plugins/default/profile/modules/about.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnProfile/modules/friends.php b/components/OssnProfile/plugins/default/profile/modules/friends.php similarity index 74% rename from components/OssnProfile/modules/friends.php rename to components/OssnProfile/plugins/default/profile/modules/friends.php index a17139096..723c587fd 100644 --- a/components/OssnProfile/modules/friends.php +++ b/components/OssnProfile/plugins/default/profile/modules/friends.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $friends = $params['user']->getFriends(); echo '
    '; diff --git a/components/OssnProfile/newsfeed/info.php b/components/OssnProfile/plugins/default/profile/newsfeed/info.php similarity index 68% rename from components/OssnProfile/newsfeed/info.php rename to components/OssnProfile/plugins/default/profile/newsfeed/info.php index 7f0c61299..1fea25c09 100644 --- a/components/OssnProfile/newsfeed/info.php +++ b/components/OssnProfile/plugins/default/profile/newsfeed/info.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnProfile/pages/friends.php b/components/OssnProfile/plugins/default/profile/pages/friends.php similarity index 52% rename from components/OssnProfile/pages/friends.php rename to components/OssnProfile/plugins/default/profile/pages/friends.php index 2ed922e82..0fdf3cf3a 100644 --- a/components/OssnProfile/pages/friends.php +++ b/components/OssnProfile/plugins/default/profile/pages/friends.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; $users['users'] = get_user_friends($params['user']->guid); diff --git a/components/OssnProfile/pages/profile.php b/components/OssnProfile/plugins/default/profile/pages/profile.php similarity index 91% rename from components/OssnProfile/pages/profile.php rename to components/OssnProfile/plugins/default/profile/pages/profile.php index d86ee6ae1..fe0712fec 100644 --- a/components/OssnProfile/pages/profile.php +++ b/components/OssnProfile/plugins/default/profile/pages/profile.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $user = $params['user']; @@ -37,7 +37,7 @@ - +
    @@ -110,7 +110,7 @@ class='button-grey'> ...
    - +
    @@ -153,7 +153,7 @@ class='button-grey'>
    diff --git a/components/OssnProfile/templates/wall/cover/photo.php b/components/OssnProfile/plugins/default/profile/wall/cover/photo.php similarity index 90% rename from components/OssnProfile/templates/wall/cover/photo.php rename to components/OssnProfile/plugins/default/profile/wall/cover/photo.php index cf2588277..137002a7a 100644 --- a/components/OssnProfile/templates/wall/cover/photo.php +++ b/components/OssnProfile/plugins/default/profile/wall/cover/photo.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = ossn_get_entity($params['post']->item_guid); diff --git a/components/OssnProfile/templates/wall/profile/photo.php b/components/OssnProfile/plugins/default/profile/wall/profile/photo.php similarity index 90% rename from components/OssnProfile/templates/wall/profile/photo.php rename to components/OssnProfile/plugins/default/profile/wall/profile/photo.php index e2a5117b7..22204817b 100644 --- a/components/OssnProfile/templates/wall/profile/photo.php +++ b/components/OssnProfile/plugins/default/profile/wall/profile/photo.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = ossn_get_entity($params['post']->item_guid); diff --git a/components/OssnSearch/classes/OssnSearch.php b/components/OssnSearch/classes/OssnSearch.php index 5314306e3..84b20a77c 100644 --- a/components/OssnSearch/classes/OssnSearch.php +++ b/components/OssnSearch/classes/OssnSearch.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnSearch extends OssnDatabase { diff --git a/components/OssnSearch/locale/ossn.de.php b/components/OssnSearch/locale/ossn.de.php index bb76edf97..0ede84b12 100644 --- a/components/OssnSearch/locale/ossn.de.php +++ b/components/OssnSearch/locale/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $de = array( diff --git a/components/OssnSearch/locale/ossn.en.php b/components/OssnSearch/locale/ossn.en.php index 0fb8eb260..b09910eac 100644 --- a/components/OssnSearch/locale/ossn.en.php +++ b/components/OssnSearch/locale/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $en = array( diff --git a/components/OssnSearch/ossn_com.php b/components/OssnSearch/ossn_com.php index b9a9cb626..2c548d663 100644 --- a/components/OssnSearch/ossn_com.php +++ b/components/OssnSearch/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_SEARCH__', ossn_route()->com . 'OssnSearch/'); @@ -16,7 +16,7 @@ function ossn_search() { ossn_register_page('search', 'ossn_search_page'); ossn_add_hook('search', "left", 'search_menu_handler'); - ossn_extend_view('css/ossn.default', 'components/OssnSearch/css/search'); + ossn_extend_view('css/ossn.default', 'css/search'); } function search_menu_handler($hook, $type, $return) { @@ -44,7 +44,7 @@ function ossn_search_page($pages) { if (ossn_is_hook('search', "type:{$type}")) { $contents['contents'] = ossn_call_hook('search', "type:{$type}", array('q' => input('q'))); } - $contents = array('content' => ossn_view('components/OssnSearch/pages/search', $contents),); + $contents = array('content' => ossn_plugin_view('search/pages/search', $contents),); $content = ossn_set_page_layout('search', $contents); echo ossn_view_page($title, $content); break; diff --git a/components/OssnSearch/ossn_com.xml b/components/OssnSearch/ossn_com.xml index 0c57f440e..37de4f8b7 100644 --- a/components/OssnSearch/ossn_com.xml +++ b/components/OssnSearch/ossn_com.xml @@ -1,11 +1,11 @@ - + OssnSearch Core Team Create a profile page for users. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ http://informatikon.com 1.0 \ No newline at end of file diff --git a/components/OssnSearch/css/search.php b/components/OssnSearch/plugins/default/css/search.php similarity index 72% rename from components/OssnSearch/css/search.php rename to components/OssnSearch/plugins/default/css/search.php index cc4a8c5bf..7b6632dc1 100644 --- a/components/OssnSearch/css/search.php +++ b/components/OssnSearch/plugins/default/css/search.php @@ -1,12 +1,12 @@ /** * Open Source Social Network * -* @package Open Source Social Network +* @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://www.opensource-socialnetwork.org/licence -* @link http://www.opensource-socialnetwork.org/licence +* @license General Public Licence http://www.Open Source Social Network.org/licence +* @link http://www.Open Source Social Network.org/licence */ .ossn-search-page{ width: 526px; diff --git a/components/OssnSearch/pages/search.php b/components/OssnSearch/plugins/default/search/pages/search.php similarity index 61% rename from components/OssnSearch/pages/search.php rename to components/OssnSearch/plugins/default/search/pages/search.php index d94392b7e..5e6a97711 100644 --- a/components/OssnSearch/pages/search.php +++ b/components/OssnSearch/plugins/default/search/pages/search.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    diff --git a/components/OssnSitePages/actions/edit/about.php b/components/OssnSitePages/actions/edit/about.php index c276b08f6..6e69d57ae 100644 --- a/components/OssnSitePages/actions/edit/about.php +++ b/components/OssnSitePages/actions/edit/about.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $save = new OssnSitePages; $save->pagename = 'about'; diff --git a/components/OssnSitePages/actions/edit/privacy.php b/components/OssnSitePages/actions/edit/privacy.php index ce95fcc63..2675395e6 100644 --- a/components/OssnSitePages/actions/edit/privacy.php +++ b/components/OssnSitePages/actions/edit/privacy.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $save = new OssnSitePages; $save->pagename = 'privacy'; diff --git a/components/OssnSitePages/actions/edit/terms.php b/components/OssnSitePages/actions/edit/terms.php index 2fe822fc6..bf2cd3e10 100644 --- a/components/OssnSitePages/actions/edit/terms.php +++ b/components/OssnSitePages/actions/edit/terms.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $save = new OssnSitePages; $save->pagename = 'terms'; diff --git a/components/OssnSitePages/classes/OssnSitePages.php b/components/OssnSitePages/classes/OssnSitePages.php index e4910916e..e6979c028 100644 --- a/components/OssnSitePages/classes/OssnSitePages.php +++ b/components/OssnSitePages/classes/OssnSitePages.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnSitePages extends OssnObject { /** diff --git a/components/OssnSitePages/locale/ossn.de.php b/components/OssnSitePages/locale/ossn.de.php index 6117d7f02..81abb78cc 100644 --- a/components/OssnSitePages/locale/ossn.de.php +++ b/components/OssnSitePages/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'ossnsitepages' => 'Seiten-Verwaltung', diff --git a/components/OssnSitePages/locale/ossn.en.php b/components/OssnSitePages/locale/ossn.en.php index 24f4d7be2..57b4bfff9 100644 --- a/components/OssnSitePages/locale/ossn.en.php +++ b/components/OssnSitePages/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'ossnsitepages' => 'Site Pages', diff --git a/components/OssnSitePages/ossn_com.php b/components/OssnSitePages/ossn_com.php index a9b773d36..19628eb95 100644 --- a/components/OssnSitePages/ossn_com.php +++ b/components/OssnSitePages/ossn_com.php @@ -1,19 +1,19 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ define('__OSSN_SITE_PAGES__', ossn_route()->com . 'OssnSitePages/'); require_once(__OSSN_SITE_PAGES__ . 'classes/OssnSitePages.php'); function ossn_sitepages() { //css - ossn_extend_view('css/ossn.default', 'components/OssnSitePages/css/pages'); + ossn_extend_view('css/ossn.default', 'css/pages'); //register pages ossn_register_page('site', 'ossn_site_pages'); //register admin panel page diff --git a/components/OssnSitePages/ossn_com.xml b/components/OssnSitePages/ossn_com.xml index 544468964..338af7ea4 100644 --- a/components/OssnSitePages/ossn_com.xml +++ b/components/OssnSitePages/ossn_com.xml @@ -1,11 +1,11 @@ - + Ossn Site Pages Core Team Create a about, terms page. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ http://informatikon.com 1.0 \ No newline at end of file diff --git a/components/OssnSitePages/pages/page.php b/components/OssnSitePages/pages/page.php index d97fa9175..50b4cf4a3 100644 --- a/components/OssnSitePages/pages/page.php +++ b/components/OssnSitePages/pages/page.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (!isset($params['title'])) { $params['title'] = ''; diff --git a/components/OssnSitePages/css/pages.php b/components/OssnSitePages/plugins/default/css/pages.php similarity index 73% rename from components/OssnSitePages/css/pages.php rename to components/OssnSitePages/plugins/default/css/pages.php index efc0f1671..e58fbba98 100644 --- a/components/OssnSitePages/css/pages.php +++ b/components/OssnSitePages/plugins/default/css/pages.php @@ -1,12 +1,12 @@ /** -* OpenSource-SocialNetwork +* Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team - + * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://opensource-socialnetwork.com/licence -* @link http://www.opensource-socialnetwork.com/licence +* @license General Public Licence http://www.opensource-socialnetwork.org/licence +* @link http://www.opensource-socialnetwork.org/licence */ .ossn-site-pages { diff --git a/components/OssnSitePages/forms/about.php b/components/OssnSitePages/plugins/default/forms/OssnAds/about.php similarity index 67% rename from components/OssnSitePages/forms/about.php rename to components/OssnSitePages/plugins/default/forms/OssnAds/about.php index b3a210511..d39c9ac3a 100644 --- a/components/OssnSitePages/forms/about.php +++ b/components/OssnSitePages/plugins/default/forms/OssnAds/about.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnSitePages = new OssnSitePages; $OssnSitePages->pagename = 'about'; diff --git a/components/OssnSitePages/forms/privacy.php b/components/OssnSitePages/plugins/default/forms/OssnAds/privacy.php similarity index 68% rename from components/OssnSitePages/forms/privacy.php rename to components/OssnSitePages/plugins/default/forms/OssnAds/privacy.php index f563fbc34..2fc1c41df 100644 --- a/components/OssnSitePages/forms/privacy.php +++ b/components/OssnSitePages/plugins/default/forms/OssnAds/privacy.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnSitePages = new OssnSitePages; $OssnSitePages->pagename = 'privacy'; diff --git a/components/OssnSitePages/forms/terms.php b/components/OssnSitePages/plugins/default/forms/OssnAds/terms.php similarity index 100% rename from components/OssnSitePages/forms/terms.php rename to components/OssnSitePages/plugins/default/forms/OssnAds/terms.php diff --git a/components/OssnSitePages/administrator/settings.php b/components/OssnSitePages/plugins/default/settings/administrator/OssnAds/settings.php similarity index 90% rename from components/OssnSitePages/administrator/settings.php rename to components/OssnSitePages/plugins/default/settings/administrator/OssnAds/settings.php index 17f209054..309c5b9ce 100644 --- a/components/OssnSitePages/administrator/settings.php +++ b/components/OssnSitePages/plugins/default/settings/administrator/OssnAds/settings.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?>
    diff --git a/components/OssnSmilies/ossn_com.php b/components/OssnSmilies/ossn_com.php index c4a80a3cb..164532e2d 100644 --- a/components/OssnSmilies/ossn_com.php +++ b/components/OssnSmilies/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_SMILIES__', ossn_route()->com . 'OssnSmilies/'); diff --git a/components/OssnSmilies/ossn_com.xml b/components/OssnSmilies/ossn_com.xml index e07769331..ad6d01138 100644 --- a/components/OssnSmilies/ossn_com.xml +++ b/components/OssnSmilies/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnSmilies Core Team Convert ascii patterns into smilies on OssnWall. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnWall/actions/wall/admin/settings.php b/components/OssnWall/actions/wall/admin/settings.php index 79578a54a..6740bebe0 100644 --- a/components/OssnWall/actions/wall/admin/settings.php +++ b/components/OssnWall/actions/wall/admin/settings.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $type = input('type'); $types = array( diff --git a/components/OssnWall/actions/wall/post/delete.php b/components/OssnWall/actions/wall/post/delete.php index 3003dfefe..8db86699b 100644 --- a/components/OssnWall/actions/wall/post/delete.php +++ b/components/OssnWall/actions/wall/post/delete.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $ossnwall = new OssnWall; $id = input('post'); diff --git a/components/OssnWall/actions/wall/post/group.php b/components/OssnWall/actions/wall/post/group.php index 7d4000e62..156a24b2f 100644 --- a/components/OssnWall/actions/wall/post/group.php +++ b/components/OssnWall/actions/wall/post/group.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnWall = new OssnWall; diff --git a/components/OssnWall/actions/wall/post/home.php b/components/OssnWall/actions/wall/post/home.php index 9c34a1c5d..cc0a1f6ba 100644 --- a/components/OssnWall/actions/wall/post/home.php +++ b/components/OssnWall/actions/wall/post/home.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ //init ossnwall diff --git a/components/OssnWall/actions/wall/post/user.php b/components/OssnWall/actions/wall/post/user.php index cc60b96ae..201e4def8 100644 --- a/components/OssnWall/actions/wall/post/user.php +++ b/components/OssnWall/actions/wall/post/user.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ //init ossnwall diff --git a/components/OssnWall/classes/OssnWall.php b/components/OssnWall/classes/OssnWall.php index e9069f14e..eed873bc8 100644 --- a/components/OssnWall/classes/OssnWall.php +++ b/components/OssnWall/classes/OssnWall.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnWall extends OssnObject { /** @@ -98,7 +98,7 @@ public function GetPostByOwner($owner, $type = 'user') { $this->type = $type; $this->subtype = 'wall'; $this->owner_guid = $owner; - $this->order_by = 'guid DESC'; + $this->order_by = 'o.guid DESC'; return $this->getObjectByOwner(); } @@ -113,7 +113,7 @@ public function GetUserPosts($user) { $this->type = "user"; $this->subtype = 'wall'; $this->owner_guid = $user; - $this->order_by = 'guid DESC'; + $this->order_by = 'o.guid DESC'; return $this->getObjectByOwner(); } @@ -165,11 +165,13 @@ public function deleteAllPosts() { * * @return object; */ - public function GetPosts() { - self::initAttributes(); - $this->subtype = 'wall'; - $this->order_by = 'guid DESC'; - return $this->getObjectsByTypes(); + public function GetPosts(array $params = array()) { + $default = array( + 'subtype' => 'wall', + 'order_by' => 'o.guid DESC' + ); + $options = array_merge($default, $params); + return $this->searchObject($options); } /** * Get user group posts guids @@ -208,8 +210,7 @@ public static function getUserGroupPostsGuids($userguid) { * * @return array; */ - public function getFriendsPosts() { - self::initAttributes(); + public function getFriendsPosts($params = array()) { $user = ossn_loggedin_user(); if(isset($user->guid) && !empty($user->guid)) { $friends = $user->getFriends(); @@ -224,19 +225,40 @@ public function getFriendsPosts() { $friend_guids[] = $user->guid; $friend_guids = implode(',', $friend_guids); - $wheres = "md.guid = e.guid - AND e.subtype='poster_guid' - AND e.type = 'object' - AND md.value IN ({$friend_guids}) - AND o.guid = e.owner_guid"; - - $this->OssnDatabase->statement("SELECT o.* FROM ossn_entities as e, - ossn_entities_metadata as md, - ossn_object as o WHERE({$wheres}) ORDER BY guid DESC;"); - $this->OssnDatabase->execute(); - $data = $this->OssnDatabase->fetch(true); - if($data){ - return $data; + //prepare default attributes + $default = array( + 'limit' => false, + 'offset' => input('offset', '', 1), + 'page_limit' => ossn_call_hook('pagination', 'page_limit', false, 10), //call hook for page limit + 'count' => false + ); + $options = array_merge($default, $params); + //get only required result, don't bust your server memory + $getlimit = $this->generateLimit($options['limit'], $options['page_limit'], $options['offset']); + if($getlimit) { + $options['limit'] = $getlimit; + } + $wheres = array( + "md.guid = e.guid", + "e.subtype='poster_guid'", + "e.type = 'object'", + "md.value IN ({$friend_guids})", + "o.guid = e.owner_guid" + ); + $vars = array(); + + $vars['from'] = 'ossn_entities as e, ossn_entities_metadata as md, ossn_object as o'; + $vars['params'] = array( + "o.*" + ); + $vars['wheres'] = array( + $this->constructWheres($wheres) + ); + $vars['order_by'] = "guid DESC"; + $vars['limit'] = $options['limit']; + $data = $this->select($vars, true); + if($data) { + return $data; } } diff --git a/components/OssnWall/forms/privacy.php b/components/OssnWall/forms/privacy.php deleted file mode 100644 index 2325abc68..000000000 --- a/components/OssnWall/forms/privacy.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -echo '
    ' . ossn_print('post:select:privacy') . '
    '; -echo ossn_view('system/templates/input/privacy'); diff --git a/components/OssnWall/locale/ossn.de.php b/components/OssnWall/locale/ossn.de.php index 68417c50d..c862929b2 100644 --- a/components/OssnWall/locale/ossn.de.php +++ b/components/OssnWall/locale/ossn.de.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $de = array( 'ossnwall' => 'OssnWall', diff --git a/components/OssnWall/locale/ossn.en.php b/components/OssnWall/locale/ossn.en.php index b9915db0e..28e324dd3 100644 --- a/components/OssnWall/locale/ossn.en.php +++ b/components/OssnWall/locale/ossn.en.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ $en = array( 'ossnwall' => 'OssnWall', diff --git a/components/OssnWall/ossn_com.php b/components/OssnWall/ossn_com.php index c4a882b20..ea632e405 100644 --- a/components/OssnWall/ossn_com.php +++ b/components/OssnWall/ossn_com.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ define('__OSSN_WALL__', ossn_route()->com . 'OssnWall/'); require_once(__OSSN_WALL__ . 'classes/OssnWall.php'); @@ -30,8 +30,8 @@ function ossn_wall() { ossn_register_action('wall/admin/settings', __OSSN_WALL__ . 'actions/wall/admin/settings.php'); } //css and js - ossn_extend_view('css/ossn.default', 'components/OssnWall/css/wall'); - ossn_extend_view('js/opensource.socialnetwork', 'components/OssnWall/js/ossn_wall'); + ossn_extend_view('css/ossn.default', 'css/wall'); + ossn_extend_view('js/opensource.socialnetwork', 'js/ossn_wall'); //pages ossn_register_page('post', 'ossn_post_page'); @@ -191,7 +191,7 @@ function ossn_post_page($pages) { $params['post'] = $post; $contents = array( - 'content' => ossn_view('components/OssnWall/pages/view', $params) + 'content' => ossn_plugin_view('wall/pages/view', $params) ); $content = ossn_set_page_layout('newsfeed', $contents); echo ossn_view_page($title, $content); @@ -208,14 +208,14 @@ function ossn_post_page($pages) { if(ossn_is_xhr()) { $params = array( 'title' => ossn_print('privacy'), - 'contents' => ossn_view('components/OssnWall/wall/privacy'), + 'contents' => ossn_plugin_view('all/privacy'), 'callback' => '#ossn-wall-privacy' ); - echo ossn_view('system/templates/output/ossnbox', $params); + echo ossn_plugin_view('output/ossnbox', $params); } break; case 'refresh_home': - echo ossn_view('components/OssnWall/wall/siteactivity'); + echo ossn_plugin_view('wall/siteactivity'); break; default: ossn_error_page(); @@ -246,7 +246,7 @@ function ossn_wall_post_menu($hook, $type, $return, $params) { } else { ossn_unregister_menu('delete', 'wallpost'); } - return ossn_view_menu('wallpost', 'components/OssnWall/menus/post-controls'); + return ossn_view_menu('wallpost', 'wall/menus/post-controls'); } /** * Delete group wall posts @@ -327,7 +327,7 @@ function ossn_wall_view_template(array $params) { */ function ossn_wall_templates($hook, $type, $return, $params) { $params = ossn_call_hook('wall', 'templates:item', $params, $params); - return ossn_view("components/OssnWall/templates/wall/{$type}/item", $params); + return ossn_plugin_view("wall/templates/wall/{$type}/item", $params); } /** * Set homepage wall items type friends/public diff --git a/components/OssnWall/ossn_com.xml b/components/OssnWall/ossn_com.xml index cae26fd16..d4c0488f3 100644 --- a/components/OssnWall/ossn_com.xml +++ b/components/OssnWall/ossn_com.xml @@ -1,10 +1,10 @@ - + OssnWall Core Team Create a profile page for users. GPL V2 http://www.informatikon.com/ - http://opensource-socialnetwork.org/licence/ + http://www.opensource-socialnetwork.org/licence/ 1.0 \ No newline at end of file diff --git a/components/OssnWall/css/wall.php b/components/OssnWall/plugins/default/css/wall.php similarity index 97% rename from components/OssnWall/css/wall.php rename to components/OssnWall/plugins/default/css/wall.php index e4b5b5e5e..cf080da1f 100644 --- a/components/OssnWall/css/wall.php +++ b/components/OssnWall/plugins/default/css/wall.php @@ -1,12 +1,12 @@ /** -* OpenSource-SocialNetwork +* Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team - + * @copyright 2014 iNFORMATIKON TECHNOLOGIES -* @license General Public Licence http://opensource-socialnetwork.com/licence -* @link http://www.opensource-socialnetwork.com/licence +* @license General Public Licence http://www.opensource-socialnetwork.org/licence +* @link http://www.opensource-socialnetwork.org/licence */ .ossn-wall-container { width: 526px; diff --git a/components/OssnWall/forms/administrator/settings.php b/components/OssnWall/plugins/default/forms/OssnWall/administrator/settings.php similarity index 81% rename from components/OssnWall/forms/administrator/settings.php rename to components/OssnWall/plugins/default/forms/OssnWall/administrator/settings.php index e4e90b313..2fb0d1128 100644 --- a/components/OssnWall/forms/administrator/settings.php +++ b/components/OssnWall/plugins/default/forms/OssnWall/administrator/settings.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ ?> diff --git a/components/OssnWall/forms/group/container.php b/components/OssnWall/plugins/default/forms/OssnWall/group/container.php similarity index 83% rename from components/OssnWall/forms/group/container.php rename to components/OssnWall/plugins/default/forms/OssnWall/group/container.php index da8f30727..1125169a4 100644 --- a/components/OssnWall/forms/group/container.php +++ b/components/OssnWall/plugins/default/forms/OssnWall/group/container.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnWall/forms/home/container.php b/components/OssnWall/plugins/default/forms/OssnWall/home/container.php similarity index 88% rename from components/OssnWall/forms/home/container.php rename to components/OssnWall/plugins/default/forms/OssnWall/home/container.php index 66db5ac04..901d0faf0 100644 --- a/components/OssnWall/forms/home/container.php +++ b/components/OssnWall/plugins/default/forms/OssnWall/home/container.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if (!isset($params['user']->guid)) { $params['user'] = new stdClass; diff --git a/components/OssnWall/plugins/default/forms/OssnWall/privacy.php b/components/OssnWall/plugins/default/forms/OssnWall/privacy.php new file mode 100644 index 000000000..57d6d0823 --- /dev/null +++ b/components/OssnWall/plugins/default/forms/OssnWall/privacy.php @@ -0,0 +1,12 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +echo '
    ' . ossn_print('post:select:privacy') . '
    '; +echo ossn_plugin_view('input/privacy'); diff --git a/components/OssnWall/forms/user/container.php b/components/OssnWall/plugins/default/forms/OssnWall/user/container.php similarity index 85% rename from components/OssnWall/forms/user/container.php rename to components/OssnWall/plugins/default/forms/OssnWall/user/container.php index f156ce8bf..eb22979c0 100644 --- a/components/OssnWall/forms/user/container.php +++ b/components/OssnWall/plugins/default/forms/OssnWall/user/container.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/components/OssnWall/js/ossn_wall.php b/components/OssnWall/plugins/default/js/ossn_wall.php similarity index 93% rename from components/OssnWall/js/ossn_wall.php rename to components/OssnWall/plugins/default/js/ossn_wall.php index 9b0348e51..e654dbc18 100644 --- a/components/OssnWall/js/ossn_wall.php +++ b/components/OssnWall/plugins/default/js/ossn_wall.php @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ Ossn.RegisterStartupFunction(function(){ $(document).ready(function(){ diff --git a/components/OssnWall/administrator/settings.php b/components/OssnWall/plugins/default/settings/administrator/OssnWall/settings.php similarity index 65% rename from components/OssnWall/administrator/settings.php rename to components/OssnWall/plugins/default/settings/administrator/OssnWall/settings.php index d20080e43..afd9f011d 100644 --- a/components/OssnWall/administrator/settings.php +++ b/components/OssnWall/plugins/default/settings/administrator/OssnWall/settings.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ echo ossn_view_form('administrator/settings', array( diff --git a/components/OssnWall/wall/group.php b/components/OssnWall/plugins/default/wall/group.php similarity index 88% rename from components/OssnWall/wall/group.php rename to components/OssnWall/plugins/default/wall/group.php index b9a53352a..90b62dd1a 100644 --- a/components/OssnWall/wall/group.php +++ b/components/OssnWall/plugins/default/wall/group.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ if($params['ismember'] === 1){ echo '
    '; diff --git a/components/OssnWall/menus/post-controls.php b/components/OssnWall/plugins/default/wall/menus/post-controls.php similarity index 76% rename from components/OssnWall/menus/post-controls.php rename to components/OssnWall/plugins/default/wall/menus/post-controls.php index dc8b207b3..c8b74f217 100644 --- a/components/OssnWall/menus/post-controls.php +++ b/components/OssnWall/plugins/default/wall/menus/post-controls.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $postcontrols = $params['menu']; if($postcontrols){ diff --git a/components/OssnWall/pages/view.php b/components/OssnWall/plugins/default/wall/pages/view.php similarity index 83% rename from components/OssnWall/pages/view.php rename to components/OssnWall/plugins/default/wall/pages/view.php index 9053f21f1..2e987a644 100644 --- a/components/OssnWall/pages/view.php +++ b/components/OssnWall/plugins/default/wall/pages/view.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; $data = json_decode(html_entity_decode($params['post']->description)); diff --git a/components/OssnWall/pages/wall.php b/components/OssnWall/plugins/default/wall/pages/wall.php similarity index 69% rename from components/OssnWall/pages/wall.php rename to components/OssnWall/plugins/default/wall/pages/wall.php index 0dc3f297a..7add9e8a0 100644 --- a/components/OssnWall/pages/wall.php +++ b/components/OssnWall/plugins/default/wall/pages/wall.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ if (!isset($params['user'])) { $params['user'] = ''; @@ -21,5 +21,5 @@ echo '
    '; echo '
    '; -echo ossn_view('components/OssnWall/wall/siteactivity'); +echo ossn_plugin_view('wall/siteactivity'); echo '
    '; diff --git a/components/OssnWall/plugins/default/wall/privacy.php b/components/OssnWall/plugins/default/wall/privacy.php new file mode 100644 index 000000000..2a48fb844 --- /dev/null +++ b/components/OssnWall/plugins/default/wall/privacy.php @@ -0,0 +1,14 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +echo ossn_view_form('privacy', array( + 'component' => 'OssnWall', + 'id' => 'ossn-wall-privacy-container', + ), false); \ No newline at end of file diff --git a/components/OssnWall/wall/siteactivity.php b/components/OssnWall/plugins/default/wall/siteactivity.php similarity index 75% rename from components/OssnWall/wall/siteactivity.php rename to components/OssnWall/plugins/default/wall/siteactivity.php index 258f1adaa..c742802cb 100644 --- a/components/OssnWall/wall/siteactivity.php +++ b/components/OssnWall/plugins/default/wall/siteactivity.php @@ -2,23 +2,20 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ -$posts = new OssnWall; +$wall = new OssnWall; $accesstype = ossn_get_homepage_wall_access(); if($accesstype == 'public' || ossn_isAdminLoggedin()){ - $posts = $posts->GetPosts(); + $posts = $wall->GetPosts(); + $count = $wall->GetPosts(array('count' => true)); } elseif($accesstype == 'friends'){ - $posts = $posts->getFriendsPosts(); + $posts = $wall->getFriendsPosts(); } -$Pagination = new OssnPagination; -$Pagination->setItem($posts); -$posts = $Pagination->getItem(); - if ($posts) { foreach ($posts as $post) { if(!isset($post->poster_guid)){ @@ -40,7 +37,7 @@ $user = ossn_user_by_guid($post->poster_guid); if ($post->access == OSSN_FRIENDS) { if (ossn_user_is_friend(ossn_loggedin_user()->guid, $post->owner_guid) || ossn_loggedin_user()->guid == $post->owner_guid) { - echo ossn_view('components/OssnWall/templates/activity-item', array( + echo ossn_plugin_view('wall/templates/activity-item', array( 'post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, @@ -52,7 +49,7 @@ } } if ($post->access == OSSN_PUBLIC) { - echo ossn_view('components/OssnWall/templates/activity-item', array( + echo ossn_plugin_view('wall/templates/activity-item', array( 'post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, @@ -63,5 +60,6 @@ } unset($data->friend); } + } -echo $Pagination->pagination(); +echo ossn_view_pagination($count); \ No newline at end of file diff --git a/components/OssnWall/plugins/default/wall/templates/activity-item.php b/components/OssnWall/plugins/default/wall/templates/activity-item.php new file mode 100644 index 000000000..1353d3109 --- /dev/null +++ b/components/OssnWall/plugins/default/wall/templates/activity-item.php @@ -0,0 +1,11 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +echo ossn_wall_view_template($params); diff --git a/components/OssnWall/templates/wall/group/item.php b/components/OssnWall/plugins/default/wall/templates/wall/group/item.php similarity index 91% rename from components/OssnWall/templates/wall/group/item.php rename to components/OssnWall/plugins/default/wall/templates/wall/group/item.php index e640243c0..91674d24b 100644 --- a/components/OssnWall/templates/wall/group/item.php +++ b/components/OssnWall/plugins/default/wall/templates/wall/group/item.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = $params['image']; if (!isset($params['show_group'])) { diff --git a/components/OssnWall/templates/wall/user/item.php b/components/OssnWall/plugins/default/wall/templates/wall/user/item.php similarity index 93% rename from components/OssnWall/templates/wall/user/item.php rename to components/OssnWall/plugins/default/wall/templates/wall/user/item.php index 9f5be7d20..a2326d8ca 100644 --- a/components/OssnWall/templates/wall/user/item.php +++ b/components/OssnWall/plugins/default/wall/templates/wall/user/item.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $image = $params['image']; diff --git a/components/OssnWall/user/wall.php b/components/OssnWall/plugins/default/wall/user/wall.php similarity index 84% rename from components/OssnWall/user/wall.php rename to components/OssnWall/plugins/default/wall/user/wall.php index 789b96db7..56bc5f633 100644 --- a/components/OssnWall/user/wall.php +++ b/components/OssnWall/plugins/default/wall/user/wall.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $posts = new OssnWall; $posts = $posts->GetUserPosts($params['user']->guid); @@ -47,7 +47,7 @@ if($post->access == OSSN_FRIENDS) { //lastchage: site admins are unable to access member profile threads without friendship #176 if(ossn_user_is_friend(ossn_loggedin_user()->guid, $post->owner_guid) || ossn_loggedin_user()->guid == $post->owner_guid || ossn_isAdminLoggedin()) { - echo ossn_view('components/OssnWall/templates/activity-item', array( + echo ossn_plugin_view('wall/templates/activity-item', array( 'post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, @@ -58,7 +58,7 @@ } } if($post->access == OSSN_PUBLIC) { - echo ossn_view('components/OssnWall/templates/activity-item', array( + echo ossn_plugin_view('wall/templates/activity-item', array( 'post' => $post, 'friends' => explode(',', $data->friend), 'text' => $text, diff --git a/components/OssnWall/templates/activity-item.php b/components/OssnWall/templates/activity-item.php deleted file mode 100644 index e76e4edff..000000000 --- a/components/OssnWall/templates/activity-item.php +++ /dev/null @@ -1,11 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -echo ossn_wall_view_template($params); diff --git a/components/OssnWall/wall/privacy.php b/components/OssnWall/wall/privacy.php deleted file mode 100644 index b920e92de..000000000 --- a/components/OssnWall/wall/privacy.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -echo ossn_view_form('privacy', array( - 'component' => 'OssnWall', - 'id' => 'ossn-wall-privacy-container', - ), false); \ No newline at end of file diff --git a/configurations/classes.php b/configurations/classes.php index 23b97f0b5..14966173d 100644 --- a/configurations/classes.php +++ b/configurations/classes.php @@ -1,17 +1,18 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $Ossn->classes = array( 'SiteException', 'DatabaseException', 'Base', + 'Translit', 'Mail', 'Pagination', 'Database', diff --git a/configurations/libraries.php b/configurations/libraries.php index a16c45ebf..3c13ed623 100644 --- a/configurations/libraries.php +++ b/configurations/libraries.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $Ossn->libraries = array( @@ -19,6 +19,7 @@ 'annotations', 'system', 'views', + 'plugins', 'page', 'menus', 'css', @@ -28,7 +29,8 @@ 'users', 'image', 'admin', - 'components', - 'upgrade', + 'themes', + 'components', + 'upgrade', 'securitytoken', ); diff --git a/configurations/ossn.config.db.example.php b/configurations/ossn.config.db.example.php index 2cd683cb1..bd16b1830 100644 --- a/configurations/ossn.config.db.example.php +++ b/configurations/ossn.config.db.example.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/configurations/ossn.config.site.example.php b/configurations/ossn.config.site.example.php index fe6d27d4d..5e21266f7 100644 --- a/configurations/ossn.config.site.example.php +++ b/configurations/ossn.config.site.example.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $Ossn->url = '<>'; diff --git a/forms/admin/users/list_search.php b/forms/admin/users/list_search.php deleted file mode 100644 index c2e7609b1..000000000 --- a/forms/admin/users/list_search.php +++ /dev/null @@ -1,14 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -?> - \ No newline at end of file diff --git a/index.php b/index.php index 561a28098..d60bf0c39 100644 --- a/index.php +++ b/index.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ require_once('system/start.php'); //page handler diff --git a/installation/actions/account.php b/installation/actions/account.php index ab7f4aca6..ede56ce7a 100644 --- a/installation/actions/account.php +++ b/installation/actions/account.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/installation/actions/finish.php b/installation/actions/finish.php index 16638b70d..e62e0d421 100644 --- a/installation/actions/finish.php +++ b/installation/actions/finish.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ file_put_contents(ossn_installation_paths()->root . 'INSTALLED', 1); diff --git a/installation/actions/install.php b/installation/actions/install.php index fb6f1b544..c33db4b2d 100644 --- a/installation/actions/install.php +++ b/installation/actions/install.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $Settings = new OssnInstallation; diff --git a/installation/classes/OssnInstall.php b/installation/classes/OssnInstall.php index c9fe50a9c..a615ed4f1 100644 --- a/installation/classes/OssnInstall.php +++ b/installation/classes/OssnInstall.php @@ -1,13 +1,13 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ class OssnInstallation { /** @@ -222,7 +222,7 @@ public function INSTALL() { $this->error_mesg = $this->connect_err->connect_errn; return false; } - if ($script = file_get_contents(ossn_installation_paths()->root . 'sql/opensource-socialnetwork.sql')) { + if ($script = file_get_contents(ossn_installation_paths()->root . 'sql/Open Source Social Network.sql')) { $script = str_replace('<>', $this->startup_settings['owner_email'], $script); $script = str_replace('<>', $this->startup_settings['notification_email'], $script); $script = str_replace('<>', $this->startup_settings['sitename'], $script); diff --git a/installation/index.php b/installation/index.php index 41487439f..78348fcf6 100644 --- a/installation/index.php +++ b/installation/index.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ global $OssnInstall; if (!isset($OssnInstall)) { @@ -20,7 +20,7 @@ ini_set('display_errors', 'off'); } if (is_file('INSTALLED')) { - exit('It seems the Opensource-Socialnetwork is already installed'); + exit('It seems the Open Source Social Network is already installed'); } require_once(dirname(__FILE__) . '/libraries/ossn.install.php'); require_once(dirname(__FILE__) . '/classes/OssnInstall.php'); diff --git a/installation/libraries/ossn.install.php b/installation/libraries/ossn.install.php index 5f40888ac..be234a441 100644 --- a/installation/libraries/ossn.install.php +++ b/installation/libraries/ossn.install.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/installation/locales/ossn.de.php b/installation/locales/ossn.de.php index 4e3d5533f..d4f4eb7f8 100644 --- a/installation/locales/ossn.de.php +++ b/installation/locales/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/installation/locales/ossn.en.php b/installation/locales/ossn.en.php index 4f42907b5..933867310 100644 --- a/installation/locales/ossn.en.php +++ b/installation/locales/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/installation/pages/account.php b/installation/pages/account.php index c6cb37944..99823606e 100644 --- a/installation/pages/account.php +++ b/installation/pages/account.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ require_once(dirname(dirname(dirname(__FILE__))) . '/system/start.php'); diff --git a/installation/pages/check.php b/installation/pages/check.php index 15fe09801..1f2572d54 100644 --- a/installation/pages/check.php +++ b/installation/pages/check.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/installation/pages/index.php b/installation/pages/index.php index f2f636ffd..924a3a437 100644 --- a/installation/pages/index.php +++ b/installation/pages/index.php @@ -1,11 +1,11 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ diff --git a/installation/pages/installed.php b/installation/pages/installed.php index 3d183dbd4..ec7467f0a 100644 --- a/installation/pages/installed.php +++ b/installation/pages/installed.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; diff --git a/installation/pages/settings.php b/installation/pages/settings.php index d3871488c..c795ca834 100644 --- a/installation/pages/settings.php +++ b/installation/pages/settings.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '
    '; diff --git a/installation/styles/ossn.install.css b/installation/styles/ossn.install.css index 2e792fcc0..b27a7394d 100644 --- a/installation/styles/ossn.install.css +++ b/installation/styles/ossn.install.css @@ -1,11 +1,11 @@ /** - * OpenSource-SocialNetwork + * Open Source Social Network * * @package (Informatikon.com).ossn - * @author OSSN Core Team + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ body { padding-bottom: 10px; diff --git a/installation/templates/page.php b/installation/templates/page.php index 30bb9c0eb..7b154c41c 100644 --- a/installation/templates/page.php +++ b/installation/templates/page.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?> diff --git a/javascripts/libraries/languages.php b/javascripts/libraries/languages.php deleted file mode 100644 index a39d4e094..000000000 --- a/javascripts/libraries/languages.php +++ /dev/null @@ -1,12 +0,0 @@ - - * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence - */ -?> -var OssnLocale = ; diff --git a/libraries/ossn.lib.actions.php b/libraries/ossn.lib.actions.php index 529fa248b..8073f7208 100644 --- a/libraries/ossn.lib.actions.php +++ b/libraries/ossn.lib.actions.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.admin.php b/libraries/ossn.lib.admin.php index d4641c0d3..a98da0a62 100644 --- a/libraries/ossn.lib.admin.php +++ b/libraries/ossn.lib.admin.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** * Initialize the admin library @@ -32,8 +32,8 @@ function ossn_admin() { ossn_register_menu_link('home', 'admin:dashboard', ossn_site_url('administrator'), 'topbar_admin'); ossn_register_menu_link('configure', 'Configure', '#', 'topbar_admin'); - ossn_register_menu_link('help', 'admin:help', 'http://community.opensource-socialnetwork.org', 'topbar_admin'); - ossn_register_menu_link('support', 'admin:support', 'http://community.opensource-socialnetwork.org', 'topbar_admin'); + ossn_register_menu_link('help', 'admin:help', 'http://community.Open Source Social Network.org', 'topbar_admin'); + ossn_register_menu_link('support', 'admin:support', 'http://community.Open Source Social Network.org', 'topbar_admin'); ossn_register_menu_link('viewsite', 'admin:view:site', ossn_site_url(), 'topbar_admin'); @@ -162,7 +162,7 @@ function ossn_view_admin_sidemenu() { global $Ossn; $params['menu'] = $Ossn->menu['admin/sidemenu']; $active_theme = ossn_site_settings('theme'); - return ossn_view("themes/{$active_theme}/menus/admin_sidemenu", $params); + return ossn_plugin_view("menus/admin_sidemenu", $params); } @@ -202,7 +202,7 @@ function ossn_administrator_pagehandler($pages) { $com['com'] = OssnComponents::getCom($pages[1]); $com['settings'] = ossn_components()->getComSettings($pages[1]); $title = $com['com']->com_name; - $contents['contents'] = ossn_view("components/{$pages[1]}/administrator/{$Ossn->com_panel[$pages[1]]}", $com); + $contents['contents'] = ossn_plugin_view("settings/administrator/{$pages[1]}/{$Ossn->com_panel[$pages[1]]}", $com); $contents['title'] = $title; $content = ossn_set_page_layout('administrator/administrator', $contents); echo ossn_view_page($title, $content, 'administrator'); @@ -315,5 +315,4 @@ function ossn_administrator_login_pagehandler($pages) { } } - ossn_register_callback('ossn', 'init', 'ossn_admin'); \ No newline at end of file diff --git a/libraries/ossn.lib.annotations.php b/libraries/ossn.lib.annotations.php index 198f1e8c7..18e0d236b 100644 --- a/libraries/ossn.lib.annotations.php +++ b/libraries/ossn.lib.annotations.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.cache.php b/libraries/ossn.lib.cache.php index 6ba2a057d..b3fe2a598 100644 --- a/libraries/ossn.lib.cache.php +++ b/libraries/ossn.lib.cache.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** @@ -14,19 +14,19 @@ * * @return false|null */ -function ossn_trigger_css_cache() { +function ossn_trigger_css_cache($cache = '') { global $Ossn; require_once(ossn_route()->libs . 'minify/CSS.php'); $dir = ossn_route()->cache; - if (!is_dir("{$dir}css/view/")) { - mkdir("{$dir}css/view/", 0755, true); + if (!is_dir("{$dir}css/{$cache}/view/")) { + mkdir("{$dir}css/{$cache}/view/", 0755, true); } if (!isset($Ossn->css)) { return false; } foreach ($Ossn->css as $name => $file) { - $cache_file = "{$dir}css/view/{$name}.css"; - $css = Minify_CSS::minify(ossn_view($file)); + $cache_file = "{$dir}css/{$cache}/view/{$name}.css"; + $css = Minify_CSS::minify(ossn_plugin_view($file)); $css .= Minify_CSS::minify(ossn_fetch_extend_views("css/{$name}")); file_put_contents($cache_file, $css); } @@ -37,24 +37,40 @@ function ossn_trigger_css_cache() { * * @return false|null */ -function ossn_trigger_js_cache() { +function ossn_trigger_js_cache($cache = '') { global $Ossn; require_once(ossn_route()->libs . 'minify/JSMin.php'); $dir = ossn_route()->cache; - if (!is_dir("{$dir}js/view/")) { - mkdir("{$dir}js/view/", 0755, true); + if (!is_dir("{$dir}js/{$cache}/view/")) { + mkdir("{$dir}js/{$cache}/view/", 0755, true); } if (!isset($Ossn->js)) { return false; } foreach ($Ossn->js as $name => $file) { - $cache_file = "{$dir}js/view/{$name}.js"; - $js = JSMin::minify(ossn_view($file)); + $cache_file = "{$dir}js/{$cache}/view/{$name}.js"; + $js = JSMin::minify(ossn_plugin_view($file)); $js .= JSMin::minify(ossn_fetch_extend_views("js/{$name}")); file_put_contents($cache_file, $js); } } - +/** + * Create a cache for plugin paths + * + * @return void; + */ + function ossn_trigger_plugins_cache(){ + global $Ossn; + if(isset($Ossn->plugins)){ + //we have to also secure paths + $dir = ossn_get_userdata("system/"); + if(!is_dir($dir)){ + mkdir($dir, 0755, true); + } + $encode = json_encode($Ossn->plugins); + file_put_contents($dir . 'plugins_paths', $encode); + } + } /** * Create and Enable site cache * @@ -67,13 +83,35 @@ function ossn_create_cache() { $params['values'] = array(1); $params['wheres'] = array("setting_id='4'"); if ($database->update($params)) { - ossn_trigger_css_cache(); - ossn_trigger_js_cache(); + $cache = ossn_update_last_cache(); + if($cache){ + ossn_link_cache_files($cache); + } return true; } return false; } - +/** + * Update last cache time + * + * @return integer; + */ +function ossn_update_last_cache($type = true){ + if($type === true){ + $time = time(); + } else { + $time = 0; + } + $database = new OssnDatabase; + $params['table'] = 'ossn_site_settings'; + $params['names'] = array('value'); + $params['values'] = array($time); + $params['wheres'] = array("name='last_cache'"); + if ($database->update($params)) { + return $time; + } + return false; +} /** * Disable cache * @@ -86,8 +124,31 @@ function ossn_disable_cache() { $params['values'] = array(0); $params['wheres'] = array("setting_id='4'"); if ($database->update($params)) { - OssnFile::DeleteDir(ossn_route()->cache); + ossn_update_last_cache(false); + ossn_unlink_cache_files(); return true; } return false; +} +/** + * Link cache files + * + * @return void; + */ +function ossn_link_cache_files($cache){ + if(empty($cache)){ + return false; + } + ossn_trigger_css_cache($cache); + ossn_trigger_js_cache($cache); + ossn_trigger_plugins_cache(); +} +/** + * Unlink cache files + * + * @return void; + */ +function ossn_unlink_cache_files(){ + OssnFile::DeleteDir(ossn_route()->cache); + OssnFile::DeleteDir(ossn_get_userdata("system/")); } \ No newline at end of file diff --git a/libraries/ossn.lib.components.php b/libraries/ossn.lib.components.php index dd0aaeab1..10bbd7671 100644 --- a/libraries/ossn.lib.components.php +++ b/libraries/ossn.lib.components.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** * Get components object diff --git a/libraries/ossn.lib.css.php b/libraries/ossn.lib.css.php index e0dab712e..a5f93ae0f 100644 --- a/libraries/ossn.lib.css.php +++ b/libraries/ossn.lib.css.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ossn_register_callback('ossn', 'init', 'ossn_css'); /** @@ -133,7 +133,8 @@ function ossn_css_site() { foreach ($Ossn->csshead['site'] as $css) { $href = "{$url}css/view/{$css}.css"; if (ossn_site_settings('cache') == 1) { - $href = "{$url}cache/css/view/{$css}.css"; + $cache = ossn_site_settings('last_cache'); + $href = "{$url}cache/css/{$cache}/view/{$css}.css"; } echo ossn_html_css(array('href' => $href)); } @@ -153,7 +154,8 @@ function ossn_css_admin() { foreach ($Ossn->csshead['admin'] as $css) { $href = "{$url}css/view/{$css}.css"; if (ossn_site_settings('cache') == 1) { - $href = "{$url}cache/css/view/{$css}.css"; + $cache = ossn_site_settings('last_cache'); + $href = "{$url}cache/css/{$cache}/view/{$css}.css"; } echo ossn_html_css(array('href' => $href)); } @@ -170,7 +172,7 @@ function ossn_css_trigger($hook, $type, $value, $params) { if (isset($params[1]) && substr($params[1], '-4') == '.css') { $params[1] = str_replace('.css', '', $params[1]); if (isset($Ossn->css[$params[1]])) { - $file = ossn_view($Ossn->css[$params[1]]); + $file = ossn_plugin_view($Ossn->css[$params[1]]); $extended = ossn_fetch_extend_views("css/{$params[1]}"); $data = array( $file, diff --git a/libraries/ossn.lib.entities.php b/libraries/ossn.lib.entities.php index 727c29307..d7f666b4a 100644 --- a/libraries/ossn.lib.entities.php +++ b/libraries/ossn.lib.entities.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.image.php b/libraries/ossn.lib.image.php index 087936694..9efff203a 100644 --- a/libraries/ossn.lib.image.php +++ b/libraries/ossn.lib.image.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.initialize.php b/libraries/ossn.lib.initialize.php index 4d318b8e4..adac9de76 100644 --- a/libraries/ossn.lib.initialize.php +++ b/libraries/ossn.lib.initialize.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ //register all available language @@ -52,6 +52,8 @@ function ossn_initialize() { ossn_register_page('resetlogin', 'ossn_user_pagehandler'); ossn_add_hook('newsfeed', "sidebar:left", 'newfeed_menu_handler'); + + ossn_register_plugins_by_path(ossn_route()->system); } /** @@ -84,7 +86,7 @@ function ossn_system_error_pagehandler($pages) { 'contents' => $error, 'callback' => false, ); - echo ossn_view('system/templates/output/ossnbox', $params); + echo ossn_plugin_view('output/ossnbox', $params); break; } } @@ -106,7 +108,7 @@ function ossn_user_pagehandler($home, $handler) { } $title = ossn_print('news:feed'); if (com_is_active('OssnWall')) { - $contents['content'] = ossn_view('components/OssnWall/pages/wall'); + $contents['content'] = ossn_plugin_view('wall/pages/wall'); } $content = ossn_set_page_layout('newsfeed', $contents); echo ossn_view_page($title, $content); diff --git a/libraries/ossn.lib.input.php b/libraries/ossn.lib.input.php index db89ff94c..b45764bd5 100644 --- a/libraries/ossn.lib.input.php +++ b/libraries/ossn.lib.input.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ /** * Escape input string @@ -15,26 +15,26 @@ * @param boolean $newlines If you also want to escape new lines , default settings will replace it * * @return string - */ -function ossn_input_escape($str, $newlines = true){ - $replacements = array( - "\x00" => '\x00', - "\n" => '\n', - "'" => "\'", - '"' => '\"', - "\x1a" => '\x1a' - ); - if($newlines === true){ - $newline = array( - "\r" => '\r', - "\\" => '\\\\', - ); - $replacements = array_merge($replacements, $newline); - } - if(!empty($str)){ - return strtr($str, $replacements); - } - return false; + */ +function ossn_input_escape($str, $newlines = true) { + $replacements = array( + "\x00" => '\x00', + "\n" => '\n', + "'" => "\'", + '"' => '\"', + "\x1a" => '\x1a' + ); + if($newlines === true) { + $newline = array( + "\r" => '\r', + "\\" => '\\\\' + ); + $replacements = array_merge($replacements, $newline); + } + if(!empty($str)) { + return strtr($str, $replacements); + } + return false; } /** * Get input from user; using secure method; @@ -46,18 +46,21 @@ function ossn_input_escape($str, $newlines = true){ * @reason: fix docs; * @return false|string */ -function input($input, $noencode = '') { - $str = false; - if (isset($_REQUEST[$input]) && empty($noencode)) { - $data = htmlentities($_REQUEST[$input], ENT_QUOTES, 'UTF-8'); - $str = $data; - } elseif ($noencode == 1) { - $str = ossn_input_escape($data); - } - if($str){ - return ossn_input_escape($str); - } - return false; +function input($input, $noencode = '', $default = false) { + $str = false; + if(!isset($_REQUEST[$input]) && $default) { + return $default; + } + if(isset($_REQUEST[$input]) && empty($noencode)) { + $data = htmlentities($_REQUEST[$input], ENT_QUOTES, 'UTF-8'); + $str = $data; + } elseif($noencode == 1) { + $str = ossn_input_escape($data); + } + if($str) { + return ossn_input_escape($str); + } + return false; } /** * Ossn Restore New Lines @@ -68,18 +71,31 @@ function input($input, $noencode = '') { * * @return string */ -function ossn_restore_new_lines($string, $br = false){ - if(empty($string)){ - return false; - } - $replacements = array( - "\n" => '\n', - "\r" => '\r', - ); - $replacements = array_flip($replacements); - $result = strtr($string, $replacements); - if($br === true){ - $result = nl2br($result); - } - return $result; +function ossn_restore_new_lines($string, $br = false) { + if(empty($string)) { + return false; + } + $replacements = array( + "\n" => '\n', + "\r" => '\r' + ); + $replacements = array_flip($replacements); + $result = strtr($string, $replacements); + if($br === true) { + $result = nl2br($result); + } + return $result; } +/** + * Set a value for input + * + * @param string $name Name of input + * @param string $value Value of input + * + * @return void + */ +function ossn_set_input($name, $value) { + if(isset($name) && isset($value)) { + $_REQUEST[$name] = $value; + } +} \ No newline at end of file diff --git a/libraries/ossn.lib.javascripts.php b/libraries/ossn.lib.javascripts.php index e2d56e998..a0eb4ce0e 100644 --- a/libraries/ossn.lib.javascripts.php +++ b/libraries/ossn.lib.javascripts.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** @@ -142,7 +142,8 @@ function ossn_site_js() { foreach ($Ossn->jshead['site'] as $js) { $src = "{$url}js/view/{$js}.js"; if (ossn_site_settings('cache') == 1) { - $src = "{$url}cache/js/view/{$js}.js"; + $cache = ossn_site_settings('last_cache'); + $src = "{$url}cache/js/{$cache}/view/{$js}.js"; } echo ossn_html_js(array('src' => $src)); } @@ -160,7 +161,8 @@ function ossn_admin_js() { foreach ($Ossn->jshead['admin'] as $js) { $src = "{$url}js/view/{$js}.js"; if (ossn_site_settings('cache') == 1) { - $src = "{$url}cache/js/view/{$js}.js"; + $cache = ossn_site_settings('last_cache'); + $src = "{$url}cache/js/{$cache}/view/{$js}.js"; } echo ossn_html_js(array('src' => $src)); } @@ -177,7 +179,7 @@ function ossn_js_trigger($hook, $type, $value, $params) { if (isset($params[1]) && substr($params[1], '-3') == '.js') { $params[1] = str_replace('.js', '', $params[1]); if (isset($Ossn->js[$params[1]])) { - $file = ossn_view($Ossn->js[$params[1]]); + $file = ossn_plugin_view($Ossn->js[$params[1]]); $extended = ossn_fetch_extend_views("js/{$params[1]}"); $data = array( $file, diff --git a/libraries/ossn.lib.languages.php b/libraries/ossn.lib.languages.php index 929e3da1f..3f481d10c 100644 --- a/libraries/ossn.lib.languages.php +++ b/libraries/ossn.lib.languages.php @@ -2,11 +2,11 @@ /** * Open Source Social Network * - * @package Open Source Social Network + * @packageOpen Source Social Network * @author Open Social Website Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://www.opensource-socialnetwork.org/licence - * @link http://www.opensource-socialnetwork.org/licence + * @license General Public Licence http://www.Open Source Social Network.org/licence + * @link http://www.Open Source Social Network.org/licence */ /** * Register a language in system; diff --git a/libraries/ossn.lib.menus.php b/libraries/ossn.lib.menus.php index b221c3b0c..152e0c833 100644 --- a/libraries/ossn.lib.menus.php +++ b/libraries/ossn.lib.menus.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** * Register a menu; @@ -54,12 +54,11 @@ function ossn_view_menu($menu, $custom = false) { } $params['menu'] = $Ossn->menu[$menu]; if ($custom == false) { - $active_theme = ossn_site_settings('theme'); $params['menuname'] = $menu; - return ossn_view("themes/{$active_theme}/menus/{$menu}", $params); + return ossn_plugin_view("menus/{$menu}", $params); } elseif ($custom !== false) { $params['menuname'] = $menu; - return ossn_view($custom, $params); + return ossn_plugin_view($custom, $params); } } @@ -112,9 +111,8 @@ function ossn_register_sections_menu($menu, $params) { function ossn_view_sections_menu($menu, $type = 'frontend') { global $Ossn; if (isset($menu) && isset($Ossn->sectionsmenu[$type][$menu])) { - $active_theme = ossn_site_settings('theme'); $params['menu'] = $Ossn->sectionsmenu[$type][$menu]; $params['menuname'] = $menu; - return ossn_view("themes/{$active_theme}/menus/sections/{$menu}", $params); + return ossn_plugin_view("menus/sections/{$menu}", $params); } } \ No newline at end of file diff --git a/libraries/ossn.lib.objects.php b/libraries/ossn.lib.objects.php index 80a4001fe..f241cc962 100644 --- a/libraries/ossn.lib.objects.php +++ b/libraries/ossn.lib.objects.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.page.php b/libraries/ossn.lib.page.php index 9b766068c..b6a8bd38b 100644 --- a/libraries/ossn.lib.page.php +++ b/libraries/ossn.lib.page.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.plugins.php b/libraries/ossn.lib.plugins.php new file mode 100644 index 000000000..562621cbb --- /dev/null +++ b/libraries/ossn.lib.plugins.php @@ -0,0 +1,108 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ +/** + * Register a plugins by path + * This will help us to override components files easily. + * + * @param string $path A valid path; + * @return boolean + */ +function ossn_register_plugins_by_path($path) { + global $Ossn; + + if(ossn_site_settings('cache') == 1){ + return false; + } + + $path = $path . 'default/'; + if(!is_dir($path)) { + //disable error log, will cause a huge log file + //error_log("Ossn tried to register invalid plugins by path: {$path}"); + return false; + } + $path = str_replace("\\", "/", $path); + $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS); + $iterator = new RecursiveIteratorIterator($directory); + if($iterator) { + foreach($iterator as $file) { + if(pathinfo($file, PATHINFO_EXTENSION) == "php") { + $file = str_replace("\\", "/", $file); + $location = str_replace(dirname(__FILE__) . '/plugins/', '', $file); + + $name = str_replace($path, '', $location); + $name = substr($name, 0, -4); + + $fpath = substr($file, 0, -4); + $fpath = str_replace(array( + $name, + ossn_route()->www + ), '', $fpath); + + $Ossn->plugins[$name] = $fpath; + } + } + } + return true; +} +/** + * View a plugin + * Plugins are registered using ossn_register_plugins_by_path() + * + * @param string $plugin A valid plugin name; + * @param array|object $vars A valid arrays or object + * @return void|mixed + */ +function ossn_plugin_view($plugin = '', $vars = array()) { + global $Ossn; + if(isset($Ossn->plugins[$plugin])) { + $extended_views = ossn_fetch_extend_views($plugin, $vars); + return ossn_view($Ossn->plugins[$plugin] . $plugin, $vars) . $extended_views; + } +} +/** + * Unregister a plugin view + * We need this if we want to disable a plugin view. + * + * @param string $plugin A valid plugin name; + * @return void + */ +function ossn_uregister_plugin_view($plugin) { + global $Ossn; + if(isset($Ossn->plugins[$plugin])) { + unset($Ossn->plugins[$plugin]); + } +} +/** + * Generate a paths for plugins for cache + * + * @return string|false + */ +function ossn_plugins_cache_paths(){ + $file = ossn_get_userdata("system/plugins_paths"); + if(is_file($file) && ossn_site_settings('cache') == 1){ + $file = file_get_contents($file); + return json_decode($file, true); + } + return false; +} +/** + * If cache enabled then load paths for cache + * + * @return void; + */ +function ossn_plugin_set(){ + $paths = ossn_plugins_cache_paths(); + if($paths){ + global $Ossn; + $Ossn->plugins = $paths; + } +} +ossn_plugin_set(); \ No newline at end of file diff --git a/libraries/ossn.lib.relations.php b/libraries/ossn.lib.relations.php index 8ea841a28..f312d100e 100644 --- a/libraries/ossn.lib.relations.php +++ b/libraries/ossn.lib.relations.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.route.php b/libraries/ossn.lib.route.php index c52fa889f..c262ad414 100644 --- a/libraries/ossn.lib.route.php +++ b/libraries/ossn.lib.route.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** @@ -73,7 +73,8 @@ function ossn_route() { 'upgrade' => "$root/upgrade/", 'cache' => "{$root}/cache/", 'js' => "$root/javascripts/", - 'components' => "$root/components", + 'system' => "$root/system/", + 'components' => "$root/components", ); return arrayObject($defaults); } diff --git a/libraries/ossn.lib.securitytoken.php b/libraries/ossn.lib.securitytoken.php index 816be260a..9f1ab0e9a 100644 --- a/libraries/ossn.lib.securitytoken.php +++ b/libraries/ossn.lib.securitytoken.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** * Generate token using timestamp diff --git a/libraries/ossn.lib.system.php b/libraries/ossn.lib.system.php index 6067413a4..3d544668a 100644 --- a/libraries/ossn.lib.system.php +++ b/libraries/ossn.lib.system.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /* diff --git a/libraries/ossn.lib.themes.php b/libraries/ossn.lib.themes.php new file mode 100644 index 000000000..e1b26f660 --- /dev/null +++ b/libraries/ossn.lib.themes.php @@ -0,0 +1,15 @@ + + * @copyright 2014 iNFORMATIKON TECHNOLOGIES + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence + */ + +function ossn_themes_init(){ + ossn_register_plugins_by_path(ossn_default_theme() . 'plugins/'); +} +ossn_register_callback('ossn', 'init', 'ossn_themes_init'); diff --git a/libraries/ossn.lib.upgrade.php b/libraries/ossn.lib.upgrade.php index 5b99436c3..0e5852e43 100644 --- a/libraries/ossn.lib.upgrade.php +++ b/libraries/ossn.lib.upgrade.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.users.php b/libraries/ossn.lib.users.php index 116b9568e..9177fbcc3 100644 --- a/libraries/ossn.lib.users.php +++ b/libraries/ossn.lib.users.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ /** diff --git a/libraries/ossn.lib.views.php b/libraries/ossn.lib.views.php index a9f96aaba..ff134651c 100644 --- a/libraries/ossn.lib.views.php +++ b/libraries/ossn.lib.views.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $VIEW = new stdClass; @@ -108,7 +108,7 @@ function ossn_fetch_extend_views($layout, $params = array()) { if (isset($VIEW->register[$layout]) && !empty($VIEW->register[$layout])) { foreach ($VIEW->register[$layout] as $file) { if (!function_exists($file)) { - $fetch[] = ossn_view($file, $params); + $fetch[] = ossn_plugin_view($file, $params); } else { $fetch[] = call_user_func($file, ossn_get_context(), $params, current_url()); } @@ -232,7 +232,7 @@ function ossn_default_theme() { function ossn_view_form($name, $args = array(), $type = 'core') { $args['name'] = $name; $args['type'] = $type; - return ossn_view("system/templates/output/form", $args); + return ossn_plugin_view("output/form", $args); } /** @@ -261,6 +261,31 @@ function ossn_view_widget($name, $title, $contents) { */ function ossn_view_template($template = '', array $params){ if(!empty($template)){ - return ossn_view("system/templates/{$template}", $params); + return ossn_plugin_view("{$template}", $params); } +} +/** + * Create a pagiantion using count and page limit + * + * @param integer $count total entities/objects + * @param integer $page_limit Number of entities/objects per page + * + * @return false|mixed data + */ +function ossn_view_pagination($count = false, $page_limit = 10){ + $page_limit = ossn_call_hook('pagination', 'page_limit', false, $page_limit); + if(!empty($count) && !empty($page_limit)){ + $pagination = new OssnPagination; + + $params = array(); + $params['limit'] = $count; + $params['page_limit'] = $page_limit; + + $offset = input('offset'); + if(empty($offset)){ + ossn_set_input('offset', 1); + } + return $pagination->pagination($params); + } + return false; } \ No newline at end of file diff --git a/locale/ossn.de.php b/locale/ossn.de.php index 7d326afaa..77fb0a2ef 100644 --- a/locale/ossn.de.php +++ b/locale/ossn.de.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $de = array( diff --git a/locale/ossn.en.php b/locale/ossn.en.php index 01a4f6670..8f053991f 100644 --- a/locale/ossn.en.php +++ b/locale/ossn.en.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $en = array( @@ -150,12 +150,12 @@ 'fields:require' => 'All fields are required!', 'username:error' => 'Username is incorrect.', - 'password:error' => 'Password must be more than 5 characters.', + 'password:error' => 'Password must be more than 5 words.', 'account:created' => 'Your account has been created.', 'account:create:error:admin' => 'Cannot register account! Please try again later.', 'user:updated' => 'User has been updated!', 'logged:out' => 'You are now logged out!', - 'username:inuse' => 'Username already exist! Please select a different username.', + 'username:inuse' => 'Username already exist! Please select a different usename.', 'email:inuse' => 'Email address already exist! Please try another email address.', 'email:invalid' => 'Email address is invalid! Make sure the email address you entered is correct.', 'email:error:matching' => "Email addresses do not match.", diff --git a/opensource-socialnetwork.xml b/opensource-socialnetwork.xml index 2fd2d85c3..49d227e9f 100644 --- a/opensource-socialnetwork.xml +++ b/opensource-socialnetwork.xml @@ -1,8 +1,8 @@ - - 2.3 + + 3.0-dev 1426433343 GNU General Public License, version 2 - http://www.opensource-socialnetwork.org + http://www.Open Source Social Network.org (C) 2014-2015 Informatikon Technologies. All rights reserved diff --git a/pages/administrator/contents/adduser.php b/pages/administrator/contents/adduser.php index 5e7a6b877..0c8f6e113 100644 --- a/pages/administrator/contents/adduser.php +++ b/pages/administrator/contents/adduser.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo ossn_view_form('admin/adduser', array( 'action' => ossn_site_url('action/admin/add/user'), diff --git a/pages/administrator/contents/basic_settings.php b/pages/administrator/contents/basic_settings.php index 79076de75..034ffa0a0 100644 --- a/pages/administrator/contents/basic_settings.php +++ b/pages/administrator/contents/basic_settings.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo ossn_view_form('admin/basic_settings', array( 'action' => ossn_site_url('action/admin/settings/save/basic'), diff --git a/pages/administrator/contents/cache.php b/pages/administrator/contents/cache.php index 5f24eff43..c10dc92ff 100644 --- a/pages/administrator/contents/cache.php +++ b/pages/administrator/contents/cache.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo ossn_view_form('admin/cache_settings', array( 'action' => ossn_site_url('action/admin/cache/create'), diff --git a/pages/administrator/contents/com_installer.php b/pages/administrator/contents/com_installer.php index fa2ba195c..35d2ceba5 100644 --- a/pages/administrator/contents/com_installer.php +++ b/pages/administrator/contents/com_installer.php @@ -1,11 +1,11 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo ossn_view_form('admin/com_installer', array('action' => ossn_site_url('action/admin/com_install')));?> \ No newline at end of file diff --git a/pages/administrator/contents/components.php b/pages/administrator/contents/components.php index 921200aee..65467e911 100644 --- a/pages/administrator/contents/components.php +++ b/pages/administrator/contents/components.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ $OssnComs = new OssnComponents; foreach ($OssnComs->getComponents() as $Com) { diff --git a/pages/administrator/contents/dashboard.php b/pages/administrator/contents/dashboard.php index 5b670b474..6eae2b83d 100644 --- a/pages/administrator/contents/dashboard.php +++ b/pages/administrator/contents/dashboard.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ ?>
    diff --git a/pages/administrator/contents/login.php b/pages/administrator/contents/login.php index 9d0fa2710..8db0c0d64 100644 --- a/pages/administrator/contents/login.php +++ b/pages/administrator/contents/login.php @@ -1,12 +1,12 @@ + * @author OSSN Core Team * @copyright 2014 iNFORMATIKON TECHNOLOGIES - * @license General Public Licence http://opensource-socialnetwork.com/licence - * @link http://www.opensource-socialnetwork.com/licence + * @license General Public Licence http://www.opensource-socialnetwork.org/licence + * @link http://www.opensource-socialnetwork.org/licence */ echo '