- Сообщений: 968
- Спасибо получено: 143
Это форк Vinaora Nivo Slider, пришлось переименовать, в силу требования JED. Даже старую версию качать можно было только с варезных сайтов, нашпигованную троянами. Зачем оно такое, согласитесь.
<prefix>_k2_comments
/components/com_k2/templates/default/item_comments_form.php
<span id="formLog"></span>
<input type="hidden" name= "ip" value="<?php echo $userIP = $_SERVER['REMOTE_ADDR']; ?>" />
<?php
/**
* @version $Id: item_comments_form.php 1992 2013-07-04 16:36:38Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<h3><?php echo JText::_('K2_LEAVE_A_COMMENT') ?></h3>
<?php if($this->params->get('commentsFormNotes')): ?>
<p class="itemCommentsFormNotes">
<?php if($this->params->get('commentsFormNotesText')): ?>
<?php echo nl2br($this->params->get('commentsFormNotesText')); ?>
<?php else: ?>
<?php echo JText::_('K2_COMMENT_FORM_NOTES') ?>
<?php endif; ?>
</p>
<?php endif; ?>
<form action="<?php echo JURI::root(true); ?>/index.php" method="post" id="comment-form" class="form-validate">
<label class="formComment" for="commentText"><?php echo JText::_('K2_MESSAGE'); ?> *</label>
<textarea rows="20" cols="10" class="inputbox" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>') this.value='';" name="commentText" id="commentText"><?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?></textarea>
<label class="formName" for="userName"><?php echo JText::_('K2_NAME'); ?> *</label>
<input class="inputbox" type="text" name="userName" id="userName" value="<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>') this.value='';" />
<label class="formEmail" for="commentEmail"><?php echo JText::_('K2_EMAIL'); ?> *</label>
<input class="inputbox" type="text" name="commentEmail" id="commentEmail" value="<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>') this.value='';" />
<label class="formUrl" for="commentURL"><?php echo JText::_('K2_WEBSITE_URL'); ?></label>
<input class="inputbox" type="text" name="commentURL" id="commentURL" value="<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>') this.value='';" />
<?php if($this->params->get('recaptcha') && ($this->user->guest || $this->params->get('recaptchaForRegistered', 1))): ?>
<label class="formRecaptcha"><?php echo JText::_('K2_ENTER_THE_TWO_WORDS_YOU_SEE_BELOW'); ?></label>
<div id="recaptcha"></div>
<?php endif; ?>
<input type="submit" class="button" id="submitCommentButton" value="<?php echo JText::_('K2_SUBMIT_COMMENT'); ?>" />
<span id="formLog"></span>
<input type="hidden" name= "ip" value="<?php echo $userIP = $_SERVER['REMOTE_ADDR']; ?>" />
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="item" />
<input type="hidden" name="task" value="comment" />
<input type="hidden" name="itemID" value="<?php echo JRequest::getInt('id'); ?>" />
<?php echo JHTML::_('form.token'); ?>
</form>
/administrator/components/com_k2/tables/k2comment.php
var $ip = null;
<?php
/**
* @version $Id: k2comment.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
class TableK2Comment extends K2Table
{
var $id = null;
var $itemID = null;
var $userID = null;
var $userName = null;
var $commentDate = null;
var $commentText = null;
var $commentEmail = null;
var $commentURL = null;
var $published = null;
var $ip = null;
function __construct(&$db)
{
parent::__construct('#__k2_comments', 'id', $db);
}
function check()
{
$this->commentText = JString::trim($this->commentText);
}
}
/administrator/components/com_k2/views/comments/tmpl/default.php
<td class="k2Center center hidden-phone">
<?php if($row->commenterLastVisitIP): ?>
<a target="_blank" href="http://www.ipchecking.com/?ip=<?php echo $row->commenterLastVisitIP; ?>&check=Lookup">
<?php echo $row->commenterLastVisitIP; ?>
</a>
<?php endif; ?>
</td>
commenterLastVisitIP
ip
<?php
/**
* @version $Id: default.php 1971 2013-05-01 16:04:17Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<script type="text/javascript">
Joomla.submitbutton = function(pressbutton) {
if (pressbutton == 'remove') {
if (document.adminForm.boxchecked.value==0){
alert('<?php echo JText::_('K2_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST_TO_DELETE', true); ?>');
return false;
}
if (confirm('<?php echo JText::_('K2_ARE_YOU_SURE_YOU_WANT_TO_DELETE_SELECTED_COMMENTS', true); ?>')){
submitform( pressbutton );
}
} else if (pressbutton == 'deleteUnpublished') {
if (confirm('<?php echo JText::_('K2_THIS_WILL_PERMANENTLY_DELETE_ALL_UNPUBLISHED_COMMENTS_ARE_YOU_SURE', true); ?>')){
submitform( pressbutton );
}
} else if (pressbutton == 'publish') {
if (document.adminForm.boxchecked.value==0){
alert('<?php echo JText::_('K2_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST_TO_PUBLISH', true); ?>');
return false;
}
submitform( pressbutton );
} else if (pressbutton == 'unpublish') {
if (document.adminForm.boxchecked.value==0){
alert('<?php echo JText::_('K2_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST_TO_UNPUBLISH', true); ?>');
return false;
}
submitform( pressbutton );
} else {
submitform( pressbutton );
}
}
</script>
<form action="<?php echo JRoute::_('index.php'); ?>" method="post" name="adminForm" id="adminForm">
<?php if($this->mainframe->isSite()): ?>
<div id="k2FrontendContainer">
<div id="k2Frontend">
<table class="k2FrontendToolbar" cellpadding="2" cellspacing="4">
<tr>
<td id="toolbar-publish" class="button">
<a class="toolbar" onclick="Joomla.submitbutton('publish'); return false;" href="#"><?php echo JText::_('K2_PUBLISH'); ?></a>
</td>
<td id="toolbar-unpublish" class="button">
<a class="toolbar" onclick="Joomla.submitbutton('unpublish'); return false;" href="#"><?php echo JText::_('K2_UNPUBLISH'); ?></a>
</td>
<td id="toolbar-delete" class="button">
<a class="toolbar" onclick="Joomla.submitbutton('remove'); return false;" href="#"><?php echo JText::_('K2_DELETE'); ?></a>
</td>
<td id="toolbar-Link" class="button">
<a onclick="Joomla.submitbutton('deleteUnpublished'); return false;" href="#"><?php echo JText::_('K2_DELETE_ALL_UNPUBLISHED'); ?></a>
</td>
</tr>
</table>
<div id="k2FrontendEditToolbar">
<h2 class="header icon-48-k2"><?php echo JText::_('K2_MODERATE_COMMENTS_TO_MY_ITEMS'); ?></h2>
</div>
<div class="clr"></div>
<hr class="sep" />
<?php endif; ?>
<table class="k2AdminTableFilters table">
<tr>
<td class="k2AdminTableFiltersSearch">
<?php echo JText::_('K2_FILTER'); ?>
<input type="text" name="search" value="<?php echo $this->lists['search'] ?>" class="text_area" title="<?php echo JText::_('K2_FILTER_BY_COMMENT'); ?>"/>
<button id="k2SubmitButton"><?php echo JText::_('K2_GO'); ?></button>
<button id="k2ResetButton"><?php echo JText::_('K2_RESET'); ?></button>
</td>
<td class="k2AdminTableFiltersSelects hidden-phone">
<?php echo $this->lists['categories']; ?>
<?php if($this->mainframe->isAdmin()): ?>
<?php echo $this->lists['authors']; ?>
<?php endif; ?>
<?php echo $this->lists['state']; ?>
</td>
</tr>
</table>
<table class="adminlist table table-striped">
<thead>
<tr>
<th class="center hidden-phone">
#
</th>
<th class="center">
<input id="jToggler" type="checkbox" name="toggle" value="" />
</th>
<th>
<?php echo JHTML::_('grid.sort', 'K2_COMMENT', 'c.commentText', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="center">
<?php echo JHTML::_('grid.sort', 'K2_PUBLISHED', 'c.published', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_NAME', 'c.userName', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th>
<?php echo JHTML::_('grid.sort', 'K2_EMAIL', 'c.commentEmail', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_URL', 'c.commentURL', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="center hidden-phone">
<?php echo JText::_('K2_LAST_RECORDED_IP'); ?>
</th>
<th class="center">
<?php echo JText::_('K2_FLAG_AS_SPAMMER'); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_ITEM', 'i.title', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_CATEGORY', 'cat.name', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="hidden-phone">
<?php echo JText::_('K2_AUTHOR'); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_DATE', 'c.commentDate', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
<th class="hidden-phone">
<?php echo JHTML::_('grid.sort', 'K2_ID', 'c.id', @$this->lists['order_Dir'], @$this->lists['order'] ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="15">
<div class="k2CommentsPagination">
<?php if(K2_JVERSION == '30'): ?>
<div class="k2LimitBox">
<?php echo $this->page->getLimitBox(); ?>
</div>
<?php endif; ?>
<?php echo $this->page->getListFooter(); ?>
</div>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->rows as $key=>$row): ?>
<tr class="row<?php echo ($key%2); ?>">
<td class="center hidden-phone">
<?php echo $key+1; ?>
</td>
<td class="center">
<?php $row->checked_out = 0; echo @JHTML::_('grid.checkedout', $row, $key ); ?>
</td>
<td id="k2Comment<?php echo $row->id; ?>">
<div class="commentText"><?php echo $row->commentText; ?></div>
<div class="commentToolbar"><span class="k2CommentsLog"></span> <a href="#" rel="<?php echo $row->id; ?>" class="editComment"><?php echo JText::_('K2_EDIT'); ?></a> <a href="#" rel="<?php echo $row->id; ?>" class="saveComment"><?php echo JText::_('K2_SAVE'); ?></a> <a href="#" rel="<?php echo $row->id; ?>" class="closeComment"><?php echo JText::_('K2_CANCEL'); ?></a>
<div class="clr"></div>
</div>
<input type="hidden" name="currentValue[]" value="<?php echo $row->commentText; ?>" />
</td>
<td class="k2Center center">
<?php echo $row->status; ?>
</td>
<td class="hidden-phone">
<?php if($this->mainframe->isAdmin() && $row->userID): ?>
<a href="<?php echo $this->userEditLink.$row->userID;?>"><?php echo $row->userName; ?></a>
<?php else :?>
<?php echo $row->userName; ?>
<?php endif; ?>
</td>
<td class="k2ForceWrap">
<?php echo $row->commentEmail; ?>
</td>
<td class="k2ForceWrap hidden-phone">
<a target="_blank" href="<?php echo JFilterOutput::cleanText($row->commentURL); ?>"><?php echo str_replace(array('http://www.','https://www.','http://','https://'),array('','','',''),$row->commentURL); ?></a>
</td>
<td class="k2Center center hidden-phone">
<?php if($row->ip): ?>
<a target="_blank" href="http://www.ipchecking.com/?ip=<?php echo $row->ip; ?>&check=Lookup">
<?php echo $row->ip; ?>
</a>
<?php endif; ?>
</td>
<td class="k2Center center">
<?php if($row->reportUserLink): ?>
<a class="k2ReportUserButton k2IsIcon" href="<?php echo $row->reportUserLink; ?>">×</a>
<?php endif; ?>
</td>
<td class="hidden-phone">
<a class="modal" rel="{handler: 'iframe', size: {x: 1000, y: 600}}" href="<?php echo JURI::root().K2HelperRoute::getItemRoute($row->itemID.':'.urlencode($row->itemAlias),$row->catid.':'.urlencode($row->catAlias)); ?>"><?php echo $row->title; ?></a>
</td>
<td class="hidden-phone">
<?php echo $row->catName; ?>
</td>
<td class="hidden-phone">
<?php $user = JFactory::getUser($row->created_by); echo $user->name; ?>
</td>
<td class="k2Date hidden-phone">
<?php echo JHTML::_('date', $row->commentDate , $this->dateFormat); ?>
</td>
<td class="hidden-phone">
<?php echo $row->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="isSite" value="<?php echo (int)$this->mainframe->isSite(); ?>" />
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="<?php echo JRequest::getCmd('view'); ?>" />
<input type="hidden" id="task" name="task" value="" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" id="commentID" name="commentID" value="" />
<input type="hidden" id="commentText" name="commentText" value="" />
<?php echo JHTML::_( 'form.token' ); ?>
<?php if($this->mainframe->isSite()): ?>
</div>
</div>
<?php endif; ?>
</form>
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.