/**
 * Initialize Ossn Wall Component
 *
 * @return void
 * @access private
 */
function ossn_wall()
{
    ossn_register_com_panel('OssnWall', 'settings');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('wall/post/a', __OSSN_WALL__ . 'actions/wall/post/home.php');
        ossn_register_action('wall/post/u', __OSSN_WALL__ . 'actions/wall/post/user.php');
        ossn_register_action('wall/post/g', __OSSN_WALL__ . 'actions/wall/post/group.php');
        ossn_register_action('wall/post/delete', __OSSN_WALL__ . 'actions/wall/post/delete.php');
    }
    if (ossn_isAdminLoggedin()) {
        ossn_register_action('wall/admin/settings', __OSSN_WALL__ . 'actions/wall/admin/settings.php');
    }
    //css and js
    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');
    ossn_register_page('friendpicker', 'ossn_friend_picker');
    //hooks
    ossn_add_hook('notification:view', 'like:post', 'ossn_likes_post_notifiation');
    ossn_add_hook('notification:view', 'comments:post', 'ossn_likes_post_notifiation');
    ossn_add_hook('notification:view', 'wall:friends:tag', 'ossn_likes_post_notifiation');
    ossn_add_hook('notification:view', 'comments:post:group:wall', 'ossn_group_comment_post');
    ossn_add_hook('notification:view', 'like:post:group:wall', 'ossn_group_comment_post');
    ossn_add_hook('wall', 'post:menu', 'ossn_wall_post_menu');
    //templates
    ossn_add_hook('wall:template', 'user', 'ossn_wall_templates');
    ossn_add_hook('wall:template', 'group', 'ossn_wall_templates');
    //callbacks
    ossn_register_callback('group', 'delete', 'ossn_group_wall_delete');
    ossn_register_callback('user', 'delete', 'ossn_user_posts_delete');
}
示例#2
0
/**
 * Initialize Notification Component
 *
 * @return void;
 * @access private
 */
function ossn_notifications()
{
    //css
    ossn_extend_view('css/ossn.default', 'css/notifications');
    //js
    ossn_extend_view('js/opensource.socialnetwork', 'js/OssnNotifications');
    //pages
    ossn_register_page('notification', 'ossn_notification_page');
    ossn_register_page('notifications', 'ossn_notifications_page');
    //callbacks
    ossn_register_callback('like', 'created', 'ossn_notification_like');
    ossn_register_callback('wall', 'post:created', 'ossn_notification_walltag');
    ossn_register_callback('annotations', 'created', 'ossn_notification_annotation');
    ossn_register_callback('user', 'delete', 'ossn_user_notifications_delete');
    //hooks
    ossn_add_hook('notification:add', 'comments:post', 'ossn_notificaiton_comments_post_hook');
    ossn_add_hook('notification:add', 'like:post', 'ossn_notificaiton_comments_post_hook');
    ossn_add_hook('notification:add', 'like:annotation', 'ossn_notificaiton_like_annotation_hook');
    ossn_add_hook('notification:add', 'comments:entity', 'ossn_notificaiton_comment_entity_hook');
    ossn_add_hook('notification:add', 'like:entity', 'ossn_notificaiton_comment_entity_hook');
    //tag post with a friend, doesn't show in friend's notification #589
    ossn_add_hook('notification:add', 'wall:friends:tag', 'ossn_notificaiton_walltag_hook');
    if (ossn_isLoggedin()) {
        ossn_extend_view('ossn/js/head', 'notifications/js/autocheck');
        ossn_register_action('notification/mark/allread', __OSSN_NOTIF__ . 'actions/markread.php');
    }
}
/**
 * Initialize Photos Component
 *
 * @return void;
 * @access private;
 */
