function ossn_css_pagehandler($css)
{
    if (ossn_site_settings('cache') == 1) {
        return false;
    }
    header("Content-type: text/css");
    $page = $css[0];
    if (empty($css[1])) {
        echo '404 SWITCH ERROR';
    }
    if (empty($page)) {
        $page = 'view';
    }
    switch ($page) {
        case 'view':
            if (ossn_site_settings('cache') == 1) {
                return false;
            }
            if (ossn_is_hook('css', "register")) {
                echo ossn_call_hook('css', "register", $css);
            }
            break;
        default:
            echo '404 SWITCH ERROR';
            break;
    }
}
Ejemplo n.º 2
0
function ossn_search_page($pages)
{
    $page = $pages[0];
    if (empty($page)) {
        $page = 'search';
    }
    ossn_trigger_callback('page', 'load:search');
    switch ($page) {
        case 'search':
            $query = input('q');
            $type = input('type');
            $title = ossn_print("search:result", array($query));
            if (empty($type)) {
                $params['type'] = 'users';
            } else {
                $params['type'] = $type;
            }
            $type = $params['type'];
            if (ossn_is_hook('search', "type:{$type}")) {
                $contents['contents'] = ossn_call_hook('search', "type:{$type}", array('q' => input('q')));
            }
            $contents = array('content' => ossn_plugin_view('search/pages/search', $contents));
            $content = ossn_set_page_layout('search', $contents);
            echo ossn_view_page($title, $content);
            break;
        default:
            ossn_error_page();
            break;
    }
}
Ejemplo n.º 3
0
/**
 * Add css page handler
 *
 * @return false|null
 */
function ossn_css_pagehandler($css)
{
    if (ossn_site_settings('cache') == 1) {
        return false;
    }
    header("Content-type: text/css");
    $page = $css[0];
    if (empty($css[1])) {
        header('Content-Type: text/html; charset=utf-8');
        ossn_error_page();
    }
    if (empty($page)) {
        $page = 'view';
    }
    switch ($page) {
        case 'view':
            if (ossn_site_settings('cache') == 1) {
                return false;
            }
            if (ossn_is_hook('css', "register")) {
                echo ossn_call_hook('css', "register", $css);
            }
            break;
        default:
            header('Content-Type: text/html; charset=utf-8');
            ossn_error_page();
            break;
    }
}
/**
 * View a file
 *
 * @param string $file valid file name of php file without extension;
 * @param array $params Options;
 * @last edit: $arsalanshah
 * @return mixed data
 */
function ossn_view($path = '', $params = array())
{
    global $VIEW;
    if (isset($path) && !empty($path)) {
        //call hook in case to over ride the view
        if (ossn_is_hook('halt', "view:{$path}")) {
            return ossn_call_hook('halt', "view:{$path}", $params);
        }
        $path = ossn_route()->www . $path;
        $file = ossn_include($path . '.php', $params);
        return $file;
    }
}
Ejemplo n.º 5
0
 * @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
 */
?>
<style> body {
        background: #FDFDFD;
    } </style>
<div class="ossn-layout-newsfeed">
    <div class="ossn-inner">
        <div class="coloum-left">
            &nbsp;
            <?php 
if (ossn_is_hook('search', "left")) {
    $searchleft = ossn_call_hook('search', "left", NULL, array());
    echo implode('', $searchleft);
}
?>

        </div>
        <div class="coloum-middle">
            <?php 
echo $params['content'];
?>

        </div>
        <div class="coloum-right">
            <div style="padding:12px;min-height:300px;">
                <?php 
Ejemplo n.º 6
0
    <table border="0" class="ossn-photo-viewer">
        <tr>
            <td class="image-block" style="text-align: center;width:465px;min-height:200px;">
                <img
                    src="<?php 
echo ossn_site_url("album/getcover/") . $image->owner_guid;
?>
/<?php 
echo $img;
?>
"/>
            </td>
        </tr>
    </table>

</div>
<br/>
<br/>
<?php 
$vars['entity'] = $image;
$vars['full_view'] = true;
echo ossn_plugin_view('entity/comment/like/share/view', $params);
?>
<div class="ossn-photo-view-controls">
    <?php 
if (ossn_is_hook('cover:view', 'profile:controls')) {
    echo ossn_call_hook('cover:view', 'profile:controls', $image);
}
?>
</div>
Ejemplo n.º 7
0
<?php

if (!ossn_isLoggedin()) {
    return;
}
?>
        <div class="sidebar">
            <div class="sidebar-contents">

           		 <?php 
