Example #1
0
$OssnWall->owner_guid = ossn_loggedin_user()->guid;
$OssnWall->poster_guid = ossn_loggedin_user()->guid;
//check if users is not posting on its own wall then change wallowner
$owner = input('wallowner');
if (isset($owner) && !empty($owner)) {
    $OssnWall->owner_guid = $owner;
}
//walltype is user
$OssnWall->name = 'user';
//getting some inputs that are required for wall post
$post = input('post');
$friends = input('friends');
$location = input('location');
$privacy = input('privacy');
//validate wall privacy
$privacy = ossn_access_id_str($privacy);
if (!empty($privacy)) {
    $access = input('privacy');
} else {
    $access = OSSN_FRIENDS;
}
if ($OssnWall->Post($post, $friends, $location, $access)) {
    if (ossn_is_xhr()) {
        $guid = $OssnWall->getObjectId();
        $get = $OssnWall->GetPost($guid);
        if ($get) {
            $get = ossn_wallpost_to_item($get);
            ossn_set_ajax_data(array('post' => ossn_wall_view_template($get)));
        }
    }
    //no need to show message on success.
            <?php 
}
?>
            <br/>

            <div class="time">
                <?php 
echo ossn_user_friendly_time($params['post']->time_created);
?>
                <?php 
echo $params['location'];
?>
 -
                <div
                    class="ossn-inline-table ossn-icon-access-<?php 
echo ossn_access_id_str($params['post']->access);
?>
"
                    title="<?php 
echo ossn_print('title:access:private:group');
?>
"></div>

            </div>
        </div>

        <div class="description">
            <div class="post-text"><?php 
echo stripslashes($params['text']);
?>
  </div>