function ossn_photos_initialize()
{
    //css
    ossn_extend_view('css/ossn.default', 'components/OssnPhotos/css/photos');
    //js
    ossn_extend_view('js/opensource.socialnetwork', 'components/OssnPhotos/js/OssnPhotos');
    //hooks
    ossn_add_hook('profile', 'subpage', 'ossn_profile_photos_page');
    ossn_add_hook('profile', 'modules', 'profile_modules_albums');
    ossn_add_hook('notification:view', 'like:entity:file:ossn:aphoto', 'ossn_notification_like_photo');
    ossn_add_hook('notification:view', 'comments:entity:file:ossn:aphoto', 'ossn_notification_like_photo');
    ossn_add_hook('photo:view', 'profile:controls', 'ossn_profile_photo_menu');
    ossn_add_hook('photo:view', 'album:controls', 'ossn_album_photo_menu');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('ossn/album/add', __OSSN_PHOTOS__ . 'actions/album/add.php');
        ossn_register_action('ossn/photos/add', __OSSN_PHOTOS__ . 'actions/photos/add.php');
        ossn_register_action('profile/photo/delete', __OSSN_PHOTOS__ . 'actions/photo/profile/delete.php');
        ossn_register_action('photo/delete', __OSSN_PHOTOS__ . 'actions/photo/delete.php');
    }
    //callbacks
    ossn_register_callback('page', 'load:profile', 'ossn_profile_menu_photos');
    ossn_register_callback('delete', 'profile:photo', 'ossn_photos_likes_comments_delete');
    ossn_register_callback('delete', 'album:photo', 'ossn_photos_likes_comments_delete');
    ossn_profile_subpage('photos');
    ossn_register_page('album', 'ossn_album_page_handler');
    ossn_register_page('photos', 'ossn_photos_page_handler');
    $url = ossn_site_url();
    if (ossn_isLoggedin()) {
        $user_loggedin = ossn_loggedin_user();
        $icon = ossn_site_url('components/OssnPhotos/images/photos-ossn.png');
        ossn_register_sections_menu('newsfeed', array('text' => ossn_print('photos:ossn'), 'url' => $user_loggedin->profileURL('/photos'), 'section' => 'links', 'icon' => $icon));
    }
}
示例#4
0
/**
 * Initialize component
 *
 * @return void
 */
