Skip to content

Commit

Permalink
Add recaptcha for article front-end edit.
Browse files Browse the repository at this point in the history
Add recaptcha for article front-end edit.
  • Loading branch information
trungch committed May 5, 2017
1 parent c38248d commit 4db877e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

$cparams = JComponentHelper::getParams('com_media');

$tparams = $this->params;
jimport('joomla.html.html.bootstrap');
?>
<div class="contact<?php echo $this->pageclass_sfx?>" itemscope itemtype="http://schema.org/Person">
Expand Down Expand Up @@ -42,6 +42,7 @@
</span>
</h3>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?>
Expand All @@ -54,6 +55,7 @@
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>

<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<div class="accordion" id="slide-contact">
<div class="accordion-group">
Expand Down Expand Up @@ -197,6 +199,9 @@
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_user_custom_fields') && $this->contactUser) : ?>
<?php echo $this->loadTemplate('user_custom_fields'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>
<?php if ($this->params->get('presentation_style')=='sliders'):?>
<div class="accordion-group">
Expand Down Expand Up @@ -248,4 +253,5 @@
<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
3 changes: 3 additions & 0 deletions source/plg_system_t3/base/html/com_content/form/edit.php
Expand Up @@ -109,6 +109,9 @@
<?php endif; ?>

<?php echo $this->form->getInput('articletext'); ?>
<?php if ($this->captchaEnabled) : ?>
<?php echo $this->form->renderField('captcha'); ?>
<?php endif; ?>
</div>

<?php if(count($extrafields)) : ?>
Expand Down
3 changes: 1 addition & 2 deletions source/plg_system_t3/includes/core/minify.php
Expand Up @@ -437,7 +437,7 @@ public static function optimizejs($tpl){

$url = self::fixUrl($url);

if (((!empty($script['mime']) && $script['mime'] == 'text/javascript') || $script['type'] == 'text/javascript') && ($jspath = self::jsPath($url))) {
if (((!empty($script['mime']) && $script['mime'] == 'text/javascript') || $script['type'] == 'text/javascript') && !preg_match('/tinymce/', $url) && ($jspath = self::jsPath($url))) {

$script['path'] = $jspath;
$script['data'] = file_get_contents($jspath);
Expand Down Expand Up @@ -480,7 +480,6 @@ public static function optimizejs($tpl){
$groupname[] = $gurl;
$ftime = @filemtime($gsheet['path']);
if ($ftime > $grouptime) $grouptime = $ftime;
if (preg_match('/tinymce/', $gurl)) $jsgroup['ignore'] = true;
}

$jsgroup['groupname'] = implode('', $groupname);
Expand Down

0 comments on commit 4db877e

Please sign in to comment.