Файловый менеджер - Редактировать - /var/www/html/mod_community_photocomments.zip
Ðазад
PK ! G5�1{ { mod_community_photocomments.xmlnu �[��� <?xml version="1.0" encoding="utf-8"?> <extension version="3.4" type="module" client="site" method="upgrade"> <name>JS Photo Comments</name> <author>iJoomla</author> <creationDate>June 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> <description>Photo comments module for JomSocial</description> <languages> <language tag="en-GB">en-GB.mod_community_photocomments.ini</language> </languages> <files> <filename module="mod_community_photocomments">mod_community_photocomments.php</filename> <filename>helper.php</filename> <filename>index.html</filename> <filename>mod_community_photocomments.xml</filename> <filename>tmpl/index.html</filename> <filename>tmpl/default.php</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="album_type" type="list" class="btn-group btn-group-yesno" default="0" label="MOD_COMMUNITY_PHOTOCOMMENTS_PHOTOSFROM_SETTINGS" description="MOD_COMMUNITY_PHOTOCOMMENTS_PHOTOSFROM_DESC"> <option value="0">MOD_COMMUNITY_PHOTOCOMMENTS_ALLALBUMS_OPTION</option> <option value="1">MOD_COMMUNITY_PHOTOCOMMENTS_PROFILEALBUMS_OPTION</option> <option value="2">MOD_COMMUNITY_PHOTOCOMMENTS_GROUPALBUMS_OPTION</option> <option value="3">MOD_COMMUNITY_PHOTOCOMMENTS_EVENTALBUMS_OPTION</option> </field> <field name="show_image" type="list" class="btn-group btn-group-yesno" default="1" label="MOD_COMMUNITY_PHOTOCOMMENTS_IMAGE_SETTINGS" description="MOD_COMMUNITY_PHOTOCOMMENTS_IMAGE_DESC"> <option value="0">MOD_COMMUNITY_PHOTOCOMMENTS_NONE_OPTION</option> <option value="1">MOD_COMMUNITY_PHOTOCOMMENTS_POSTERAVATAR_OPTION</option> <option value="2">MOD_COMMUNITY_PHOTOCOMMENTS_IMAGETMB_OPTION</option> </field> <field name="limit" type="text" class="btn-group btn-group-yesno" default="10" label="MOD_COMMUNITY_PHOTOCOMMENTS_LIMIT_SETTINGS" description="MOD_COMMUNITY_PHOTOCOMMENTS_LIMIT_DESC"/> <field name="char_limit" type="text" class="btn-group btn-group-yesno" default="50" label="MOD_COMMUNITY_PHOTOCOMMENTS_CHARLIMIT_SETTINGS" description="MOD_COMMUNITY_PHOTOCOMMENTS_CHARLIMIT_DESC"/> </fieldset> <fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC"/> <field name="moduleclass_sfx" type="textarea" rows="3" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="" /> <field name="cache" type="list" default="0" label="COM_MODULES_FIELD_CACHING_LABEL" description="" > <option value="1">JGLOBAL_USE_GLOBAL</option> <option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option> </field> </fieldset> </fields> </config> </extension> PK ! �`�# helper.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 */ // no direct access defined('_JEXEC') or die('Restricted access'); /** * Class exists checking */ if (!class_exists('modCommunityPhotoComments')) { /** * */ class modCommunityPhotoComments { /** * * @param type $params * @return type */ static public function getList(&$params) { $user = CFactory::getUser(); $db = JFactory::getDBO(); $extraQuery = ''; switch($params->get('album_type',0)){ case 1 : //profile albums $extraQuery = " AND c.".$db->quoteName('type')." LIKE '%profile%'"; break; case 2 : //group albums $extraQuery = ' AND c.'.$db->quoteName('type').' LIKE '.$db->quote('%group%'); break; case 3 : //event albums $extraQuery = ' AND c.'.$db->quoteName('type').' LIKE '.$db->quote('%event%'); break; default : //all albums } /* Do query */ $query = 'SELECT a.*,b.*,c.' . $db->quoteName('type') . ' as phototype,c.' . $db->quoteName('groupid') . ' FROM ' . $db->quoteName('#__community_wall') . ' AS a ' . ' INNER JOIN ' . $db->quoteName('#__community_photos') . ' AS b ' . ' ON a.' . $db->quoteName('contentid') . '=b.' . $db->quoteName('id') . ' INNER JOIN ' . $db->quoteName('#__community_photos_albums') . ' AS c ' . ' ON b.' . $db->quoteName('albumid') . '=c.' . $db->quoteName('id') . ' WHERE a.' . $db->quoteName('type') . ' =' . $db->Quote('photos') . ' AND a.'.$db->quoteName('comment').' != "" ' . $extraQuery . ' ORDER BY a.' . $db->quoteName('date') . ' DESC '; $db->setQuery($query); $comments = $db->loadObjectList(); //Once results are loaded, filter the count and the user premission level $counter = $params->get('limit', 10); $data = array(); foreach ($comments as $comment) { /* permission checking */ $permission = CPrivacy::getAccessLevel($user->id, $comment->creator); if ($permission >= $comment->permissions) { $data[] = $comment; if (--$counter == 0) { break; } } } return $data; } } } PK ! O��b� � mod_community_photocomments.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 */ // no direct access defined('_JEXEC') or die('Restricted access'); // Check if JomSocial core file exists $corefile = JPATH_ROOT . '/components/com_community/libraries/core.php'; jimport('joomla.filesystem.file'); if (!JFile::exists($corefile)) { return; } // Include JomSocial's Core file, helpers, settings... require_once($corefile); require_once dirname(__FILE__) . '/helper.php'; $params->def('privacy', 0); $comments = modCommunityPhotoComments::getList($params); $config = CFactory::getConfig(); $user = CFactory::getUser(); $isPhotoModal = $config->get('album_mode') == 1; require(JModuleHelper::getLayoutPath('mod_community_photocomments', $params->get('layout', 'default'))); $document = JFactory::getDocument(); PK ! ߄�B index.htmlnu �[��� <!DOCTYPE html><title></title> PK ! ߄�B tmpl/index.htmlnu �[��� <!DOCTYPE html><title></title> PK ! �d� tmpl/default.phpnu �[��� <?php /** * @copyright (C) 2015 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( 'Unauthorized Access' ); ?> <?php $config = CFactory::getConfig(); $document = JFactory::getDocument(); $document->addScriptDeclaration("joms_prev_comment_load = +'" . $config->get('prev_comment_load', 10) . "';"); if ($comments) { $i = 1; $total = count($comments); $char_limit = intval($params->get('char_limit', 50)); $captionLimit = intval($params->get('caption_limit')); foreach ($comments as $comment) { //get the time $date = JDate::getInstance($comment->date); if ( $config->get('activitydateformat') == "lapse" ) { $createdTime = CTimeHelper::timeLapse($date); } else { $createdTime = $date->format($config->get('profileDateFormat')); } if (($char_limit > 0) && (strlen($comment->comment) > $char_limit)) { $comment->comment = substr(CUserHelper::replaceAliasURL($comment->comment,false,true), 0, $char_limit) . '...'; } if (($captionLimit > 0) && (strlen($comment->caption) > $captionLimit)) { $comment->caption = substr($comment->caption, 0, $captionLimit) . '...'; } $poster = CFactory::getUser($comment->post_by); if ( $isPhotoModal ) { $link = 'javascript:" onclick="joms.api.photoOpen(\'' . $comment->albumid . '\', \'' . $comment->contentid . '\');'; } else if ($comment->phototype == PHOTOS_USER_TYPE) { $link = CRoute::_('index.php?option=com_community&view=photos&task=photo&albumid=' . $comment->albumid . '&photoid=' . $comment->contentid . '&userid=' . $comment->creator); // . '#photoid=' . $comment->contentid; } else { $link = CRoute::_('index.php?option=com_community&view=photos&task=photo&albumid=' . $comment->albumid . '&photoid=' . $comment->contentid . '&groupid=' . $comment->groupid); // . '#photoid=' . $comment->contentid; } ?> <div class="joms-stream__header no-gap"> <?php if($params->get('show_image',2)){ // 1 = avatar, 2 = image thumbnail ?> <div class="joms-avatar--stream <?php echo ($params->get('show_image', 2) == 1) ? CUserHelper::onlineIndicator(CFactory::getUser($comment->post_by)) : 'square'; ?> "> <a href="<?php echo $link; ?>" > <img src="<?php echo ($params->get('show_image', 2) == 1) ? CFactory::getUser($comment->post_by)->getAvatar() : $comment->thumbnail; ?>" alt="<?php echo CFactory::getUser($comment->post_by)->getDisplayName(); ?>" <?php echo ($params->get('show_image', 2) == 1) ? 'data-author="'.$comment->post_by.'"' : ''; ?> /> </a> </div> <?php } ?> <div class="joms-stream__meta"> "<?php echo CStringHelper::converttagtolink(CUserHelper::replaceAliasURL($comment->comment)); ?>" <?php echo JText::_('MOD_COMMUNITY_PHOTOCOMMENTS_BY') ?> <a href="<?php echo CRoute::_('index.php?option=com_community&view=profile&userid='.$comment->post_by) ?>"><?php echo CFactory::getUser($comment->post_by)->getDisplayName(); ?></a> <div class="joms-text--light"><small><?php echo $createdTime; ?></small></div> </div> </div> <?php $i++; } } else { ?> <div class="joms-blankslate"><?php echo JText::_('MOD_COMMUNITY_PHOTOCOMMENTS_NO_COMMENTS'); ?></div> <?php } ?> PK ! G5�1{ { mod_community_photocomments.xmlnu �[��� PK ! �`�# � helper.phpnu �[��� PK ! O��b� � mod_community_photocomments.phpnu �[��� PK ! ߄�B �! index.htmlnu �[��� PK ! ߄�B O"