function about_user()
{
    ossn_profile_subpage('about');
    ossn_register_callback('page', 'load:profile', 'profile_about_user');
    ossn_add_hook('profile', 'subpage', 'profile_about_user_page');
    ossn_extend_view('css/ossn.default', 'css/aboutuser');
}
function ossn_profile()
{
    //pages
    ossn_register_page('u', 'profile_page_handler');
    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');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('profile/photo/upload', __OSSN_PROFILE__ . 'actions/photo/upload.php');
        ossn_register_action('profile/cover/upload', __OSSN_PROFILE__ . 'actions/cover/upload.php');
        ossn_register_action('profile/cover/reposition', __OSSN_PROFILE__ . 'actions/cover/reposition.php');
        ossn_register_action('profile/edit', __OSSN_PROFILE__ . 'actions/edit.php');
    }
    //callback
    ossn_register_callback('page', 'load:search', 'ossn_search_users_link');
    ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
    //hooks
    ossn_add_hook('newsfeed', "left", 'profile_photo_newsefeed', 1);
    ossn_add_hook('profile', 'subpage', 'profile_user_friends');
    ossn_add_hook('search', 'type:users', 'profile_search_handler');
    ossn_add_hook('profile', 'subpage', 'profile_edit_page');
    ossn_add_hook('profile', 'modules', 'profile_modules');
    //notifications
    ossn_add_hook('notification:view', 'like:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
    ossn_add_hook('notification:view', 'comments:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
}
示例#6
0
/**
 * Initialize the css library
 *
 * @return void
 */
function ossn_css()
{
    ossn_register_page('css', 'ossn_css_pagehandler');
    ossn_add_hook('css', 'register', 'ossn_css_trigger');
    ossn_extend_view('ossn/site/head', 'ossn_css_site');
    ossn_extend_view('ossn/admin/head', 'ossn_css_admin');
}
示例#7
0
/**
 * Home sidebar initlize the component
 * 
 * return void
 */
function html_sidebar()
{
    ossn_add_hook('newsfeed', "sidebar:right", 'html_widget');
    ossn_register_com_panel('HtmlSidebar', 'settings');
    if (ossn_isAdminLoggedin()) {
        ossn_register_action('html/sidebar/save', __HTML_SIDEBAR__ . 'actions/save.php');
    }
}
/**
 * Initialize Groups Component
 *
 * @return void;
 * @access private
 */
function ossn_groups()
{
    //group css
    ossn_extend_view('css/ossn.default', 'css/groups');
    //group js
    ossn_extend_view('js/opensource.socialnetwork', 'js/groups');
    //group pages
    ossn_register_page('group', 'ossn_group_page');
    ossn_register_page('groups', 'ossn_groups_page');
    ossn_group_subpage('members');
    ossn_group_subpage('edit');
    ossn_group_subpage('requests');
    //group hooks
    ossn_add_hook('group', 'subpage', 'group_members_page');
    ossn_add_hook('group', 'subpage', 'group_edit_page');
    ossn_add_hook('group', 'subpage', 'group_requests_page');
    ossn_add_hook('newsfeed', "left", 'ossn_add_groups_to_newfeed');
    ossn_add_hook('search', 'type:groups', 'groups_search_handler');
    ossn_add_hook('notification:add', 'comments:post:group:wall', 'ossn_notificaiton_groups_comments_hook');
    ossn_add_hook('notification:add', 'like:post:group:wall', 'ossn_notificaiton_groups_comments_hook');
    ossn_add_hook('notification:view', 'group:joinrequest', 'ossn_group_joinrequest_notification');
    //group actions
    if (ossn_isLoggedin()) {
        ossn_register_action('group/add', __OSSN_GROUPS__ . 'actions/group/add.php');
        ossn_register_action('group/edit', __OSSN_GROUPS__ . 'actions/group/edit.php');
        ossn_register_action('group/join', __OSSN_GROUPS__ . 'actions/group/join.php');
        ossn_register_action('group/delete', __OSSN_GROUPS__ . 'actions/group/delete.php');
        ossn_register_action('group/member/approve', __OSSN_GROUPS__ . 'actions/group/member/request/approve.php');
        ossn_register_action('group/member/cancel', __OSSN_GROUPS__ . 'actions/group/member/request/cancel.php');
        ossn_register_action('group/member/decline', __OSSN_GROUPS__ . 'actions/group/member/request/decline.php');
        ossn_register_action('group/cover/upload', __OSSN_GROUPS__ . 'actions/group/cover/upload.php');
        ossn_register_action('group/cover/reposition', __OSSN_GROUPS__ . 'actions/group/cover/reposition.php');
    }
    //callbacks
    ossn_register_callback('page', 'load:group', 'ossn_group_load_event');
    ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
    ossn_register_callback('page', 'load:search', 'ossn_group_search_link');
    ossn_register_callback('user', 'delete', 'ossn_user_groups_delete');
    //group list in newsfeed sidebar mebu
    $groups_user = ossn_get_user_groups(ossn_loggedin_user());
    if ($groups_user) {
        foreach ($groups_user as $group) {
            $icon = ossn_site_url('components/OssnGroups/images/group.png');
            ossn_register_sections_menu('newsfeed', array('text' => $group->title, 'url' => ossn_group_url($group->guid), 'section' => 'groups', 'icon' => $icon));
            unset($icon);
        }
    }
    //add gorup link in sidebar
    ossn_register_sections_menu('newsfeed', array('text' => ossn_print('add:group'), 'url' => 'javascript::;', 'params' => array('id' => 'ossn-group-add'), 'section' => 'groups', 'icon' => ossn_site_url('components/OssnGroups/images/add.png')));
    //my groups link
    /* ossn_register_sections_menu('newsfeed', array(
    		'text' => 'My Groups',
    		'url' => 'javascript::;',
    		'section' => 'groups',
    		'icon' => ossn_site_url('components/OssnGroups/images/manages.png')
    		));*/
}
示例#9
0
function ossn_mobile_init()
{
    if (OssnMobile()->isMobile()) {
        ossn_new_css('ossn.mobile.default', 'components/OssnMobile/css/default');
        ossn_load_css('ossn.mobile.default');
        ossn_unload_css('ossn.default');
        ossn_add_hook('halt', 'view:components/OssnChat/views/OssnChat/chatbar', 'ossn_mobile_remove_chat');
    }
}
function ossn_javascript()
{
    ossn_register_page('js', 'ossn_javascript_pagehandler');
    ossn_add_hook('js', 'register', 'ossn_js_trigger');
    ossn_extend_view('ossn/site/head', 'ossn_site_js');
    ossn_extend_view('ossn/site/head', 'ossn_jquery_add');
    ossn_new_js('opensource.socialnetwork', 'javascripts/libraries/core');
    ossn_load_js('opensource.socialnetwork');
}
/**
 * Initialize the block component.
 *
 * @return void;
 * @access private;
 */
function ossn_block()
{
    //callbacks
    ossn_register_callback('page', 'load:profile', 'ossn_user_block_menu', 100);
    //hooks
    ossn_add_hook('page', 'load', 'ossn_user_block');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('block/user', __OSSN_BLOCK__ . 'actions/user/block.php');
        ossn_register_action('unblock/user', __OSSN_BLOCK__ . 'actions/user/unblock.php');
    }
}
/**
 * Initialize the poke component.
 *
 * @return void;
 * @access private;
 */
