Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions administrator/modules/mod_custom/mod_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
description="MOD_CUSTOM_FIELD_PREPARE_CONTENT_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -42,14 +43,15 @@
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
/>

<field
name="moduleclass_sfx"
type="textarea" rows="3"
type="textarea"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
rows="3"
/>

<field
Expand All @@ -58,6 +60,7 @@
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC"
default="1"
filter="integer"
>
<option value="1">JGLOBAL_USE_GLOBAL</option>
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
Expand All @@ -69,6 +72,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
15 changes: 12 additions & 3 deletions administrator/modules/mod_feed/mod_feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
description="MOD_FEED_FIELD_RTL_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -52,6 +53,7 @@
description="MOD_FEED_FIELD_RSSTITLE_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -64,6 +66,7 @@
description="MOD_FEED_FIELD_DESCRIPTION_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -76,6 +79,7 @@
description="MOD_FEED_FIELD_IMAGE_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -87,6 +91,7 @@
label="MOD_FEED_FIELD_ITEMS_LABEL"
description="MOD_FEED_FIELD_ITEMS_DESC"
default="3"
filter="integer"
/>

<field
Expand All @@ -96,6 +101,7 @@
description="MOD_FEED_FIELD_ITEMDESCRIPTION_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -105,17 +111,18 @@
name="word_count"
type="number"
label="MOD_FEED_FIELD_WORDCOUNT_LABEL"
description="MOD_FEED_FIELD_WORDCOUNT_DESC"
description="MOD_FEED_FIELD_WORDCOUNT_DESC"
size="6"
default="0"
filter="integer"
/>
</fieldset>
<fieldset name="advanced">
<field
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
/>

<field
Expand All @@ -132,6 +139,7 @@
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC"
default="1"
filter="integer"
>
<option value="1">JGLOBAL_USE_GLOBAL</option>
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
Expand All @@ -141,8 +149,9 @@
name="cache_time"
type="number"
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
10 changes: 5 additions & 5 deletions administrator/modules/mod_feed/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
else
{
$lang = JFactory::getLanguage();
$myrtl = $params->get('rssrtl');
$myrtl = $params->get('rssrtl', 0);
$direction = ' ';

if ($lang->isRtl() && $myrtl == 0)
Expand Down Expand Up @@ -78,13 +78,13 @@
<!-- Show items -->
<?php if (!empty($feed)) : ?>
<ul class="newsfeed<?php echo $params->get('moduleclass_sfx'); ?>">
<?php for ($i = 0; $i < $params->get('rssitems', 5); $i++) :
<?php for ($i = 0; $i < $params->get('rssitems', 3); $i++) :

if (!$feed->offsetExists($i)) :
break;
endif;
$uri = $feed[$i]->uri || !$feed[$i]->isPermaLink ? trim($feed[$i]->uri) : trim($feed[$i]->guid);
$uri = !$uri || stripos($uri, 'http') !== 0 ? $params->get('rsslink') : $uri;
$uri = !$uri || stripos($uri, 'http') !== 0 ? $rssurl : $uri;
$text = $feed[$i]->content !== '' ? trim($feed[$i]->content) : '';
?>
<li>
Expand All @@ -96,12 +96,12 @@
<h5 class="feed-link"><?php echo trim($feed[$i]->title); ?></h5>
<?php endif; ?>

<?php if ($params->get('rssitemdesc') && $text !== '') : ?>
<?php if ($params->get('rssitemdesc', 1) && $text !== '') : ?>
<div class="feed-item-description">
<?php
// Strip the images.
$text = JFilterOutput::stripImages($text);
$text = JHtml::_('string.truncate', $text, $params->get('word_count'), true, false);
$text = JHtml::_('string.truncate', $text, $params->get('word_count', 0), true, false);
echo str_replace('&apos;', "'", $text);
?>
</div>
Expand Down
18 changes: 11 additions & 7 deletions administrator/modules/mod_latest/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function getList(&$params)
' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state, a.publish_up, a.publish_down');

// Set Ordering filter
switch ($params->get('ordering'))
switch ($params->get('ordering', 'c_dsc'))
{
case 'm_dsc':
$model->setState('list.ordering', 'modified DESC, created');
Expand All @@ -52,7 +52,7 @@ public static function getList(&$params)
}

// Set Category Filter
$categoryId = $params->get('catid');
$categoryId = $params->get('catid', null);

