Skip to content

Commit

Permalink
Update to 7.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Oct 8, 2018
1 parent d1079fb commit 5c01994
Show file tree
Hide file tree
Showing 29 changed files with 647 additions and 477 deletions.
167 changes: 167 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<project name="jumultithumb" default="dist" basedir=".">

<property name="VERSION" value="7.1.2"/>

<property name="JOOMLA" value="3.8.12"/>

<tstamp>
<format property="DATE" pattern="%d.%m.%Y" />
</tstamp>

<property name="julib" value="2.9.1"/>

<property name="build" value="build"/>

<property name="temp" value="temp"/>

<property name="dist" value="dist"/>

<property name="filename" value="pkg_jumultithumb_v${VERSION}.zip"/>

<target name="init" depends="clean">
<mkdir dir="${build}"/>
<mkdir dir="${temp}"/>
<mkdir dir="${dist}"/>
</target>

<target name="temp">

<copy todir="${temp}/language">
<fileset dir="language">
<include name="**"/>
</fileset>
</copy>

<copy todir="${temp}">
<fileset dir="packages">
<include name="**"/>
</fileset>
</copy>

</target>

<target name="replace">

<copy file="pkg_jumultithumb.xml" todir="${build}">
<filterchain>
<replacetokens>
<token key="version" value="${VERSION}" />
<token key="date" value="${DATE}" />
<token key="julib" value="${julib}" />
</replacetokens>
</filterchain>
</copy>

<!---->

<copy file="packages/plg_jumultithumb/jumultithumb.xml" todir="${temp}/temp/plg_jumultithumb">
<filterchain>
<replacetokens>
<token key="version" value="${VERSION}" />
<token key="date" value="${DATE}" />
</replacetokens>
</filterchain>
</copy>

<delete file="${temp}/plg_jumultithumb/jumultithumb.xml"/>
<copy file="${temp}/temp/plg_jumultithumb/jumultithumb.xml" todir="${temp}/plg_jumultithumb"/>

<!---->

<copy file="packages/plg_jumultithumb_gallery/jumultithumb_gallery.xml" todir="${temp}/temp/plg_jumultithumb_gallery">
<filterchain>
<replacetokens>
<token key="version" value="${VERSION}" />
<token key="date" value="${DATE}" />
</replacetokens>
</filterchain>
</copy>

<delete file="${temp}/plg_jumultithumb_gallery/jumultithumb_gallery.xml"/>
<copy file="${temp}/temp/plg_jumultithumb_gallery/jumultithumb_gallery.xml" todir="${temp}/plg_jumultithumb_gallery"/>

<!---->

<copy file="packages/plg_jumultithumb_editorbutton/jumultithumb_editorbutton.xml" todir="${temp}/temp/plg_jumultithumb_editorbutton">
<filterchain>
<replacetokens>
<token key="version" value="${VERSION}" />
<token key="date" value="${DATE}" />
</replacetokens>
</filterchain>
</copy>

<delete file="${temp}/plg_jumultithumb_editorbutton/jumultithumb_editorbutton.xml"/>
<copy file="${temp}/temp/plg_jumultithumb_editorbutton/jumultithumb_editorbutton.xml" todir="${temp}/plg_jumultithumb_editorbutton"/>

<!---->

<copy file="packages/plg_jumultithumb_contentform/jumultithumb_contentform.xml" todir="${temp}/temp/plg_jumultithumb_contentform">
<filterchain>
<replacetokens>
<token key="version" value="${VERSION}" />
<token key="date" value="${DATE}" />
</replacetokens>
</filterchain>
</copy>

<delete file="${temp}/plg_jumultithumb_contentform/jumultithumb_contentform.xml"/>
<copy file="${temp}/temp/plg_jumultithumb_contentform/jumultithumb_contentform.xml" todir="${temp}/plg_jumultithumb_contentform"/>

</target>

<target name="pack-plugins">

<mkdir dir="${build}/packages"/>

<zip destfile="${build}/packages/plg_jumultithumb.zip" description="plg_jumultithumb">
<fileset dir="${temp}/plg_jumultithumb"/>
</zip>

<zip destfile="${build}/packages/plg_jumultithumb_gallery.zip" description="plg_jumultithumb_gallery">
<fileset dir="${temp}/plg_jumultithumb_gallery"/>
</zip>

<zip destfile="${build}/packages/plg_jumultithumb_contentform.zip" description="plg_jumultithumb_contentform">
<fileset dir="${temp}/plg_jumultithumb_contentform"/>
</zip>

<zip destfile="${build}/packages/plg_jumultithumb_editorbutton.zip" description="plg_jumultithumb_editorbutton">
<fileset dir="${temp}/plg_jumultithumb_editorbutton"/>
</zip>

<copy file="../JULib/dist/lib_julib_v${julib}.zip" todir="${build}/packages"/>

<copy todir="${build}/language">
<fileset dir="${temp}/language">
<include name="**"/>
</fileset>
</copy>

<copy file="pkg_jumultithumb.xml" todir="${build}"/>

<copy file="script.php" todir="${build}"/>

</target>

<target name="dist" depends="init, temp, replace, pack-plugins">
<zip destfile="${dist}/${filename}">
<fileset dir="${build}/">
<include name="**/**"/>
</fileset>
</zip>

<echo msg="Removing old files..."/>
<delete dir="${build}"/>
<delete dir="${temp}"/>

</target>

<target name="clean" description="clean up">

<delete dir="${build}"/>
<delete dir="${temp}"/>

</target>

</project>
37 changes: 20 additions & 17 deletions packages/plg_jumultithumb/adapters/com_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,66 +14,68 @@