function ossn_poke()
{
    //css
    ossn_extend_view('css/ossn.default', 'components/OssnPoke/css/poke');
    //actions
    if (ossn_isLoggedin()) {
        ossn_register_action('poke/user', __OSSN_POKE__ . 'actions/user/poke.php');
    }
    //hooks
    ossn_add_hook('notification:view', 'ossnpoke:poke', 'ossn_poke_notification');
    //profile menu
    ossn_register_callback('page', 'load:profile', 'ossn_user_poke_menu', 1);
}
示例#13
0
function ossn_black_theme_init()
{
    //add bootstrap
    ossn_new_css('bootstrap.min', 'css/bootstrap/bootstrap.min.css');
    //ossn_new_js('bootstrap.min', 'js/bootstrap/bootstrap.min.js');
    ossn_new_css('ossn.default', 'css/default');
    ossn_new_css('ossn.admin.default', 'css/administrator');
    //load bootstrap
    ossn_load_css('bootstrap.min', 'admin');
    ossn_load_css('ossn.default');
    ossn_load_css('ossn.admin.default', 'admin');
    ossn_extend_view('ossn/admin/head', 'ossn_three_head');
    ossn_add_hook('css', 'group:background', 'ossntheme_black_group_background');
}
/**
 * Initialize Comments Component
 *
 * @return void;
 * @access private
 */
function ossn_comments()
{
    if (ossn_isLoggedin()) {
        ossn_register_action('post/comment', __OSSN_COMMENTS__ . 'actions/post/comment.php');
        ossn_register_action('post/entity/comment', __OSSN_COMMENTS__ . 'actions/post/entity/comment.php');
        ossn_register_action('delete/comment', __OSSN_COMMENTS__ . 'actions/comment/delete.php');
    }
    ossn_add_hook('post', 'comments', 'ossn_post_comments');
    ossn_add_hook('post', 'comments:entity', 'ossn_post_comments_entity');
    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_register_page('comment', 'ossn_comment_page');
    ossn_register_callback('post', 'delete', 'ossn_post_comments_delete');
}
/**
 * Initialize the css library
 *
 * @return void
 */
function ossn_javascript()
{
    ossn_register_page('js', 'ossn_javascript_pagehandler');
    ossn_add_hook('js', 'register', 'ossn_js_trigger');
    ossn_extend_view('ossn/site/head', 'ossn_site_js');
    ossn_extend_view('ossn/admin/head', 'ossn_admin_js');
    ossn_extend_view('ossn/site/head', 'ossn_jquery_add');
    ossn_extend_view('ossn/admin/head', 'ossn_jquery_add');
    ossn_new_js('opensource.socialnetwork', 'javascripts/libraries/core');
    ossn_load_js('opensource.socialnetwork');
    ossn_load_js('opensource.socialnetwork', 'admin');
    //link chartjs and jquery Ossn v3
    ossn_new_external_js('chart.js', 'vendors/Chartjs/Chart.min.js');
    ossn_new_external_js('chart.legend.js', 'vendors/Chartjs/chart.legend.js');
    ossn_new_external_js('jquery-1.11.1.min.js', 'vendors/jquery/jquery-1.11.1.min.js');
    ossn_load_external_js('jquery-1.11.1.min.js');
    ossn_load_external_js('jquery-1.11.1.min.js', 'admin');
}
/**
 * Initialize Likes Component
 *
 * @return void;
 * @access private
 */