if (ossn_is_hook('newsfeed', "sidebar:left")) {
    $newsfeed_left = ossn_call_hook('newsfeed', "sidebar:left", NULL, array());
    echo implode('', $newsfeed_left);
}
echo ossn_view_form('search', array('component' => 'OssnSearch', 'class' => 'ossn-search', 'autocomplete' => 'off', 'method' => 'get', 'security_tokens' => false, 'action' => ossn_site_url("search")), false);
?>
                
            </div>
        </div>
Ejemplo n.º 8
0
/**
 * View wall post view template
 *
 * @param array $params Options
 *
 * @return mixed data
 * @access private
 */
function ossn_wall_view_template(array $params)
{
    $type = $params['post']->type;
    if (isset($params['post']->item_type)) {
        $type = $params['post']->item_type;
    }
    if (ossn_is_hook('wall:template', $type)) {
        return ossn_call_hook('wall:template', $type, $params);
    }
    return false;
}
Ejemplo n.º 9
0
if (com_is_active('OssnAds')) {
    echo ossn_plugin_view('ads/page/view_small');
}
?>
</div>
<div class="ossn-profile-bottom">
    <?php 
if (isset($params['subpage']) && !empty($params['subpage']) && ossn_is_profile_subapge($params['subpage'])) {
    if (ossn_is_hook('profile', 'subpage')) {
        echo ossn_call_hook('profile', 'subpage', $params);
    }
} else {
    ?>
        <div class="ossn-profile-modules">
            <?php 
    if (ossn_is_hook('profile', 'modules')) {
        $params['user'] = $user;
        $modules = ossn_call_hook('profile', 'modules', $params);
        echo implode('', $modules);
    }
    ?>

        </div>

        <div class="ossn-profile-wall">
            <?php 
    if (com_is_active('OssnWall')) {
        $params['user'] = $user;
        echo ossn_plugin_view('wall/user/wall', $params);
    }
    ?>
Ejemplo n.º 10
0
 * 	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
 */
?>
<style> body { background:#e9eaed; } </style>
<div class="ossn-layout-newsfeed">
<div class="ossn-inner">
      <div class="coloum-left">
   &nbsp;
   <?php 
if (ossn_is_hook('newsfeed', "left")) {
    $newsfeed_left = ossn_call_hook('newsfeed', "left", NULL, array());
    echo implode('', $newsfeed_left);
}
?>

      </div>  
      <div class="coloum-middle">
             <?php 
echo $params['content'];
?>
  
      </div>
      <div class="coloum-right">
           <div style="padding:12px;min-height:300px;"> 
              <?php 
Ejemplo n.º 11
0
<?php

/**
 * Open Source Social Network
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
//unused pagebar skeleton when ads are disabled #628
if (ossn_is_hook('newsfeed', "sidebar:right")) {
    $newsfeed_right = ossn_call_hook('newsfeed', "sidebar:right", NULL, array());
    $sidebar = implode('', $newsfeed_right);
    $isempty = trim($sidebar);
}
?>
<div class="container">
	<div class="row">
       	<?php 
echo ossn_plugin_view('theme/page/elements/system_messages');
?>
    
		<div class="ossn-layout-newsfeed">
			<div class="col-md-7">
				<div class="newsfeed-middle">
					<?php 
echo $params['content'];
?>
				</div>
Ejemplo n.º 12
0
?>
?size=view"/>
            </td>
        </tr>
    </table>

</div>
<br/>
<br/>
<div class="comments-likes ossn-photos-comments" style="width:525px;">
    <?php 
if (ossn_is_hook('post', 'likes:entity')) {
    $entity['entity_guid'] = $params['photo'];
    echo ossn_call_hook('post', 'likes:entity', $entity);
}
?>
    <?php 
if (ossn_is_hook('post', 'comments:entity')) {
    $entity['entity_guid'] = $params['photo'];
    echo ossn_call_hook('post', 'comments:entity', $entity);
}
?>
</div>
<div class="ossn-photo-view-controls">
    <?php 
if (ossn_is_hook('photo:view', 'album:controls')) {
    echo ossn_call_hook('photo:view', 'album:controls', $image);
}
?>
</div>
 /**
  * Get notifications
  *
  * @param integer $guid_two User guid
  * @param integer $poster_guid Guid of item poster;
  *
  * @return array
  */
 public function get($guid_two, $unread = false)
 {
     $getunread = '';
     if ($unread === true) {
         $getunread = "AND viewed IS NULL";
     }
     $baseurl = ossn_site_url();
     $this->statement("SELECT * FROM ossn_notifications WHERE(\n\t\t                  owner_guid='{$guid_two}' {$getunread}) ORDER by guid DESC");
     $this->execute();
     $get = $this->fetch(true);
     if (!$get) {
         return false;
     }
     foreach ($get as $notif) {
         if (ossn_is_hook('notification:view', $notif->type)) {
             $messages[] = ossn_call_hook('notification:view', $notif->type, $notif);
         }
     }
     return $messages;
 }
Ejemplo n.º 14
0
  </a>
    <br/>
    <table border="0" class="ossn-photo-viewer">
        <tr>
            <td class="image-block" style="text-align: center;width:465px;min-height:200px;">
                <img
                    src="<?php 
echo ossn_site_url("album/getphoto/") . $image->owner_guid;
?>
/<?php 
echo $img;
?>
?type=1"/>
            </td>
        </tr>
    </table>

</div>
<br/>
<br/>
<?php 
$vars['entity'] = $image;
echo ossn_plugin_view('entity/comment/like/share/view', $vars);
?>
<div class="ossn-photo-view-controls">
    <?php 
if (ossn_is_hook('photo:view', 'profile:controls')) {
    echo ossn_call_hook('photo:view', 'profile:controls', $image);
}
?>
</div>
Ejemplo n.º 15
0
?>
<div class="activity-item" id="activity-item-<?php 
echo $params['post']->guid;
?>
">

    <div class="activity-item-container">
        <div class="owner">
            <img src="<?php 
echo $params['user']->iconURL()->small;
?>
" width="40" height="40"/>
        </div>
        <div class="post-controls">
            <?php 
if (ossn_is_hook('wall', 'post:menu') && ossn_isLoggedIn()) {
    $menu['post'] = $params['post'];
    echo ossn_call_hook('wall', 'post:menu', $menu);
}
?>
        </div>

        <div class="subject">
            <?php 
if ($params['user']->guid == $params['post']->owner_guid) {
    ?>
                <a class="owner-link"
                   href="<?php 
    echo $params['user']->profileURL();
    ?>
"> <?php 
Ejemplo n.º 16
0
</a>
                    <?php 
    }
    ?>
                <?php 
}
?>
            </div>

        </div>
    </div>
    <!-- End of Header -->
    <div class="group-body">
        <?php 
if (isset($params['subpage']) && !empty($params['subpage']) && ossn_is_group_subapge($params['subpage'])) {
    if (ossn_is_hook('group', 'subpage')) {
        echo ossn_call_hook('group', 'subpage', $params);
    }
} else {
    ?>
            <div class="group-wall">
                <?php 
    //#113 make contents of public groups visible.
    //send ismember, and member ship param to group wall
    echo ossn_plugin_view('wall/group', array('group' => $params, 'ismember' => $ismember, 'membership' => $params['group']->membership));
    if ($params['group']->membership == OSSN_PRIVATE && $ismember !== 1) {
        ?>
                    <div class="group-closed-container">
                        <div class="title-h3"><?php 
        echo ossn_print('closed:group');
        ?>
Ejemplo n.º 17
0
<?php

/**
 * Open Source Social Network
 *
 * @package   Open 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
 */
echo '<div class="comments-likes">';
if (ossn_is_hook('post', 'likes:entity')) {
    $entity['entity_guid'] = $params['entity_guid'];
    echo ossn_call_hook('post', 'likes:entity', $entity);
}
if (ossn_is_hook('post', 'comments:entity')) {
    $entity['entity_guid'] = $params['entity_guid'];
    echo ossn_call_hook('post', 'comments:entity', $entity);
}
echo '</div>';
?>
  </div>
            <?php 
if (!empty($image)) {
    ?>
                <img src="<?php 
    echo ossn_site_url("post/photo/{$params['post']->guid}/{$image}");
    ?>
"/>

            <?php 
}
?>
        </div>
    </div>
    <div class="comments-likes">
        <?php 
if (ossn_is_hook('post', 'likes')) {
    echo ossn_call_hook('post', 'likes', $params['post']);
}
?>
        <div class="comments-item" style="border-bottom:1px solid #ddd;">
            <?php 
if (ossn_is_hook('post', 'comments')) {
    echo ossn_call_hook('post', 'comments', $params['post']);
}
?>
        </div>
    </div>
</div>
 /**
  * Get notifications
  *
  * @params $guid_two User guid
  *         $poster_guid: Guid of item poster;
  *
  * @return array
  */
 public function get($guid_two)
 {
     $baseurl = ossn_site_url();
     $this->statement("SELECT * FROM bildirimler WHERE(\n\t\t                  owner_guid='{$guid_two}') ORDER by guid DESC");
     $this->execute();
     $get = $this->fetch(true);
     if (!$get) {
         return false;
     }
     foreach ($get as $notif) {
         if (ossn_is_hook('notification:view', $notif->type)) {
             $messages[] = ossn_call_hook('notification:view', $notif->type, $notif);
         }
     }
     return $messages;
 }