| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/www/cj79373/components/com_community/templates/jomsocial/layouts/stream/ |
Upload File : |
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <webmaster@ijoomla.com>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die('Restricted access');
$user = CFactory::getUser($this->act->actor);
if ( !is_object($act->params))
$act->params = new JRegistry ($act->params);
$param = $act->params;
$video = JTable::getInstance( 'Video' , 'CTable' );
$video->load( $act->cid );
$this->set('video', $video);
$mood = $param->get('mood',null);
// Attach to $act since it is used by the video library
$act->video = $video;
// Load saperate template for featured videos
if( $act->app == 'videos.featured'){
$this->load('activities/videos/featured');
return;
}
// Load saperate template for comment on videos
// param is legacy code, its kept to make sure we are able to distinguish this as a comment
if ($act->app == 'videos.comment' || $param->get('action') == 'wall') {
$this->load('activities/videos/comment');
return;
}
$stream = new stdClass();
if($act->groupid){
$group = JTable::getInstance( 'Group' , 'CTable' );
$group->load( $act->groupid );
$stream->group = $group;
$act->appTitle = $group->name;
}
if($act->pageid){
$page = JTable::getInstance( 'Page' , 'CTable' );
$page->load( $act->pageid );
$stream->page = $page;
$act->appTitle = $page->name;
}
// get created date time
$date = JDate::getInstance($this->act->created);
if ( $config->get('activitydateformat') == "lapse" ) {
$createdTime = CTimeHelper::timeLapse($date);
} else {
$createdTime = $date->format($config->get('profileDateFormat'));
}
$stream->actor = $user;
$stream->target = null;
$stream->headline = CVideos::getActivityTitleHTML($act);
$stream->message = "";
$stream->pageid = $act->pageid;
$stream->groupid = $act->groupid;
$stream->eventid = $act->eventid;
$stream->attachments = array();
$stream->access = $video->permissions;
$stream->createdtime = $createdTime;
$quoteContent = CActivities::format($act->title,$mood);
//if(!empty($quoteContent) && $param->get('style') == COMMUNITY_STREAM_STYLE){
if($param->get('style') == COMMUNITY_STREAM_STYLE){
$attachment = new stdClass();
$attachment->type = 'text';
$attachment->message = $quoteContent;
$attachment->hasMood = is_null($mood) ? false : true;
/* Temporary fix for sprint 2 */
if ($this->act instanceof CTableActivity) {
/* If this's CTableActivity then we use getProperties() */
$activity = new CActivity($this->act->getProperties());
} else {
/* If it's standard object than we just passing it */
$activity = new CActivity($this->act);
}
$attachment->activity = $activity;
$attachment->address = $activity->getLocation();
$stream->attachments[] = $attachment;
}
$attachment = new stdClass();
$attachment->type = 'video';
$attachment->id = $act->cid;
$attachment->title = $video->title;
$attachment->thumbnail = (($video->thumb) ? $video->thumb : $video->getThumbnail());
$attachment->description = $video->description;
$attachment->duration = CVideosHelper::toNiceHMS(CVideosHelper::formatDuration($video->duration));
$attachment->access = $act->access;
$attachment->video_type = $video->type;
$attachment->link = $video->path;
$stream->attachments[] = $attachment;
$this->set('stream', $stream);
$this->load('stream/base-extended');