function ossn_likes()
{
    if (ossn_isLoggedin()) {
        ossn_register_action('post/like', __OSSN_LIKES__ . 'actions/post/like.php');
        ossn_register_action('post/unlike', __OSSN_LIKES__ . 'actions/post/unlike.php');
        ossn_register_action('annotation/like', __OSSN_LIKES__ . 'actions/annotation/like.php');
        ossn_register_action('annotation/unlike', __OSSN_LIKES__ . 'actions/annotation/unlike.php');
    }
    ossn_extend_view('js/opensource.socialnetwork', 'components/OssnLikes/js/OssnLikes');
    ossn_extend_view('css/ossn.default', 'components/OssnLikes/css/likes');
    ossn_register_callback('post', 'delete', 'ossn_post_like_delete');
    ossn_register_callback('comment', 'delete', 'ossn_comment_like_delete');
    ossn_register_callback('annotation', 'delete', 'ossn_comment_like_delete');
    ossn_register_callback('user', 'delete', 'ossn_user_likes_delete');
    ossn_register_page('likes', 'ossn_likesview_page_handler');
    ossn_add_hook('notification:view', 'like:annotation', 'ossn_like_annotation');
    ossn_add_hook('post', 'likes', 'ossn_post_likes');
    ossn_add_hook('post', 'likes:entity', 'ossn_post_likes_entity');
}
示例#17
0
function option_trips_init()
{
    //Hooks
    ossn_add_hook('profile', 'modules', 'profile_modules_trips');
    //Funció pq aparegui el modul inferior "profile_modules_trips($hook, $type, $module, $params)"
    ossn_add_hook('profile', 'subpage', 'profile_trips_page');
    //Actions
    ossn_register_action('optiontrips/getmaptrips', __OSSN_TRIPS__ . 'actions/map/get.php');
    //Registre petició lat. long. mapa perfil
    ossn_register_action('trip/addPhoto', __OSSN_TRIPS__ . 'actions/addPhoto.php');
    //Acció per afegir les fotos en el formulari de viatges
    //Callbacks
    ossn_register_callback('page', 'load:profile', 'profile_menu_trips');
    //Afageix en el menú de navegació superior la opció viatges
    ossn_register_page('trip', 'trip_page_handler');
    //CSS i JS
    //Afegir capçalera styles i scripts
    ossn_extend_view('css/ossn.default', 'css/trips-style');
    //Registre JS
    ossn_new_js('trips', 'js/OptionTrips');
    //Carrega JS extern
    ossn_load_external_js('maps.google');
    //Carrega API Google
    //ossn_load_js('mapa.viatgers');
    if (ossn_isLoggedin()) {
        //Si ha iniciat sessió apreix les diferents accions
        //ossn_extend_view('js/opensource.socialnetwork', 'js/OptionTrips');
        ossn_load_js('trips');
        ossn_register_action('trips/add', __OSSN_TRIPS__ . 'actions/add.php');
        //Afageix un nou viatge a la base de dades
    }
    ossn_profile_subpage('trips');
    ossn_register_page('trip', 'trip_page_handler');
    $url = ossn_site_url();
    if (ossn_isLoggedin()) {
        //Si ha iniciat sessió
        $user_loggedin = ossn_loggedin_user();
        //URL actual de l'usuari
        $icon = ossn_site_url('components/OptionTrips/images/live_logo.png');
        //Afegir enllaç menú sidebar(left)
        ossn_register_sections_menu('newsfeed', array('text' => ossn_print('trips:ossn'), 'url' => $user_loggedin->profileURL('/trips'), 'section' => 'links', 'icon' => $icon));
    }
}
/**
 * Initialize Notification Component
 *
 * @return void;
 * @access private
 */
function ossn_notifications()
{
    //css
    ossn_extend_view('css/ossn.default', 'components/OssnNotifications/css/notifications');
    //js
    ossn_extend_view('js/opensource.socialnetwork', 'components/OssnNotifications/js/OssnNotifications');
    //pages
    ossn_register_page('notification', 'ossn_notification_page');
    ossn_register_page('notifications', 'ossn_notifications_page');
    //callbacks
    ossn_register_callback('like', 'created', 'ossn_notification_like');
    ossn_register_callback('wall', 'post:created', 'ossn_notification_walltag');
    ossn_register_callback('annotations', 'created', 'ossn_notification_annotation');
    ossn_register_callback('user', 'delete', 'ossn_user_notifications_delete');
    //hooks
    ossn_add_hook('notification:add', 'comments:post', 'ossn_notificaiton_comments_post_hook');
    ossn_add_hook('notification:add', 'like:post', 'ossn_notificaiton_comments_post_hook');
    ossn_add_hook('notification:add', 'like:annotation', 'ossn_notificaiton_like_annotation_hook');
    ossn_add_hook('notification:add', 'comments:entity', 'ossn_notificaiton_comment_entity_hook');
    ossn_add_hook('notification:add', 'like:entity', 'ossn_notificaiton_comment_entity_hook');
}
function ossn_initialize()
{
    $url = ossn_site_url();
    $icon = ossn_site_url('components/OssnWall/images/news-feed.png');
    ossn_register_sections_menu('newsfeed', array('text' => ossn_print('news:feed'), 'url' => "{$url}home", 'section' => 'links', 'icon' => $icon));
    ossn_extend_view('ossn/js/head', 'javascripts/head');
    //actions
    ossn_register_action('user/login', ossn_route()->actions . 'user/login.php');
    ossn_register_action('user/register', ossn_route()->actions . 'user/register.php');
    ossn_register_action('user/logout', ossn_route()->actions . 'user/logout.php');
    ossn_register_action('friend/add', ossn_route()->actions . 'friend/add.php');
    ossn_register_action('friend/remove', ossn_route()->actions . 'friend/remove.php');
    ossn_register_action('resetpassword', ossn_route()->actions . 'user/resetpassword.php');
    ossn_register_action('resetlogin', ossn_route()->actions . 'user/resetlogin.php');
    ossn_register_page('index', 'ossn_index_pagehandler');
    ossn_register_page('home', 'ossn_user_pagehandler');
    ossn_register_page('login', 'ossn_user_pagehandler');
    ossn_register_page('registered', 'ossn_user_pagehandler');
    ossn_register_page('syserror', 'ossn_system_error_pagehandler');
    ossn_register_page('resetlogin', 'ossn_user_pagehandler');
    ossn_add_hook('newsfeed', "left", 'newfeed_menu_handler');
}
示例#20
0
/**
 * Initialize Profile Component
 *
 * @return void;
 * @access private;
 */
