Файловый менеджер - Редактировать - /var/www/html/activities.zip
Ðазад
PK ! w}E�b b view.html.phpnu �[��� <?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\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Table\Table; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Uri\Uri; // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); jimport( 'joomla.application.component.view' ); /** * Configuration view for JomSocial */ class CommunityViewActivities extends HtmlView { /** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display( $tpl = null ) { $mainframe = Factory::getApplication(); $jinput = $mainframe->input; $model = $this->getModel( 'Activities' ); $activities = $model->getActivities(); foreach($activities as $key=>$activity) { $param = new CParameter($activity->params); switch ($activity->app) { case 'users.featured': $user = CFactory::getUser($param->get('userid')); $activities[$key]->title = Text::sprintf('COM_COMMUNITY_MEMBER_IS_FEATURED','<a href="'.CRoute::_(Uri::root().$param->get('owner_url')).'" class="cStream-Author">'.$user->getDisplayName().'</a>'); break; case 'events.wall': case 'groups.wall': case 'pages.wall': case 'profile': $user = CFactory::getUser($activity->actor); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; if($activity->eventid) { $event = Table::getInstance('Event','cTable'); $event->load($activity->eventid); $html .= '➜ <a class="cStream-Reference" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=events&task=viewevent&eventid='.$event->id.'">'. $event->title .'</a>'; } elseif($activity->pageid) { $page = Table::getInstance('Page','cTable'); $page->load($activity->pageid); $html .= '➜ <a class="cStream-Reference" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=pages&task=viewpage&pageid='.$page->id.'">'.$page->name.'</a>'; } elseif($activity->groupid) { $group = Table::getInstance('Group','cTable'); $group->load($activity->groupid); $html .= '➜ <a class="cStream-Reference" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$group->id.'">'.$group->name.'</a>'; } elseif( !empty($activity->target) && $activity->target != $activity->actor) { $target = CFactory::getUser($activity->target); $html .= '➜ <a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$target->id.'">'.$target->getDisplayName().'</a> '; $html .= CActivities::format($activity->title); } else { $html .= ' posted: "'.CActivities::format($activity->title).'"'; } $activities[$key]->title = $html; break; case 'pages.avatar.upload': $user = CFactory::getUser($activity->actor); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; $html .= Text::_('COM_COMMUNITY_ACTIVITIES_NEW_PAGE_AVATAR'); $activities[$key]->title = $html; break; case 'groups.avatar.upload': $user = CFactory::getUser($activity->actor); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; $html .= Text::_('COM_COMMUNITY_ACTIVITIES_NEW_GROUP_AVATAR'); $activities[$key]->title = $html; break; case 'profile.avatar.upload': $user = CFactory::getUser($activity->actor); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; $html .= Text::_('COM_COMMUNITY_ACTIVITIES_NEW_AVATAR'); $activities[$key]->title = $html; break; case 'albums.comment': case 'albums': $album = Table::getInstance( 'Album' , 'CTable' ); $album->load( $activity->cid ); $user = CFactory::getUser($activity->actor); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; $html .= Text::sprintf('COM_COMMUNITY_ACTIVITIES_WALL_POST_ALBUM', CRoute::_($album->getURI()), $this->escape($album->name) ); $activities[$key]->title = $html; break; case 'discussion.like': case 'profile.like': case 'pages.like': case 'groups.like': case 'events.like': case 'photo.like': case 'videos.like': case 'album.like': $actors = $param->get('actors'); $user = CFactory::getUser($activity->actor); // reverse it, so the users order same with frontend $users = array_reverse(explode(',', $actors)); $userCount = count($users); switch($activity->app){ case 'profile.like': $cid = CFactory::getUser($activity->cid); $urlLink = Uri::root().'index.php?option=com_community&view=profile&userid='.$cid->id; $name = $cid->getDisplayName(); $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_PROFILE'; break; case 'pages.like': $cid = Table::getInstance('Page', 'CTable'); $cid->load($activity->pageid); $urlLink = Uri::root().'index.php?option=com_community&view=pages&task=viewpage&pageid='.$cid->id; $name = $cid->name; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_PAGE'; break; case 'groups.like': $cid = Table::getInstance('Group', 'CTable'); $cid->load($activity->groupid); $urlLink = Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$cid->id; $name = $cid->name; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_GROUP'; break; case 'discussion.like': $cid = Table::getInstance('Discussion', 'CTable'); $cid->load($activity->cid); $urlLink = $cid->getLink(); $name = $cid->title; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_DISCUSSION'; break; case 'events.like': $cid = Table::getInstance('Event','CTable'); $cid->load($activity->eventid); $urlLink = Uri::root().'index.php?option=com_community&view=events&task=viewevent&eventid='.$cid->id; $name = $cid->title; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_EVENT'; break; case 'photo.like': $cid = Table::getInstance('Photo','CTable'); $cid->load($activity->cid); $urlLink = Uri::root().'index.php?option=com_community&view=photos&task=photo&albumid='.$cid->albumid.'&userid='.$cid->creator.'&photoid='.$cid->id; $name = $cid->caption; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_PHOTO'; break; case 'videos.like': $cid = Table::getInstance('Video','CTable'); $cid->load($activity->cid); $urlLink = Uri::root().'index.php?option=com_community&view=videos&task=video&userid='.$cid->creator.'&videoid='.$cid->id; $name = $cid->getTitle(); $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_VIDEO'; break; case 'album.like': $cid = Table::getInstance('Album','CTable'); $cid->load($activity->cid); $urlLink = Uri::root().'index.php?option=com_community&view=photos&task=album&albumid='.$cid->id.'&userid='.$cid->creator; $name = $cid->name; $element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_ALBUM'; break; } $slice = 2; if($userCount > 2) { $slice = 1; } $users = array_slice($users,0,$slice); $actorsHTML = array(); foreach($users as $i => $actor) { // set first actor as default avatar if ($i == 0) $activities[$key]->actor = $actor; $user = CFactory::getUser($actor); $actorsHTML[] = '<a class="cStream-Author" target="_blank" href="'. Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'. $user->getDisplayName().'</a>'; } $others = ''; if($userCount > 2) { $others = Text::sprintf('COM_COMMUNITY_STREAM_OTHERS_JOIN_GROUP' , $userCount-1); } $jtext =($userCount>1) ? 'COM_COMMUNITY_STREAM_LIKES_PLURAL' : 'COM_COMMUNITY_STREAM_LIKES_SINGULAR'; $activities[$key]->title = implode( ' '. Text::_('COM_COMMUNITY_AND') . ' ' , $actorsHTML).$others.Text::sprintf($jtext,$urlLink,$name,Text::_($element)) ; break; case 'cover.upload': $user = CFactory::getUser($activity->actor); $type = $param->get('type'); $extraMessage = ''; if(strtolower($type) !=='profile') { $id = strtolower($type.'id'); $cTable = Table::getInstance(ucfirst($type),'CTable'); $cTable->load($activity->$id); if($type == 'page') { $extraMessage = ' <a target="_blank" href="'.Uri::root().'index.php?option=com_community&view=pages&task=viewpage&pageid='.$cTable->id.'">'.$cTable->name.'</a>'; } if($type == 'group') { $extraMessage = ' <a target="_blank" href="'.Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$cTable->id.'">'.$cTable->name.'</a>'; } if($type == 'event') { $extraMessage = ' <a target="_blank" href="'.Uri::root().'index.php?option=com_community&view=events&task=viewevent&eventid='.$cTable->id.'">'.$cTable->title.'</a>'; } } $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> '; if($type == 'profile'){ $html .= Text::_('COM_COMMUNITY_PHOTOS_COVER_UPLOAD_PROFILE'); }else{ $html .= Text::sprintf('COM_COMMUNITY_PHOTOS_COVER_UPLOAD',strtolower(Text::_('COM_COMMUNITY_COVER_'.strtoupper($type)))).$extraMessage; } $activities[$key]->title = $html; break; case 'events.attend': case 'events': $user = CFactory::getUser($activity->actor); $action = $param->get('action'); $event = Table::getInstance('Event', 'CTable'); $event->load($activity->eventid); switch ($action) { case 'events.create': $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> -'; $html .= Text::sprintf('COM_COMMUNITY_EVENTS_ACTIVITIES_NEW_EVENT' , Uri::root().'index.php?option=com_community&view=events&task=viewevent&eventid='.$event->id, $event->title); $activities[$key]->title = $html; break; case 'events.attendence.attend': $users = array_reverse(explode(',',$param->get('actors'))); $actorsHTML = array(); foreach($users as $i => $actor) { if (!$actor) { $actor = $activity->actor; } // set first actor as default avatar if ($i == 0) $activities[$key]->actor = $actor; $user = CFactory::getUser($actor); $actorsHTML[] = '<a class="cStream-Author" target="_blank" href="'. Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'. $user->getDisplayName().'</a>'; } $activities[$key]->title = implode(', ', $actorsHTML) .' - '. Text::sprintf('COM_COMMUNITY_ACTIVITIES_EVENT_ATTEND' , Uri::root().'index.php?option=com_community&view=events&task=viewevent&eventid='.$event->id, $event->title); break; } break; case 'friends.connect': $user1 = CFactory::getUser($activity->actor); $user2 = CFactory::getUser($activity->target); $html =Text::sprintf('COM_COMMUNITY_STREAM_OTHER_FRIENDS', $user1->getDisplayName(),$user2->getDisplayName(), Uri::root().'index.php?option=com_community&view=profile&userid='.$user1->id, Uri::root().'index.php?option=com_community&view=profile&userid='.$user2->id); $activities[$key]->title =$html; break; case 'groups.bulletin': $user = CFactory::getUser($activity->actor); $bulletin = Table::getInstance('Bulletin', 'CTable'); $bulletin->load($activity->cid); $group = Table::getInstance('Group','CTable'); $group->load($bulletin->groupid); $html = '<a class="cStream-Author" target="_blank" href="' .Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a>' . Text::sprintf('COM_COMMUNITY_GROUPS_NEW_GROUP_NEWS' , CRoute::_(Uri::root().'index.php?option=com_community&view=groups&task=viewbulletin&groupid=' . $group->id . '&bulletinid=' . $bulletin->id ), $bulletin->title ); $activities[$key]->title =$html; break; case 'groups.discussion': $user = CFactory::getUser($activity->actor); $discussion = Table::getInstance('Discussion' , 'CTable' ); $discussion->load($activity->cid); $discussionLink = CRoute::_(Uri::root().'index.php?option=com_community&view=groups&task=viewdiscussion&groupid=' . $discussion->groupid . '&topicid=' . $discussion->id ); $html = '<a class="cStream-Author" target="_blank" href="' .Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a>' . Text::sprintf('COM_COMMUNITY_GROUPS_NEW_GROUP_DISCUSSION' , $discussionLink, $discussion->title ) ; $activities[$key]->title =$html; break; case 'groups.discussion.reply': $user = CFactory::getUser($activity->actor); $discussion = Table::getInstance('Discussion' , 'CTable' ); $discussion->load($activity->cid); $html = '<a class="cStream-Author" target="_blank" href="' .Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a>' . Text::sprintf('COM_COMMUNITY_GROUPS_REPLY_DISCUSSION' , CRoute::_(Uri::root().'index.php?option=com_community&view=groups&task=viewdiscussion&groupid='.$discussion->groupid.'&topicid='.$discussion->id), $discussion->title ); $activities[$key]->title =$html; break; case 'groups.join': $user = CFactory::getUser($activity->actor); $users = array_reverse(explode(',', $param->get('actors'))); $userCount = count($users); $group = Table::getInstance('Group','CTable'); $group->load($activity->cid); $slice = 2; if($userCount > 2) { $slice = 1; } $users = array_slice($users,0,$slice); $actorsHTML = array(); foreach($users as $i => $actor) { // set first actor as default avatar if ($i == 0) $activities[$key]->actor = $actor; $user = CFactory::getUser($actor); $actorsHTML[] = '<a class="cStream-Author" target="_blank" href="'. Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'. $user->getDisplayName().'</a>'; } $others = ''; if($userCount > 2) { $others = Text::sprintf('COM_COMMUNITY_STREAM_OTHERS_JOIN_GROUP' , $userCount-1); } $html = implode( ' '. Text::_('COM_COMMUNITY_AND') . ' ' , $actorsHTML) . $others . Text::sprintf('COM_COMMUNITY_GROUPS_GROUP_JOIN' , Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$group->id, $group->name); $activities[$key]->title =$html; break; case 'groups.update': $user = CFactory::getUser($activity->actor); $group = Table::getInstance('Group','CTable'); $group->load($activity->cid); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> - '. Text::sprintf('COM_COMMUNITY_GROUPS_GROUP_UPDATED' , Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$group->id , $group->name ); $activities[$key]->title =$html; break; case 'pages.update': $user = CFactory::getUser($activity->actor); $page = Table::getInstance('Page','CTable'); $page->load($activity->cid); $html = '<a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> - '. Text::sprintf('COM_COMMUNITY_PAGES_PAGE_UPDATED' , Uri::root().'index.php?option=com_community&view=pages&task=viewpage&pageid='.$page->id , $page->name ); $activities[$key]->title =$html; break; case 'photos': $user = CFactory::getUser($activity->actor); $album = Table::getInstance( 'Album' , 'CTable' ); $album->load( $activity->cid ); $html = ''; if($activity->groupid) { $group = Table::getInstance( 'Group' , 'CTable' ); $group->load($activity->groupid); $html .= '<a class="cStream-Reference" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$group->id.'">'.$group->name .'</a> -'; } $html .= ' <a class="cStream-Author" target="_blank" href="'.Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a>'; $count = $param->get('count', 1); $url = Uri::root().'index.php?option=com_community&view=photos&task=album&albumid='.$album->id.'&userid='.$user->id; if(CStringHelper::isPlural($count)) { $html .= Text::sprintf( 'COM_COMMUNITY_ACTIVITY_PHOTO_UPLOAD_TITLE_MANY' , $count, $url, CStringHelper::escape($album->name) ); }else { $html .= Text::sprintf( 'COM_COMMUNITY_ACTIVITY_PHOTO_UPLOAD_TITLE' , $url, CStringHelper::escape($album->name) );; } $activities[$key]->title =$html; break; case 'photos.comment': $user = CFactory::getUser($activity->actor); $wall = Table::getInstance('Wall', 'CTable'); $wall->load($param->get('wallid')); $photo = Table::getInstance('Photo','CTable'); $photo->load($activity->cid); $url = Uri::root().'index.php?option=com_community&view=photos&task=photo&albumid='.$photo->albumid.'&userid='.$photo->creator.'&photoid='.$photo->id; $html = '<a class="cStream-Author" target="_blank" href="'. Uri::root().'index.php?option=com_community&view=profile&userid='.$user->id.'">'.$user->getDisplayName().'</a> ' . Text::sprintf('COM_COMMUNITY_ACTIVITIES_WALL_POST_PHOTO', $url, $this->escape($photo->caption) ); $activities[$key]->title =$html; break; case 'system.message': case 'system.videos.popular': case 'system.photos.popular': case 'system.members.popular': case 'system.photos.total': case 'system.groups.popular': case 'system.members.registered': $action = $param->get('action'); switch ($action) { case 'registered_users': $usersModel = CFactory::getModel( 'user' ); $now = new JDate(); $date = CTimeHelper::getDate(); $users = $usersModel->getLatestMember(10); $totalRegistered = count($users); $title = Text::sprintf('COM_COMMUNITY_TOTAL_USERS_REGISTERED_THIS_MONTH_ACTIVITY_TITLE', $totalRegistered , $date->monthToString($now->format('%m'))); $activities[$key]->title = $title; break; case 'total_photos': $photosModel = CFactory::getModel( 'photos' ); $total = $photosModel->getTotalSitePhotos(); $activities[$key]->title = Text::sprintf('COM_COMMUNITY_TOTAL_PHOTOS_ACTIVITY_TITLE', CRoute::_(Uri::root().'index.php?option=com_community&view=photos') ,$total); break; case 'top_videos': $activities[$key]->title = Text::_('COM_COMMUNITY_ACTIVITIES_TOP_VIDEOS'); break; case 'top_photos': $activities[$key]->title = Text::_('COM_COMMUNITY_ACTIVITIES_TOP_PHOTOS'); break; case 'top_users': $activities[$key]->title = Text::_('COM_COMMUNITY_ACTIVITIES_TOP_MEMBERS'); break; case 'top_groups': $groupsModel = $this->getModel('groups'); $activeGroup = $groupsModel->getMostActiveGroup(); if( is_null($activeGroup)) { $title = Text::_('COM_COMMUNITY_GROUPS_NONE_CREATED'); } else { $title = Text::sprintf('COM_COMMUNITY_MOST_POPULAR_GROUP_ACTIVITY_TITLE', CRoute::_(Uri::root().'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$activeGroup->id), $activeGroup->name); } $activities[$key]->title = $title; break; case 'message': break; } break; case 'videos.linking': case 'videos': $video = Table::getInstance('Video','CTable'); $video->load($activity->cid); $actor = CFactory::getUser($activity->actor); $html = $this->_getUserLink($activity->actor); $html .= Text::sprintf('COM_COMMUNITY_ACTIVITY_VIDEO_SHARE_TITLE',Uri::root().$video->getViewURI(false),$this->escape($video->title)); $activities[$key]->title = $html; break; case 'videos.featured': $video = Table::getInstance('Video','CTable'); $video->load($activity->cid); $activities[$key]->title =Text::sprintf('COM_COMMUNITY_VIDEOS_IS_FEATURED','<a href="'.CRoute::_(Uri::root().'index.php?option=com_community&view=videos&task=video&userid='.$video->creator.'&videoid='.$video->id).'" class="cStream-Title">'.$this->escape($video->title).'</a>'); break; case 'albums.featured': $album = Table::getInstance('Album','CTable'); $album->load($activity->cid); $activities[$key]->title = Text::sprintf('COM_COMMUNITY_ALBUM_IS_FEATURED','<a href="'.CRoute::_(Uri::root().'index.php?option=com_community&view=photos&task=album&albumid='.$album->id.'&userid='.$album->creator).'" class="cStream-Title">'.$this->escape($album->name).'</a>'); break; case 'videos.comment': case 'pages': case 'groups': break; default: $activities[$key]->title = $this->escape($activities[$key]->title); break; } } //exit; $actor = $jinput->request->get('actor' , '', 'string'); $currentArchived = $jinput->request->get('archived' , 0, 'NONE'); $currentApp = $jinput->request->get('app' , 'none', 'NONE'); $filterApps = $model->getFilterApps(); $this->set( 'filterApps' , $filterApps ); $this->set( 'currentApp' , $currentApp ); $this->set( 'actor' , $actor ); $this->set( 'currentArchive' , $currentArchived ); $this->set( 'pagination' , $model->getPagination() ); $this->set( 'activities' , $activities ); parent::display( $tpl ); } public function _getUserLink( $id ) { $user = CFactory::getUser( $id ); return '<a href="' . Uri::root() . 'index.php?option=com_community&view=profile&userid=' . $user->id . '" target="_blank">' . $user->getDisplayName() . '</a>'; } /** * Private method to set the toolbar for this view * * @access private * * @return null **/ public function setToolBar() { // Set the titlebar text ToolbarHelper::title( Text::_('COM_COMMUNITY_ACTIVITIES'), 'activities' ); ToolBarHelper::divider(); ToolBarHelper::trash('delete', Text::_('COM_COMMUNITY_DELETE')); ToolBarHelper::trash('purge', Text::_('COM_COMMUNITY_ACTIVITIES_PURGE_ALL') , false ); ToolBarHelper::archiveList('archiveSelected',Text::_('COM_COMMUNITY_ARCHIVE_SELECTED')); ToolBarHelper::custom('archiveall', 'archive' , 'archive' ,Text::_('COM_COMMUNITY_ARCHIVE_ALL'),false); } } PK ! �#o, , index.htmlnu �[��� <html><body bgcolor="#FFFFFF"></body></html>PK ! �#o, , tmpl/index.htmlnu �[��� <html><body bgcolor="#FFFFFF"></body></html>PK ! ;~W! ! tmpl/default.phpnu �[��� <?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\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); ?> <form action="index.php?option=com_community" method="get" name="adminForm" id="adminForm"> <script type="text/javascript" language="javascript"> document.addEventListener('DOMContentLoaded', function () { Joomla.submitbutton = function(action){ submitbutton( action ); } function submitbutton(action) { if( action == 'purge' ) { if(confirm('<?php echo Text::_('COM_COMMUNITY_ACTIVITIES_PURGE_ACTIVITIES');?>')) { Joomla.submitform( action ); } } else { Joomla.submitform( action ); } } }) </script> <!-- page header --> <div class="row-fluid"> <div class="span12"> <input type="text" name="actor" class="no-margin" value="<?php echo $this->actor ?>" autocomplete="off" placeholder="<?php echo Text::_("COM_COMMUNITY_ACTIVITIES_ENTER_NAME_VALUE"); ?>" /> <div class="btn btn-small btn-primary" onclick="Joomla.submitform();"> <i class="js-icon-filter"></i> <?php echo Text::_('COM_COMMUNITY_GO_BUTTON');?> </div> <div class="pull-right text-right"> <select name="app" onchange="Joomla.submitform();" class="no-margin"> <option value="none"<?php echo ( $this->currentApp == 'none' ) ? ' selected="selected"' : '';?>><?php echo Text::_('COM_COMMUNITY_ACTIVITIES_SELECT_APPLICATION');?></option> <?php for( $i = 0; $i < count( $this->filterApps ); $i++ ) { ?> <option value="<?php echo $this->filterApps[ $i ]->app;?>"<?php echo ( $this->currentApp === $this->filterApps[ $i ]->app ) ? ' selected="selected"' : '';?>><?php echo $this->filterApps[ $i ]->app; ?></option> <?php } ?> </select> <select name="archived" onchange="Joomla.submitform();" class="no-margin"> <option value="0"<?php echo ( $this->currentArchive == 0 ) ? ' selected="selected"' : '';?>><?php echo Text::_('COM_COMMUNITY_ACTIVITIES_SELECT_STATE');?></option> <option value="1"<?php echo ($this->currentArchive == 1 ) ? ' selected="selected"' : '';?>><?php echo Text::_('COM_COMMUNITY_ACTIVITIES_ACTIVE');?></option> <option value="2"<?php echo ($this->currentArchive == 2 ) ? ' selected="selected"' : '';?>><?php echo Text::_('COM_COMMUNITY_ACTIVITIES_ARCHIVED');?></option> </select> </div> <div style="position:relative;height:1px;z-index:100"> <div class="joms-js--act-users" style="position:absolute;left:0;top:0;width:208px;border:1px solid rgb(245,153,66);border-top:0 none;display:none;background:#FFF;padding:5px"> <div class="joms-js--loading" style="display:none"> <img src="<?php echo Uri::root(true); ?>/components/com_community/assets/ajax-loader.gif" alt="loader"> </div> <div class="joms-js--act-result"></div> </div> </div> <div class="joms-js--act-selected" style="padding:5px 0 10px;display:none"></div> </div> </div> <table class="table table-bordered table-hover"> <thead> <tr class="title"> <th width="10"> <?php echo Text::_('COM_COMMUNITY_NUMBER'); ?> </th> <th width="10"> <input type="checkbox" name="toggle" value="" onclick="Joomla.checkAll(this)" /> <span class="lbl"></span> </th> <th> </th> <th> <?php echo Text::_('COM_COMMUNITY_TITLE'); ?> </th> <th width="170"> <?php echo Text::_('COM_COMMUNITY_CREATED');?> </th> <th><?php echo Text::_('COM_COMMUNITY_STATUS')?></th> </tr> </thead> <?php if( $this->activities ) { $i = 0; foreach($this->activities as $row ) { $row->title = CString::str_ireplace('{target}', $this->_getUserLink( $row->target ) , $row->title); $row->title = preg_replace('/\{multiple\}(.*)\{\/multiple\}/i', '', $row->title); $search = array('{single}','{/single}'); $row->title = CString::str_ireplace($search, '', $row->title); $row->title = CString::str_ireplace('{actor}', $this->_getUserLink( $row->actor ) , $row->title); $row->title = CString::str_ireplace('{app}', $row->app, $row->title); //strip out _QQQ_ $row->title = CString::str_ireplace('_QQQ_','', $row->title); preg_match_all("/{(.*?)}/", $row->title, $matches, PREG_SET_ORDER); if(!empty( $matches )) { $params = new CParameter( $row->params ); foreach ($matches as $val) { $replaceWith = $params->get($val[1], null); //if the replacement start with 'index.php', we can CRoute it if( strpos($replaceWith, 'index.php') === 0){ $replaceWith = Uri::root().$replaceWith; } if( !is_null( $replaceWith ) ) { $row->title = CString::str_ireplace($val[0], $replaceWith, $row->title); } } } $row->title = preg_replace('/(<a href[^<>]+)>/is', '\\1 target="_blank">', $row->title); ?> <tr> <td align="center"><?php echo ( $i + 1 ); ?></td> <td> <?php echo HTMLHelper::_('grid.id', $i++, $row->id); ?> <span class="lbl"></span> </td> <td> <?php $user = CFactory::getUser($row->actor); ?> <img src="<?php echo $user->getThumbAvatar(); ?>" /> </td> <td><?php echo $row->title;?></td> <td align="center"><?php echo $row->created;?></td> <td align="center"><?php echo ($row->archived) ? Text::_('COM_COMMUNITY_ACTIVITIES_ARCHIVED') : Text::_('COM_COMMUNITY_ACTIVITIES_ACTIVE') ;?></td> </tr> <?php } ?> <?php } else { ?> <tr> <td colspan="6" align="center"> <?php echo Text::_('COM_COMMUNITY_ACTIVITIES_NO_ACTIVITIES_YET');?> </td> </tr> <?php } ?> </table> <div class="pull-left"> <?php echo $this->pagination->getListFooter(); ?> </div> <div class="pull-right"> <?php echo $this->pagination->getLimitBox(); ?> </div> <input type="hidden" name="view" value="activities" /> <input type="hidden" name="option" value="com_community" /> <input type="hidden" name="task" value="activities" /> <input type="hidden" name="boxchecked" value="0" /> </form> <script> document.addEventListener('DOMContentLoaded', function () { var $input, $div, $selected, $doc, admin_site, live_site, xhr; function init() { admin_site = window.jax_live_site; live_site = admin_site.replace('/administrator', ''); $input = window.jQuery('[name=actor]'); $div = window.jQuery('.joms-js--act-users'); $selected = window.jQuery('.joms-js--act-selected').empty(); $doc = window.jQuery(document); $input.on('keyup', search ); $div.on('click', 'a[data-id]', select ); } function search() { var keyword = $input.val() || ''; if ( !keyword.replace(/^\s+|\s+$/g, '') ) { return; } if ( xhr ) { xhr.abort(); } var $dropdown = $div.find('.joms-js--act-result').hide(), $loading = $div.find('.joms-js--loading').show(); $div.show(); window.jax_live_site = live_site; xhr = joms.ajax({ func: 'search,ajaxSearch', data: [ keyword ], callback: function( json ) { var $form, $btn, html, i, max; $loading.hide(); if ( json.error ) { $dropdown.html( json.error ).show(); return; } if ( json.length ) { html = ''; for ( i = 0; i < json.length; i++ ) { html += '<div style="padding:2px 0"><a href="javascript:" data-id="' + json[i].id + '" style="color:inherit;text-decoration:none;display:block">'; html += '<img src="' + json[i].thumb + '" width="32"> '; html += '<span>' + json[i].name + '</span>'; html += '</a></div>'; } $dropdown.html( html ).show(); } } }); window.jax_live_site = admin_site; } function select( e ) { var $el = $( e.currentTarget ); $input.val( $el.find('span').text() ); $div.hide(); } init(); }) </script>PK ! w}E�b b view.html.phpnu �[��� PK ! �#o, , Kb index.htmlnu �[��� PK ! �#o, , �b tmpl/index.htmlnu �[��� PK ! ;~W! ! c tmpl/default.phpnu �[��� PK 6 c�
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка