Файловый менеджер - Редактировать - /var/www/html/mytaggedvideos.zip
Ðазад
PK ! w�� � mytaggedvideos.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\Plugin\CMSPlugin; use Joomla\CMS\Table\Table; // no direct access defined('_JEXEC') or die('Restricted access'); require_once( JPATH_ROOT .'/components/com_community/libraries/core.php'); if(!class_exists('plgCommunityMyTaggedVideos')) { class plgCommunityMyTaggedVideos extends CApplications { var $name = 'MyTaggedVideos'; var $_name = 'myTaggedVideos'; var $_user = null; var $db; var $_my; function __construct(& $subject, $config) { parent::__construct($subject, $config); $this->db = Factory::getDbo(); $this->_my = CFactory::getUser(); } /** * Ajax function to save a new wall entry * * @param message A message that is submitted by the user * @param uniqueId The unique id for this group * **/ function onProfileDisplay() { CMSPlugin::loadLanguage( 'plg_community_mytaggedvideos', JPATH_ADMINISTRATOR ); $mainframe = Factory::getApplication(); $jinput = Factory::getApplication()->input; // Attach CSS $document = Factory::getDocument(); // $css = JURI::base() . 'plugins/community/myvideos/style.css'; // $document->addStyleSheet($css); $user = CFactory::getRequestUser(); $userid = $user->id; $this->loadUserParams(); $limit = $this->params->get('count', 6); $limitstart = $jinput->get('limitstart', 0); $row = $this->getVideos($userid); $total = count($row); //we must filter the results $results = array(); $limitCount = 0; foreach($row as $result){ if(!CPrivacy::isAccessAllowed($this->_my->id, $userid, 'custom', $result->permissions)){ continue; } $results[] = $result; if(++$limit == $limitCount){ break; } } if($this->params->get('hide_empty', 0) && !$total) return ''; $caching = $this->params->get('cache', 1); if($caching) { $caching = $mainframe->getCfg('caching'); } $cache = Factory::getCache('plgCommunityMyTaggedVideos'); $cache->setCaching($caching); $callback = array('plgCommunityMyTaggedVideos', '_getLatestVideosHTML'); $content = $cache->get($callback, array($userid, $this->userparams->get('count', 5 ), $limitstart, $results, $total)); return $content; } static public function _getLatestVideosHTML($userid, $limit, $limitstart, $row, $total) { // //CFactory::load( 'models' , 'videos' ); $video = Table::getInstance( 'Video' , 'CTable' ); ob_start(); if(!empty($row)) { ?> <ul class="joms-list--half clearfix"> <?php $i = 1; foreach($row as $data) { if($i > $limit){ break; } $i++; $video->load( $data->id ); $link = plgCommunityMyTaggedVideos::buildLink($data->id); $thumbnail = $video->getThumbnail(); ?> <li class="joms-list__item"> <a href="<?php echo $link; ?>" class="joms-block" > <img title="<?php echo CTemplate::escape($video->getTitle());?>" src="<?php echo $thumbnail; ?>"/> <span class="joms-video__duration"><?php echo $video->getDurationInHMS()?></span> </a> </li> <?php } ?> </ul> <div class="joms-gap"></div> <a href="<?php echo CRoute::_('index.php?option=com_community&view=videos&task=myvideos&sort=tagged&userid='.$userid); ?>"> <span><?php echo Text::_('PLG_MYTAGGEDVIDEOS_VIEWALL_VIDEOS');?></span> </a> <?php } else { ?> <div><?php echo Text::_('PLG_MYTAGGEDVIDEOS_NO_VIDEOS')?></div> <?php } ?> <?php $contents = ob_get_contents(); @ob_end_clean(); $html = $contents; return $html; } public function getVideos($userid) { //get videos from the user //CFactory::load('models', 'videos'); $model = CFactory::getModel( 'VideoTagging' ); if ($this->_my->id == $userid || COwnerHelper::isCommunityAdmin()) { $permission = 40; } elseif (CFriendsHelper::isConnected($this->_my->id, $userid)) { $permission = 30; } elseif ($this->_my->id != 0) { $permission = 20; } else { $permission = 10; } $videos = $model->getTaggedVideosByUser($userid, $permission); return $videos; } static public function buildLink($videoId) { $video = Table::getInstance( 'Video' , 'CTable' ); $video->load( $videoId ); return $video->getURL(); } } } PK ! n��܇ � mytaggedvideos.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <extension version="3.4" type="plugin" group="community" method="upgrade"> <name>PLG_MYTAGGEDVIDEOS_TITLE</name> <author>iJoomla</author> <creationDate>July 2015</creationDate> <copyright>Copyright (C) 2008 - 2015 iJoomla. All rights reserved.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>support@jomsocial.com</authorEmail> <authorUrl>http://jomsocial.com</authorUrl> <version>4.9.3</version> <isapplication>true</isapplication> <description>PLG_MYTAGGEDVIDEOS_XML_DESCRIPTION</description> <languages > <language tag="en-GB">en-GB.plg_community_mytaggedvideos.ini</language> <language tag="en-GB">en-GB.plg_community_mytaggedvideos.sys.ini</language> </languages> <files> <file plugin="mytaggedvideos">mytaggedvideos.php</file> <folder>mytaggedvideos</folder> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="title_override" type="text" default="" label="PLG_COMMUNITY_TITLE_SETTINGS" description="PLG_COMMUNITY_TITLE_DESC" /> <field name="favicon" type="media" default="" label="PLG_COMMUNITY_FAVICON_SETTINGS" description="PLG_COMMUNITY_FAVICON_DESC"/> <field name="desc_override" type="textarea" default="" label="PLG_COMMUNITY_DESCRIPTIONS_SETTINGS" description="PLG_COMMUNITY_DESCRIPTIONS_DESC" /> <field name="count" type="text" default="6" label="PLG_COMMUNITY_COUNT_SETTINGS" description="PLG_COMMUNITY_COUNT_DESC" /> <field name="coreapp" class="btn-group btn-group-yesno" type="radio" default="0" label="PLG_COMMUNITY_COREAPP_SETTINGS" description="PLG_COMMUNITY_COREAPP_DESC"> <option value="0">PLG_COMMUNITY_NO</option> <option value="1">PLG_COMMUNITY_YES</option> </field> <field name="position" type="list" default="content" label="PLG_COMMINITY_POSITION_SETTINGS" description="PLG_COMMINITY_POSITION_DESC"> <option value="content">Main content</option> <option value="sidebar-top">Sidebar Top Tabbed</option> <option value="sidebar-top-stacked">Sidebar Top Stacked</option> <option value="sidebar-bottom">Sidebar Bottom Tabbed</option> <option value="sidebar-bottom-stacked">Sidebar Bottom Stacked</option> </field> <field name="hide_empty" class="btn-group btn-group-yesno" type="radio" default="1" label="PLG_COMMUNITY_HIDE_EMPTY_SETTINGS" description="PLG_COMMUNITY_HIDE_EMPTY_DESC"> <option value="0">PLG_COMMUNITY_NO</option> <option value="1">PLG_COMMUNITY_YES</option> </field> </fieldset> </fields> </config> </extension> PK ! �=�R~ ~ mytaggedvideos/favicon.pngnu �[��� �PNG IHDR (-S �PLTE��������T����іN�#���������L�%p�YM�$������J��Ў��՝���`���ٛ�ԑI� Q����M�������T� ��W�&Q�)��]�%7�������c�J����������3�"���+�&�c�������]�:��ݤ������u�O������������U�=���_�!���`�9������{�V������\�H������^���L����������Ѕ��a���������������Z�%���-����k���������?�$�H�g�h���T����������ؙ tRNS @��f �IDATx^��ÂD�tǶm۶mclۿ>o��"wyVU8L�N8�g+����i:9����i �L�����?�7��G���9,.�]��4q�E��>:6�N�����t9C�I4SG5�`�>c�J�S�T)��iD���\y�� 3��k��a�md�A��eo��F-'gqq IEND�B`�PK ! ߄�B mytaggedvideos/index.htmlnu �[��� <!DOCTYPE html><title></title> PK ! mytaggedvideos/style.cssnu �[��� PK ! L��_ _ mytaggedvideos/config.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <extension version="2.5" type="plugin" group="community"> <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <params> <param name="count" type="text" default="5" size="3" label="PLG_MYTAGGEDVIDEOS_TOTAL_VIDEO" description="PLG_MYTAGGEDVIDEOS_XML_DESCRIPTION" /> </params> </extension>PK ! ��E E mytaggedvideos/favicon_64.pngnu �[��� �PNG IHDR @ @ �iq� IDATx^�[�]�]�?sYk�}����ı��IZZ�J M� ����E�@H ^AHHH !$x $�o��>PTTQ�'P��B8I��Mcǎ��������Ͼ�5��t�G>��P�F3k�Z����.3��b��,�ÕG <� � x@���︖��Zȥ��g^y�o��ַ/\��Nj��_�?� X�( �n��O?�������/_�x� 333������͝M�����g�<��?��h�M"���k����`Z�Qz��tX�Xgcc�n�KY�(�.��mdvv������F�9x��]}+��&�=�`���ƙ����*D��4LF�� =�b��� ������:EQ������Dز P�� �|� "��}m���/|��ш��6�O#˙��`�=I�5A�4��U-L��gkk���5a�`4DE.6�M%��̶�LLL ��$!*�+W��g�}�� �7Vy��Q�`@(F�>Eo@Y��I�0�n��L���`8H�d}}]�I>�6(����Lp����d}��ן|��oܻw������'�w�Qn9x�0�fF+�h�r2��20(J� ��ߣ�6���>t�$X���������OpһqΝ?x��� ��-��>9 ��翰���?O=���q�bߥ8�(|Am�1�,�j9Ys�|���*�Qa���h&@&���b"����0-צ�Z���=�}��={�[%��?���x��ʵ�Ήg��'�@$��"*y��W���Á\�����h��=�G<����=!@t%ZA��y���I�IZN�aʸ@�sI,�k�h�h4�%U���h�;w�������B嵭 �6��fj��3�|��S�R�Tk0*d�ᰠ?���;�:�4����=�s$ ��#o6h���o�Z5s"0C:���c������=��7�;v�#03g�u��9t� ��K\���~�,�{�0�F�QJ�`�!�2�䶑�2�ɬ�3c�D]G�H ���h0& ���SK�%�9Z�k������8��Ƴg��K/����G2���D ma��a߾}��&b����e�9O�����4�!Z�>���(Mn,y�a�ƨ(�����fK�� �ܦ: S��P(��{�ˑ��QYH�=�</��bLf��G��e�6=�ʵ��9�-(�]^�[˭�����{��V � X��{_Wњ��=z�-J���Fؓ���ښ��H]�Ƶ�R �g�8qB"J�>�����vN�:����!��@i�ҕ�~'�u_��c� ւ EG�2��02gA��!^]���Qa��r劘A')p�Z����i�����z����ǐ��bU�v�k/c��*!�������{���g�+��믿�y�x����|b\^,cemAE�����b�m)�PF���-a�_٩A V�QA����q�� e��<�1(i ��FJ�Z� �@�%?�2I�?���RQ��T��b&�V(n.�e������� MG���S�<