function ossn_profile()
{
    //pages
    ossn_register_page('u', 'profile_page_handler');
    ossn_register_page('avatar', 'avatar_page_handler');
    ossn_register_page('cover', 'cover_page_handler');
    //css and js
    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');
        ossn_register_action('profile/cover/upload', __OSSN_PROFILE__ . 'actions/cover/upload.php');
        ossn_register_action('profile/cover/reposition', __OSSN_PROFILE__ . 'actions/cover/reposition.php');
        ossn_register_action('profile/edit', __OSSN_PROFILE__ . 'actions/edit.php');
        ossn_register_menu_item('topbar_dropdown', array('name' => 'account_settings', 'text' => ossn_print('account:settings'), 'href' => ossn_loggedin_user()->profileURL('/edit')));
    }
    //callback
    ossn_register_callback('page', 'load:search', 'ossn_search_users_link');
    ossn_register_callback('page', 'load:profile', 'ossn_profile_load_event');
    ossn_register_callback('delete', 'profile:photo', 'ossn_profile_delete_photo_wallpost');
    ossn_register_callback('delete', 'profile:cover:photo', 'ossn_profile_delete_photo_wallpost');
    //hooks
    ossn_add_hook('newsfeed', "sidebar:left", 'profile_photo_newsefeed', 1);
    ossn_add_hook('profile', 'subpage', 'profile_user_friends');
    ossn_add_hook('search', 'type:users', 'profile_search_handler');
    ossn_add_hook('profile', 'subpage', 'profile_edit_page');
    ossn_add_hook('profile', 'modules', 'profile_modules');
    ossn_add_hook('wall:template', 'profile:photo', 'ossn_wall_profile_photo');
    ossn_add_hook('wall:template', 'cover:photo', 'ossn_wall_profile_cover_photo');
    //notifications
    ossn_add_hook('notification:view', 'like:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
    ossn_add_hook('notification:view', 'comments:entity:file:profile:photo', 'ossn_notification_like_profile_photo');
    //subpages of profile
    ossn_profile_subpage('friends');
    ossn_profile_subpage('edit');
}
/**
 * Initialize Ossn Smilies component
 *
 * @note Please don't call this function directly in your code.
 * 
 * @return void
 * @access private
 */
function ossn_smiley_embed_init()
{
    ossn_add_hook('wall', 'templates:item', 'ossn_embed_smiley', 100);
    ossn_add_hook('comment:view', 'template:params', 'ossn_smiley_in_comments', 100);
}
示例#22
0
function ossn_search()
{
    ossn_register_page('search', 'ossn_search_page');
    ossn_add_hook('search', "left", 'search_menu_handler');
    ossn_extend_view('css/ossn.default', 'css/search');
}
示例#23
0
/**
 * Initialize Ossn Embed component
 *
 * @note Please don't call this function directly in your code.
 * 
 * @return void
 * @access private
 */
function ossn_embed_init()
{
    ossn_add_hook('wall', 'templates:item', 'ossn_embed_wall_template_item');
    ossn_add_hook('comment:view', 'template:params', 'ossn_embed_comments_template_params');
}
/**
 * Disable Errors during upgrade
 *
 * @return void
 * @access private
 */
function ossn_upgrade_init()
{
    ossn_add_hook('database', 'execution:message', 'ossn_disable_database_exception');
}
示例#25
0
 *
 * @return string
 */
function ossn_site_user_lang_code($hook, $type, $return, $params)
{
    $lang = $return;
    if (ossn_isLoggedin()) {
        $user = ossn_loggedin_user();
        if (isset($user->language)) {
            $lang = $user->language;
        }
    }
    return $lang;
}
/**
 * Logout user from system
 * 
 * @return boolean
 */
function ossn_logout()
{
    unset($_SESSION['OSSN_USER']);
    @session_destroy();
    if (!isset($_SESSION['OSSN_USER'])) {
        return true;
    }
    return false;
}
ossn_register_callback('ossn', 'init', 'ossn_users');
ossn_add_hook('load:settings', 'language', 'ossn_site_user_lang_code');
/**
 * User auto validate
 *
 * @return void;
 */
function userautovalidate()
{
    ossn_add_hook('user', 'send:activation', 'userautovalidate_disable_confirmation');
    ossn_add_hook('user', 'create:validated', 'userautovalidate_enable_member');
}
示例#27
0
<?php

/**
 * 	OpenSource-SocialNetwork
 *
 * @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
 */
define('__THEMEDIR__', ossn_route()->themes . 'ossnfacebook/');
ossn_new_css('ossn.default', 'themes/ossnfacebook/style/default');
ossn_new_css('ossn.admin.default', 'themes/ossnfacebook/style/administrator');
ossn_load_css('ossn.default');
ossn_load_css('ossn.admin.default', 'admin');
ossn_add_hook('css', 'group:background', 'ossntheme_blue_group_background');
function ossntheme_blue_group_background($hook, $type, $return, $params)
{
    return '#FDFDFD';
}