Файловый менеджер - Редактировать - /var/www/html/components/com_community/templates/jomsocial/layouts/activities.profile.status.share.php
Ðазад
<?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 */ use Joomla\CMS\Language\Text; use Joomla\CMS\Table\Table; use Joomla\Registry\Registry; defined('_JEXEC') or die('Restricted access'); $user = CFactory::getUser($this->act->actor); $params = $this->act->params; $activityId = $params->get('activityId'); $activity = Table::getInstance('Activity', 'CTable'); $activity->load($activityId); $date = JDate::getInstance($act->created); if ($config->get('activitydateformat') == "lapse") { $createdTime = CTimeHelper::timeLapse($date); } else { $createdTime = $date->format($config->get('profileDateFormat')); } $actor = CFactory::getUser($activity->actor); $attachment = ''; $activityParam = new CParameter($activity->params); $type = $activityParam->get('type', ''); $count = $activityParam->get('batchcount'); $app = array('events' => Text::_('COM_COMMUNITY_EVENT_SMALLCAP'), 'groups' => Text::_('COM_COMMUNITY_GROUP_SMALLCAP'), 'profile' => Text::_('COM_COMMUNITY_STATUS_SMALLCAP'), 'events.wall' => Text::_('COM_COMMUNITY_EVENT_STATUS'), 'groups.wall' => Text::_('COM_COMMUNITY_GROUP_STATUS'), 'photos' => ($count > 1) ? Text::_('COM_COMMUNITY_PHOTOS_SMALLCAP') : Text::_('COM_COMMUNITY_PHOTO_SMALLCAP'), 'cover.upload' => Text::_('COM_COMMUNITY_COVER_PHOTO_SMALLCAP_' . strtoupper($type)), 'videos' => Text::_('COM_COMMUNITY_VIDEO_SMALLCAP'), 'profile.status.share' => Text::_('COM_COMMUNITY_STATUS_SMALLCAP'), 'groups.discussion' => Text::_('COM_COMMUNITY_GROUPS_GROUP_DISCUSSION'), 'profile.avatar.upload' => Text::_('COM_COMMUNITY_AVATAR_SMALLCAP'), 'wall' => Text::_('COM_COMMUNITY_ACTIVITY'), 'videos.linking' => Text::_('COM_COMMUNITY_VIDEO_SMALLCAP') ); if (!is_null($activity->id)) { /** * Get more data for sharing */ $attachment = new stdClass(); /* Reference activty */ switch ($activity->app) { case 'groups.discussion': $attachment->type = 'share.' . $activity->app; $table = Table::getInstance('Discussion', 'CTable'); $table->load(array( 'id' => $activity->cid, 'groupid' => $activity->groupid)); $attachment->discussion_title = $table->title; $attachment->discussion_message = $table->message; /* Get discussion information */ $attachment->link = CRoute::_($activityParam->get('topic_url')); $table = Table::getInstance('Group', 'CTable'); $table->load($activity->groupid); $attachment->group_name = $table->name; break; case 'groups.discussion.reply': /** * @todo If we keep this way of code than we also need improve query here instead use Table */ $attachment->type = 'share.' . $activity->app; $table = Table::getInstance('Discussion', 'CTable'); $table->load(array( 'id' => $activity->cid, 'groupid' => $activity->groupid)); $attachment->discussion_title = $table->title; $attachment->discussion_message = $table->message; $table = Table::getInstance('Wall', 'CTable'); /* Get discussion information */ $tParams = new Registry($activity->params); $table->load($tParams->get('wallid')); $attachment->comment = $table->comment; $table = Table::getInstance('Group', 'CTable'); $table->load($activity->groupid); $attachment->group_name = $table->name; break; case 'wall' : //from third party app $attachment->content = $activity->content; $attachment->type='general'; break; } (!isset($attachment->type)) ? $attachments = array() : $attachments[] = $attachment; $groupString = ""; if(isset($activity->groupid) && !empty($activity->groupid)){ $groupTable = Table::getInstance('Group', 'CTable'); $groupTable->load($activity->groupid); $groupString = Text::sprintf('COM_COMMUNITY_SHARE_VIDEO_FROM_GROUP',$groupTable->getLink(),$groupTable->name); } $stream = new stdClass(); $stream->actor = $user; $stream->target = null; $stream->headline = Text::sprintf('COM_COMMUNITY_ACTIVITY_SHARE_STATUS', CUrlHelper::userLink($user->id), $user->getDisplayName(false, true), CUrlHelper::userLink($actor->id), $actor->getDisplayName(false, true), (isset($app[$activity->app])) ? $app[$activity->app] : '').$groupString; $stream->message = CActivities::format($act->title); $stream->rawmessage = $act->title; $stream->mood = $params->get('mood', NULL); $stream->sharedMessage = $activity->title; $stream->sharedMood = $activityParam->get('mood', NULL); $stream->backgroundid = $activityParam->get('bgid', NULL); $stream->groupid = $activity->groupid; $stream->eventid = ""; $stream->access = $this->act->access; $stream->attachments = $attachments; /** * @todo Need to clearly this one * Right now it's return on right data */ $stream->attachments[] = CActivityStream::formatStreamAttachment($activity); $stream->createdtime = $createdTime; $this->set('stream', $stream); $this->load('stream/base-extended'); }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка