Skip to content

Commit

Permalink
[Site Modules] Manifest file filters, part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkyKZ committed Jun 24, 2018
1 parent 37535b1 commit 63fb6f2
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 15 deletions.
6 changes: 5 additions & 1 deletion modules/mod_related_items/mod_related_items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
description="MOD_RELATED_FIELD_SHOWDATE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -40,6 +41,7 @@
label="MOD_RELATED_FIELD_MAX_LABEL"
description="MOD_RELATED_FIELD_MAX_DESC"
default="5"
filter="integer"
/>
</fieldset>
<fieldset name="advanced">
Expand All @@ -52,7 +54,7 @@

<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 @@ -64,6 +66,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 @@ -75,6 +78,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
7 changes: 7 additions & 0 deletions modules/mod_search/mod_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
type="number"
label="MOD_SEARCH_FIELD_BOXWIDTH_LABEL"
description="MOD_SEARCH_FIELD_BOXWIDTH_DESC"
filter="integer"
/>

<field
Expand All @@ -49,6 +50,7 @@
label="MOD_SEARCH_FIELD_BUTTON_LABEL"
description="MOD_SEARCH_FIELD_BUTTON_DESC"
default="0"
filter="integer"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
Expand All @@ -75,6 +77,7 @@
label="MOD_SEARCH_FIELD_IMAGEBUTTON_LABEL"
description="MOD_SEARCH_FIELD_IMAGEBUTTON_DESC"
default="0"
filter="integer"
class="btn-group btn-group-yesno"
showon="button:1"
>
Expand All @@ -97,6 +100,7 @@
description="MOD_SEARCH_FIELD_OPENSEARCH_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -116,6 +120,7 @@
label="MOD_SEARCH_FIELD_SETITEMID_LABEL"
description="MOD_SEARCH_FIELD_SETITEMID_DESC"
default="0"
filter="integer"
>
<option value="0">MOD_SEARCH_SELECT_MENU_ITEMID</option>
</field>
Expand All @@ -142,6 +147,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 @@ -153,6 +159,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>

<field
Expand Down
8 changes: 4 additions & 4 deletions modules/mod_stats/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public static function &getList(&$params)
$db = JFactory::getDbo();
$rows = array();
$query = $db->getQuery(true);
$serverinfo = $params->get('serverinfo');
$siteinfo = $params->get('siteinfo');
$counter = $params->get('counter');
$increase = $params->get('increase');
$serverinfo = $params->get('serverinfo', 0);
$siteinfo = $params->get('siteinfo', 0);
$counter = $params->get('counter', 0);
$increase = $params->get('increase', 0);

$i = 0;

Expand Down
4 changes: 2 additions & 2 deletions modules/mod_stats/mod_stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// Include the statistics functions only once
JLoader::register('ModStatsHelper', __DIR__ . '/helper.php');

$serverinfo = $params->get('serverinfo');
$siteinfo = $params->get('siteinfo');
$serverinfo = $params->get('serverinfo', 0);
$siteinfo = $params->get('siteinfo', 0);
$list = ModStatsHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');

Expand Down
8 changes: 7 additions & 1 deletion modules/mod_stats/mod_stats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
description="MOD_STATS_FIELD_SERVERINFO_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -41,6 +42,7 @@
description="MOD_STATS_FIELD_SITEINFO_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -53,6 +55,7 @@
description="MOD_STATS_FIELD_COUNTER_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand All @@ -64,6 +67,7 @@
label="MOD_STATS_FIELD_INCREASECOUNTER_LABEL"
description="MOD_STATS_FIELD_INCREASECOUNTER_DESC"
default="0"
filter="integer"
/>
</fieldset>
<fieldset name="advanced">
Expand All @@ -76,7 +80,7 @@

<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 +92,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 @@ -99,6 +104,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>

<field
Expand Down
3 changes: 2 additions & 1 deletion modules/mod_syndicate/mod_syndicate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
label="MOD_SYNDICATE_FIELD_DISPLAYTEXT_LABEL"
description="MOD_SYNDICATE_FIELD_DISPLAYTEXT_DESC"
default="1"
class="btn-group btn-group-yesno"
filter="integer"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down Expand Up @@ -76,6 +76,7 @@
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC"
default="0"
filter="integer"
>
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
</field>
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_tags_popular/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function getList(&$params)
$query->where($db->quoteName('t.published') . ' = 1 ');