class plgContentJUMultiThumb_com_content
{
var $plugin;
public $plugin;

/**
* plgContentJUMultiThumb_com_content constructor.
*
* @param $plugin
*
* @since 7.0
*/
public function __construct(&$plugin)
{
$this->plugin = &$plugin;
$this->app = JFactory::getApplication();
}

/**
* @param $jlayout
*
* @return bool
*
* @since 6.0
* @throws Exception
* @since 7.0
*/
public function jView($jlayout)
{
$app = JFactory::getApplication();

$option = $app->input->get('option');
$view = $app->input->get('view');
$layout = $app->input->get('layout');
$print = $app->input->get('print');
$option = $this->app->input->get('option');
$view = $this->app->input->get('view');
$layout = $this->app->input->get('layout');
$print = $this->app->input->get('print');

switch ($jlayout)
{
case 'Component':
return ($option == 'com_content');
return ($option === 'com_content');
break;

case 'CatBlog':
return (($view == 'category' && ($layout == 'blog')) || ($view == 'category' && ($layout == 'card')));
return (($view === 'category' && ($layout === 'blog')) || ($view === 'category' && ($layout === 'card')));
break;

case 'Blog':
return ($layout == 'blog');
return ($layout === 'blog');
break;

case 'Category':
return ($view == 'categories' && !($layout));
return ($view === 'categories' && !$layout);
break;

case 'Categories':
return ($view == 'categories');
return ($view === 'categories');
break;

case 'Featured':
return ($view == 'featured');
return ($view === 'featured');
break;

case 'Print':
return ($print == '1');
break;

case 'Article':
return ($view == 'article');
return ($view === 'article');
break;
}

Expand All @@ -85,11 +87,12 @@ public function jView($jlayout)
*
* @return JURI
*
* @since 6.0
* @throws Exception
* @since 7.0
*/
public function jViewLink($article)
{
require_once(JPATH_SITE . '/components/com_content/helpers/route.php');
require_once JPATH_SITE . '/components/com_content/helpers/route.php';

if($article->params->get('access-view'))
{
Expand Down
24 changes: 12 additions & 12 deletions packages/plg_jumultithumb/adapters/com_fjrelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,35 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;

class plgContentJUMultiThumb_com_fjrelated
{
var $plugin;
public $plugin;

public function __construct(&$plugin)
{
$this->plugin = &$plugin;
$this->app = Factory::getApplication();
}

public function jView($jlayout)
{
$app = JFactory::getApplication();

$option = $app->input->get('option');
$view = $app->input->get('view');
$layout = $app->input->get('layout');
$print = $app->input->get('print');
$option = $this->app->input->get('option');
$view = $this->app->input->get('view');
$layout = $this->app->input->get('layout');
$print = $this->app->input->get('print');

switch ($jlayout)
{
case 'Component':
return ($option == 'com_fjrelated');
return ($option === 'com_fjrelated');
break;
case 'CatBlog':
return ($view == 'fjrelated' && ($layout == 'blog'));
return ($view === 'fjrelated' && $layout === 'blog');
break;
case 'Blog':
return ($layout == 'blog');
return ($layout === 'blog');
break;
case 'Print':
return ($print == '1');
Expand All @@ -51,7 +52,6 @@ public function jView($jlayout)

public function jViewLink($article)
{

require_once JPATH_SITE . '/components/com_content/helpers/route.php';

if($article->params->get('access-view'))
Expand All @@ -60,7 +60,7 @@ public function jViewLink($article)
}
else
{
$menu = JFactory::getApplication()->getMenu();
$menu = $this->app->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
Expand Down
6 changes: 3 additions & 3 deletions packages/plg_jumultithumb/fields/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class JFormFieldModal_CSS extends JFormField
*
* @return string
*
* @since 6.0
* @since 7.0
*/
protected function getInput()
{
JHtml::_('behavior.modal', 'a.modal');

$script = array();
$script = [];
$script[] = ' function jSelectArticle_' . $this->id . '(id, title, catid, object) {';
$script[] = ' document.id("' . $this->id . '_id").value = id;';
$script[] = ' document.id("' . $this->id . '_name").value = title;';
Expand All @@ -37,7 +37,7 @@ protected function getInput()

JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));

$html = array();
$html = [];
$link = str_replace('administrator/', '', JURI::base()) . 'plugins/content/jumultithumb/load/css.php';

$html[] = '<a class="modal btn btn-primary" title="' . JText::_('PLG_JUMULTITHUMB_CSS_UPLOAD') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 900, y: 550}}"><i class="icon-apply icon-white"></i> ' . JText::_('PLG_JUMULTITHUMB_CSS_UPLOAD') . '</a>';
Expand Down
2 changes: 1 addition & 1 deletion packages/plg_jumultithumb/fields/csscode.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JFormFieldCSSCode extends JFormField
*
* @return string
*
* @since 6.0
* @since 7.0
*/
protected function getInput()
{
Expand Down
4 changes: 3 additions & 1 deletion packages/plg_jumultithumb/fields/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

defined('JPATH_BASE') or die;

$doc = JFactory::getDocument();
use Joomla\CMS\Factory;

$doc = Factory::getDocument();
$adm_url = str_replace('/administrator', '', JURI::base());

$doc->addStyleSheet($adm_url . 'plugins/content/jumultithumb/assets/css/jumultithumb.css?v=2');
Expand Down
4 changes: 2 additions & 2 deletions packages/plg_jumultithumb/fields/toggler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

defined( '_JEXEC' ) or die();

include('head.php');
include('toggler34.php');
include 'head.php';
include 'toggler34.php';
Loading

0 comments on commit 5c01994

Please sign in to comment.