if (is_numeric($categoryId))
{
Expand All @@ -62,7 +62,7 @@ public static function getList(&$params)
// Set User Filter.
$userId = $user->get('id');

switch ($params->get('user_id'))
switch ($params->get('user_id', '0'))
{
case 'by_me':
$model->setState('filter.author_id', $userId);
Expand Down Expand Up @@ -112,9 +112,9 @@ public static function getList(&$params)
*/
public static function getTitle($params)
{
$who = $params->get('user_id');
$catid = (int) $params->get('catid');
$type = $params->get('ordering') == 'c_dsc' ? '_CREATED' : '_MODIFIED';
$who = $params->get('user_id', '0');
$catid = (int) $params->get('catid', null);
$type = $params->get('ordering', 'c_dsc') == 'c_dsc' ? '_CREATED' : '_MODIFIED';

if ($catid)
{
Expand All @@ -134,6 +134,10 @@ public static function getTitle($params)
$title = '';
}

return JText::plural('MOD_LATEST_TITLE' . $type . ($catid ? '_CATEGORY' : '') . ($who != '0' ? "_$who" : ''), (int) $params->get('count'), $title);
return JText::plural(
'MOD_LATEST_TITLE' . $type . ($catid ? '_CATEGORY' : '') . ($who != '0' ? "_$who" : ''),
(int) $params->get('count', 5),
$title
);
}
}
9 changes: 6 additions & 3 deletions administrator/modules/mod_latest/mod_latest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
name="count"
type="number"
label="MOD_LATEST_FIELD_COUNT_LABEL"
description="MOD_LATEST_FIELD_COUNT_DESC"
description="MOD_LATEST_FIELD_COUNT_DESC"
default="5"
filter="integer"
/>

<field
Expand All @@ -49,6 +50,7 @@
id="catid"
extension="com_content"
default=""
filter="integer"
>
<option value="">JOPTION_ANY_CATEGORY</option>
</field>
Expand All @@ -70,12 +72,12 @@
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
/>

<field
name="moduleclass_sfx"
type="textarea"
type="textarea"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
rows="3"
Expand All @@ -88,6 +90,7 @@
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_logged/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ public static function getList(&$params)
*/
public static function getTitle($params)
{
return JText::plural('MOD_LOGGED_TITLE', $params->get('count'));
return JText::plural('MOD_LOGGED_TITLE', $params->get('count', 5));
}
}
7 changes: 5 additions & 2 deletions administrator/modules/mod_logged/mod_logged.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
name="count"
type="number"
label="MOD_LOGGED_FIELD_COUNT_LABEL"
description="MOD_LOGGED_FIELD_COUNT_DESC"
description="MOD_LOGGED_FIELD_COUNT_DESC"
default="5"
filter="integer"
/>

<field
Expand All @@ -35,6 +36,7 @@
label="MOD_LOGGED_NAME"
description="MOD_LOGGED_FIELD_NAME_DESC"
default="1"
filter="integer"
>
<option value="1">MOD_LOGGED_NAME</option>
<option value="0">JGLOBAL_USERNAME</option>
Expand All @@ -45,7 +47,7 @@
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
/>

<field
Expand All @@ -63,6 +65,7 @@
description="COM_MODULES_FIELD_AUTOMATIC_TITLE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down
3 changes: 2 additions & 1 deletion administrator/modules/mod_login/mod_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
description="MOD_LOGIN_FIELD_USESECURE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -39,7 +40,7 @@
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
/>

<field
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_login/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
JHtml::_('formbehavior.chosen', '.advancedSelect');
}
?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="form-login" class="form-inline">
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure', 0)); ?>" method="post" id="form-login" class="form-inline">
<fieldset class="loginform">
<div class="control-group">
<div class="controls">
Expand Down
4 changes: 2 additions & 2 deletions administrator/modules/mod_menu/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function load($params, $enabled)
{
$items = MenusHelper::getMenuItems($menutype, true);

if ($this->enabled && $this->params->get('check'))
if ($this->enabled && $this->params->get('check', 1))
{
if ($this->check($items, $this->params))
{
Expand Down Expand Up @@ -256,7 +256,7 @@ protected function preprocess($items)
$item->icon = isset($item->icon) ? $item->icon : '';

// Whether this scope can be displayed. Applies only to preset items. Db driven items should use un/published state.
if (($item->scope === 'help' && !$this->params->get('showhelp')) || ($item->scope === 'edit' && !$this->params->get('shownew')))
if (($item->scope === 'help' && !$this->params->get('showhelp', 1)) || ($item->scope === 'edit' && !$this->params->get('shownew', 1)))
{
continue;
}
Expand Down
3 changes: 3 additions & 0 deletions administrator/modules/mod_menu/mod_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
description="MOD_MENU_FIELD_CHECK_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype!:*"
>
<option value="1">JYES</option>
Expand All @@ -63,6 +64,7 @@
description="MOD_MENU_FIELD_SHOWNEW_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype:*"
>
<option value="0">JHIDE</option>
Expand All @@ -76,6 +78,7 @@
description="MOD_MENU_FIELD_SHOWHELP_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype:*"
>
<option value="0">JHIDE</option>
Expand Down
Loading