// Filter by Parent Tag
$parentTags = $params->get('parentTag', 0);
$parentTags = $params->get('parentTag', array());

if ($parentTags)
{
Expand Down
8 changes: 7 additions & 1 deletion modules/mod_tags_popular/mod_tags_popular.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
<config>
<fields name="params">
<fieldset name="basic">
<field
<field
name="parentTag"
type="tag"
label="MOD_TAGS_POPULAR_PARENT_TAG_LABEL"
description="MOD_TAGS_POPULAR_PARENT_TAG_DESC"
multiple="true"
filter="int_array"
/>

<field
Expand All @@ -36,6 +37,7 @@
label="MOD_TAGS_POPULAR_MAX_LABEL"
description="MOD_TAGS_POPULAR_MAX_DESC"
default="5"
filter="integer"
first="1"
last="20"
step="1"
Expand Down Expand Up @@ -74,6 +76,7 @@
label="JGLOBAL_ORDER_DIRECTION_LABEL"
description="JGLOBAL_ORDER_DIRECTION_DESC"
default="1"
filter="integer"
>
<option value="0">JGLOBAL_ORDER_ASCENDING</option>
<option value="1">JGLOBAL_ORDER_DESCENDING</option>
Expand All @@ -99,6 +102,7 @@
description="MOD_TAGS_POPULAR_FIELD_NO_RESULTS_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down Expand Up @@ -149,6 +153,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 @@ -160,6 +165,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
3 changes: 3 additions & 0 deletions modules/mod_tags_similar/mod_tags_similar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
label="MOD_TAGS_SIMILAR_MAX_LABEL"
description="MOD_TAGS_SIMILAR_MAX_DESC"
default="5"
filter="integer"
first="1"
last="20"
step="1"
Expand Down Expand Up @@ -79,6 +80,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 @@ -90,6 +92,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_users_latest/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function getUsers($params)
->where('ug.id <> 1');
}

$db->setQuery($query, 0, $params->get('shownumber'));
$db->setQuery($query, 0, $params->get('shownumber', 5));

try
{
Expand Down
4 changes: 4 additions & 0 deletions modules/mod_users_latest/mod_users_latest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
label="MOD_USERS_LATEST_FIELD_NUMBER_LABEL"
description="MOD_USERS_LATEST_FIELD_NUMBER_DESC"
default="5"
filter="integer"
/>

<field
Expand All @@ -37,6 +38,7 @@
description="MOD_USERS_LATEST_FIELD_FILTER_GROUPS_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down Expand Up @@ -64,6 +66,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 @@ -75,6 +78,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>

<field
Expand Down
4 changes: 4 additions & 0 deletions modules/mod_whosonline/mod_whosonline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
label="MOD_WHOSONLINE_SHOWMODE_LABEL"
description="MOD_WHOSONLINE_SHOWMODE_DESC"
default="0"
filter="integer"
>
<option value="0">MOD_WHOSONLINE_FIELD_VALUE_NUMBER</option>
<option value="1">MOD_WHOSONLINE_FIELD_VALUE_NAMES</option>
Expand All @@ -41,6 +42,7 @@
description="MOD_WHOSONLINE_FIELD_FILTER_GROUPS_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down Expand Up @@ -68,6 +70,7 @@
label="COM_MODULES_FIELD_CACHING_LABEL"
description="COM_MODULES_FIELD_CACHING_DESC"
default="0"
filter="integer"
>
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
</field>
Expand All @@ -78,6 +81,7 @@
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
default="900"
filter="integer"
/>
</fieldset>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_whosonline/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<?php endif; ?>

<?php if (($showmode > 0) && count($names)) : ?>
<?php if ($params->get('filter_groups')) : ?>
<?php if ($params->get('filter_groups', 0)) : ?>
<p><?php echo JText::_('MOD_WHOSONLINE_SAME_GROUP_MESSAGE'); ?></p>
<?php endif; ?>
<ul class="whosonline<?php echo $moduleclass_sfx; ?>">
Expand Down
4 changes: 2 additions & 2 deletions modules/mod_wrapper/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public static function getParams(&$params)
$params->def('url', '');
$params->def('scrolling', 'auto');
$params->def('height', '200');
$params->def('height_auto', '0');
$params->def('height_auto', 0);
$params->def('width', '100%');
$params->def('add', '1');
$params->def('add', 1);
$params->def('name', 'wrapper');

$url = $params->get('url');
Expand Down
Loading

0 comments on commit 63fb6f2

Please sign in to comment.