Version 5.0.0 beta 5

This commit is contained in:
Neo committed 2025-12-19 17:04:22 -08:00
1 parent 2f24f9de48
commit 57d9db6ce2
218 files changed
+5331 -7416

No files matched your search

-1
View File
@@ -549,7 +549,6 @@ HTML;
'page_seo_name' => "articles.html",
'page_folder_id' => 0,
'page_ipb_wrapper' => 1,
'page_show_sidebar' => 1,
'page_type' => 'builder',
'page_template' => 'page_builder__single_column__page_page_builder_single_column'
);
+1 -1
View File
@@ -20,7 +20,7 @@
<widget key="Rss"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
<widget key="pagebuildertext"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"","embeddable":true,"padding":false,"default_layout":null,"searchterms":"plaintext,plain"}]]></widget>
<widget key="pagebuilderoembed"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
<widget key="pagebuilderupload"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
<widget key="pagebuilderupload"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"wallpaper","embeddable":true,"padding":false,"default_layout":"wallpaper","searchterms":"carousel,slideshow,autoplay"}]]></widget>
<widget key="Codemirror"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"","embeddable":true,"padding":false,"default_layout":null,"searchterms":"code,rich,plain,editor"}]]></widget>
<widget key="DatabaseNavigation"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":false,"menu_style":"menu","layouts":"wrap,grid,start,center,end,columnLeft,columnRight,stack","embeddable":true}]]></widget>
<widget key="FolderNavigation"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"menu","layouts":"wrap,grid,start,center,end,columnLeft,columnRight,stack","embeddable":true}]]></widget>
+18 -22
View File
@@ -1365,21 +1365,18 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
{{if !empty( $errorTabs )}}
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
{{endif}}
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
<ul role='tablist'>
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
<div role='tablist'>
{{$checkedTab = NULL;}}
{{foreach $elements as $name => $content}}
<li>
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
{lang="$name"}
</a>
</li>
<button type="button" id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">{lang="$name"}</button>
{{endforeach}}
</ul>
</div>
{template="tabScrollers" app="core" group="global" location="global"}
</div>
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
</i-tabs>
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
{{foreach $elements as $name => $contents}}
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" aria-labelledby="ipsTabs_{$id}_{$name}" role="tabpanel" {{if $checkedTab != $name}}hidden{{endif}}>
{{if $hasModOptions && ( $name == 'topic_mainTab' OR $name == 'content_record_form_mainTab' ) }}
<div class='ipsColumns ipsColumns--lines'>
@@ -1515,21 +1512,20 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
{{if !empty( $errorTabs )}}
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
{{endif}}
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
<ul role='tablist'>
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
<div role='tablist'>
{{$checkedTab = NULL;}}
{{foreach $elements as $name => $content}}
<li>
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
{lang="$name"}
</a>
</li>
<button type="button" id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">
{lang="$name"}
</button>
{{endforeach}}
</ul>
</div>
{template="tabScrollers" app="core" group="global" location="global"}
</div>
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
</i-tabs>
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
{{foreach $elements as $name => $contents}}
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" role="tabpanel" aria-labelledby="ipsTabs_{$id}_{$name}" {{if $checkedTab != $name}}hidden{{endif}}>
{{if $hasModOptions && ( $name == 'topic_mainTab' OR $name == 'content_record_form_mainTab' ) }}
<div class='ipsColumns'>
+33 -36
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="cms">
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -67,7 +67,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -111,7 +111,7 @@
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -156,7 +156,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -232,7 +232,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -367,7 +367,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000200"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000200"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -457,7 +457,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1091,13 +1091,12 @@
*/
_switchToTab: function (tab) {
if( tab == 'overview' ){
this.scope.find('#elTab_overview').removeClass('ipsTabs__tabDisabled');
this.scope.find('#elTab_overview').click();
this.scope.find('#ipsTabs_mediaSidebar_overview').click();
}
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1132,7 +1131,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1254,7 +1253,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1366,7 +1365,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100">/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1421,7 +1420,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1471,7 +1470,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1543,7 +1542,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1598,7 +1597,7 @@
var self = this;
// Set element references
this._tabBar = this.scope.find('#elTemplateEditor_tabbar > ul');
this._tabBar = this.scope.find('#elTemplateEditor_tabbar [role="tablist"]');
this._tabContent = this.scope.find('#elTemplateEditor_panels');
// Get the current height of the tab bar
@@ -2168,7 +2167,7 @@
}
// Is this tab active?
var active = tab.hasClass('ipsTabs__tab--active');
var active = (tab.attr('aria-selected') === 'true');
// Let the document know what we're up to
this.trigger( 'closedTab.templates', {
@@ -2188,7 +2187,7 @@
}
if( newTab ){
newTab.find('> a').click();
newTab.click();
}
// Close the tab
@@ -2281,7 +2280,7 @@
if( !this._tabBar.find('[data-fileid="' + data.meta.key + '"]').length ){
this._buildTab( data.meta );
} else {
this._tabBar.find('[data-fileid="' + data.meta.key + '"] > a').click();
this._tabBar.find('[data-fileid="' + data.meta.key + '"]').click();
}
},
@@ -2323,7 +2322,7 @@
this._recalculatePanelWrapper();
// Toggle the new tab
this._tabBar.find('[data-fileid="' + meta.key + '"] > a').click();
this._tabBar.find('[data-fileid="' + meta.key + '"]').click();
// Manually set the content area to loading since we aren't using ui.tabbar's load methods
this._tabContent.addClass('ipsLoading ipsTabs_loadingContent');
@@ -2357,9 +2356,9 @@
*/
_updateTabLabel: function( key, title )
{
var span = this._tabBar.find('[data-fileid="' + key + '"] > a span').clone();
var span = this._tabBar.find('[data-fileid="' + key + '"] span').clone();
this._tabBar.find('[data-fileid="' + key + '"] > a').html( title ).append( span );
this._tabBar.find('[data-fileid="' + key + '"]').html( title ).append( span );
},
/**
@@ -2474,7 +2473,7 @@
tabPanel: null
};
var tab = this._tabBar.find('.ipsTabs__tab.ipsTabs__tab--active').first().parent();
var tab = this._tabBar.find('[aria-selected="true"]').first();
if( !tab.length ){
return toReturn;
@@ -2504,7 +2503,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2785,10 +2784,10 @@
* @returns {string}
*/
_currentType: function () {
if( this._tabBar.find('[data-type="template"]').hasClass('ipsTabs__tab--active') ){
if( this._tabBar.find('[data-type="template"]').attr('aria-selected') === "true" ){
return 'template';
}
if( this._tabBar.find('[data-type="js"]').hasClass('ipsTabs__tab--active') ){
if( this._tabBar.find('[data-type="js"]').attr('aria-selected') === "true" ){
return 'js';
}
@@ -2796,7 +2795,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2925,7 +2924,7 @@
this._textField.addClass('ipsField_loading');
}
var type = $('#elTemplateEditor_typeTabs').find('.ipsTabs__tab--active').attr('data-type');
var type = $('#elTemplateEditor_typeTabs').find('[aria-selected="true"]').attr('data-type');
var type = ( type == 'templates' ) ? 'template' : type; // Because it's fun to be inconsistent, the database 'type' is 'template' yet in templates we use 'templates' - thanks past Matt
$('#elTemplateEditor_fileList').find('li[data-type=' + type + ']').addClass('ipsHide');
@@ -2965,7 +2964,7 @@
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -3010,7 +3009,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
<ul class='ipsGrid ipsGrid--pages-media'>\
{{{contents}}}\
</ul>\
@@ -3027,16 +3026,14 @@ ips.templates.set( 'templates.media.noSearchResults', "\
{{#lang}}mediaNoResults{{/lang}}\
</div>\
");]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
/* TEMPLATECEPTION */
ips.templates.set('templates.editor.newTab', " \
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
<a href='#' class='ipsTabs__tab' id='{{id}}'>{{title}} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>\
</li>\
<a href='#' class='ipsTabs__tab' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}' role='tab' aria-controls='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' aria-selected='false' data-fileid='{{fileid}}' data-location='{{location}}'>{{title}} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>\
");
ips.templates.set('templates.editor.tabPanel', " \
<div data-fileid='{{fileid}}' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' class='ipsTabs__panel' style='display: none' data-location='{{location}}' data-type='{{type}}' data-group='{{group}}' data-name='{{name}}' data-type='{{type}}' data-itemID='{{id}}' data-inherited-value='{{inherited}}'>\
<div class='ipsTabs__panel' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' role='tabpanel' aria-labelledby='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}' hidden data-fileid='{{fileid}}' data-location='{{location}}' data-type='{{type}}' data-group='{{group}}' data-name='{{name}}' data-type='{{type}}' data-itemID='{{id}}' data-inherited-value='{{inherited}}'>\
{{{content}}}\
</div>\
");
+1 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="cms" version="5000030">
<app key="cms" version="5000031">
<word key="__app_cms" js="0">Pages</word>
<word key="menutab__cms" js="0">Pages</word>
<word key="menutab__cms_icon" js="0">file</word>
@@ -298,7 +298,6 @@
<word key="page_meta_index" js="0">Index</word>
<word key="page_meta_index_desc" js="0">Allow Search Engines to index this page.</word>
<word key="page_meta_index_desc_disabled" js="0">The page is not visible to guests, so it cannot be indexed.</word>
<word key="page_show_sidebar" js="0">Show the suite sidebar on this page</word>
<word key="page_type" js="0">Content Editor</word>
<word key="page_type_builder" js="0">Page Editor (recommended)</word>
<word key="page_type_builder_desc" js="0">A visual editor for drag and drop page creation</word>
-14
View File
@@ -2864,20 +2864,6 @@
"values": [],
"zerofill": false
},
"page_show_sidebar": {
"allow_null": true,
"auto_increment": false,
"binary": false,
"comment": "Display the standard suite sidebar",
"decimals": null,
"default": "0",
"length": 1,
"name": "page_show_sidebar",
"type": "INT",
"unsigned": true,
"values": [],
"zerofill": false
},
"page_default": {
"allow_null": false,
"auto_increment": false,
+39 -45
View File
@@ -383,19 +383,15 @@
<a href='{$rootButtons['add_folder']['link']}' data-ipsDialog data-ipsDialog-title='{lang="cms_add_media_folder"}' class='ipsButton ipsButton--secondary ipsButton--small ipsButton--wide' data-role='folderButton'><i class="fa-solid fa-folder-plus"></i> {lang="cms_add_media_folder"}</a>
{{endif}}
</div>
<div class="ipsTabs ipsTabs--stretch acpFormTabBar" id="elMedia_sidebarTabs" data-ipsTabBar data-ipsTabBar-contentarea="#elMedia_sidebar" data-ipstabbar-updateurl="false">
<ul role='tablist'>
<li>
<a href="#" class="ipsTabs__tab ipsTabs__tab--active" data-type="templates" id="elTab_folders" aria-selected="true">{lang="media_folders"}</a>
</li>
<li>
<a href="#" class="ipsTabs__tab ipsTabs__tabDisabled" id='elTab_overview' data-type="css">{lang="media_file_overview"}</a>
</li>
</ul>
<i-tabs class="ipsTabs ipsTabs--stretch acpFormTabBar" id="ipsTabs_mediaSidebar" data-ipsTabBar data-ipsTabBar-contentarea="#elMedia_sidebar" data-ipstabbar-updateurl="false">
<div role='tablist'>
<button type="button" class="ipsTabs__tab" id="ipsTabs_mediaSidebar_folders" role="tab" aria-controls="ipsTabs_mediaSidebar_folders_panel" aria-selected="true" data-type="templates">{lang="media_folders"}</button>
<button type="button" class="ipsTabs__tab" id='ipsTabs_mediaSidebar_overview' role="tab" aria-controls="ipsTabs_mediaSidebar_overview_panel" aria-selected="false" data-type="css">{lang="media_file_overview"}</button>
</div>
{template="tabScrollers" app="core" group="global" location="global"}
</div>
</i-tabs>
<div id='elMedia_sidebar' class='i-background_1 ipsScrollbar'>
<div id='ipsTabs_elMedia_sidebarTabs_elTab_folders_panel' class='ipsTabs__panel'>
<div id='ipsTabs_mediaSidebar_folders_panel' class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_mediaSidebar_folders">
{{$roots = \call_user_func( $tree->getRoots );}}
<ul class='ipsTreeList' data-role='folderList'>
<li class='ipsTreeList_activeBranch ipsTreeList_activeNode' data-role="mediaFolder" data-folderID='0' data-loaded='true'>
@@ -408,7 +404,7 @@
</li>
</ul>
</div>
<div id='ipsTabs_elMedia_sidebarTabs_elTab_overview_panel' class='ipsTabs__panel i-padding_3' data-role='mediaSidebar'>
<div id='ipsTabs_mediaSidebar_overview_panel' class='ipsTabs__panel i-padding_3' data-role='mediaSidebar' role="tabpanel" aria-labelledby="ipsTabs_mediaSidebar_overview" hidden>
<div data-role='itemInformation'>
<div class='cMedia_preview i-margin-bottom_3' data-role='itemPreview'></div>
<div class=''>
@@ -841,21 +837,18 @@
{{if !empty( $errorTabs )}}
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
{{endif}}
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
<ul role='tablist'>
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
<div role='tablist'>
{{$checkedTab = NULL;}}
{{foreach $elements as $name => $content}}
<li>
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
{lang="$name"}
</a>
</li>
<a href='#ipsTabs_{$id}_{$name}_panel' id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">{lang="$name"}</a>
{{endforeach}}
</ul>
</div>
{template="tabScrollers" app="core" group="global" location="global"}
</div>
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
</i-tabs>
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
{{foreach $elements as $name => $contents}}
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" aria-labelledby="ipsTabs_{$id}_{$name}" {{if $checkedTab != $name}}hidden{{endif}}>
{{if $hasModOptions && $name == 'topic_mainTab'}}
<div class='ipsColumns'>
@@ -937,7 +930,7 @@
<template template_group="templates" template_name="addForm" template_data="$formHTML, $type" template_location="admin" template_app="cms"><![CDATA[<div data-type='{$type}'>
{$formHTML|raw}
</div>]]></template>
<template template_group="templates" template_name="editor" template_data="$templates, $current" template_location="admin" template_app="cms"><![CDATA[<div class='ipsTabs__panel' data-role="templatePanel" id='ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel' data-fileid="{$current->key}" data-location="{$current->location}" data-group="{$current->group}" data-name="{$current->title}" data-type='{$current->type}' data-itemID='{$current->id}' data-inherited-value="{$current->_inherited}">
<template template_group="templates" template_name="editor" template_data="$templates, $current" template_location="admin" template_app="cms"><![CDATA[<div class='ipsTabs__panel' id='ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel' role="tabpanel" aria-labelledby="tab_{$current->key}" data-role="templatePanel" data-fileid="{$current->key}" data-location="{$current->location}" data-group="{$current->group}" data-name="{$current->title}" data-type='{$current->type}' data-itemID='{$current->id}' data-inherited-value="{$current->_inherited}">
<input data-role="group" type="text" name="group_{$current->key}" class='ipsJS_hide ipsInput ipsInput--text' value="{$current->group}">
<input data-role="variables" type="text" name="variables_{$current->key}" class="ipsInput ipsInput--text ipsInput--fullWidth" value='{$current->params}' placeholder="{lang="skin_set_template_templatevars"}">
<input data-role="title" type="text" name="title_{$current->key}" class="ipsJS_hide ipsInput ipsInput--text ipsInput--fullWidth" value='{$current->title}' placeholder="{lang="content_template_editor_fields_title"}">
@@ -1059,14 +1052,14 @@
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=js"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_js_title""}'>{lang="content_template_add_template_js"}</a></li>
</ul>
</div>
<div class='ipsTabs ipsTabs--stretch acpFormTabBar' id='elTemplateEditor_typeTabs' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_fileList' data-ipsTabBar-updateURL='false'>
<ul role="tablist">
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=templates"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'templates'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=templates"}' data-type='templates'>{lang="theme_html"}</a></li>
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=css"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'css'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=css"}' data-type='css'>{lang="theme_css"}</a></li>
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=js"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'js'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=js"}' data-type='js'>{lang="theme_js"}</a></li>
</ul>
<i-tabs class='ipsTabs ipsTabs--stretch acpFormTabBar' id='elTemplateEditor_typeTabs' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_fileList' data-ipsTabBar-updateURL='false'>
<div role="tablist">
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=templates"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'templates'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=templates"}' data-type='templates'>{lang="theme_html"}</a>
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=css"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'css'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=css"}' data-type='css'>{lang="theme_css"}</a>
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=js"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'js'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=js"}' data-type='js'>{lang="theme_js"}</a>
</div>
{template="tabScrollers" app="core" group="global" location="global"}
</div>
</i-tabs>
<section id='elTemplateEditor_fileList'>
{template="menu" params="$templates, $current, $request" app="cms" location="admin" group="templates"}
</section>
@@ -1104,13 +1097,11 @@
</li>
</ul>
</div>
<div id='elTemplateEditor_tabbar' class='ipsTabs acpFormTabBar' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_panels'>
<ul role='tablist'>
<li data-fileid='{$current->key}' data-type="{$current->type}" data-location='{$current->location}' data-group="{$current->group}">
<a href='#' class='ipsTabs__tab' id='tab_{$current->key}'>{$current->title} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>
</li>
</ul>
</div>
<i-tabs id='elTemplateEditor_tabbar' class='ipsTabs acpFormTabBar' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_panels'>
<div role='tablist'>
<a href='#' class='ipsTabs__tab' id='tab_{$current->key}' role="tab" aria-controls="ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel" aria-selected="true" data-fileid='{$current->key}' data-type="{$current->type}" data-location='{$current->location}' data-group="{$current->group}">{$current->title} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>
</div>
</i-tabs>
<section data-role="templatePanelWrap" id='elTemplateEditor_panels' data-haseditor="{{if $current->id}}true{{else}}false{{endif}}">
{template="editor" params="$templates, $current" app="cms" location="admin" group="templates"}
</section>
@@ -1266,7 +1257,7 @@
</details>]]></template>
<template template_group="widgets" template_name="pagebuilderoembed" template_data="$video, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[<div class='i-margin-inline_auto'>{$video|raw}</div>]]></template>
<template template_group="widgets" template_name="pagebuildertext" template_data="$text, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[<div>{$text|raw}</div>]]></template>
<template template_group="widgets" template_name="pagebuilderupload" template_data="$images, $captions, $urls, $autoPlay, $maxHeight, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[
<template template_group="widgets" template_name="pagebuilderupload" template_data="$images, $captions, $urls, $maxHeight, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[
{{if ! \is_array( $images )}}
<figure class="ipsFigure ipsFigure--contain" {{if $maxHeight}}style="--_height: {$maxHeight}px;"{{endif}}>
{{if isset( $urls[0] )}}
@@ -1287,7 +1278,7 @@
{{else}}
{{$carouselID = 'page-builder-image-widget_' . mt_rand();}}
<ul class='ipsCarousel ipsCarousel--page-builder-image-widget' id='{$carouselID}' {{if $autoPlay}}data-ipsCarousel-slideshow{{endif}} tabindex="0">
<ul class='ipsCarousel ipsCarousel--page-builder-image-widget' id='{$carouselID}' tabindex="0">
{{foreach $images as $id => $image}}
<li>
<figure class='ipsFigure ipsFigure--contain' style="--_backdrop: url('{$image}'); {{if $maxHeight}}--_height: {$maxHeight}px;{{endif}}">
@@ -1702,14 +1693,14 @@
}
/* Hide tab bar if there are zero tabs (ie. if all tabs are closed) */
#elTemplateEditor .ipsTabs:not(:has(li)){
#elTemplateEditor .ipsTabs:not(:has([role="tab"])){
display: none;
}
/* Close tab button */
#elTemplateEditor [data-action="closeTab"] {
font-size: 12px;
color: var(--i-color_soft);
opacity: .5;
display: inline-grid;
width: 1.6em;
height: 1.6em;
@@ -1721,8 +1712,8 @@
}
#elTemplateEditor [data-action="closeTab"]:hover {
color: var(--i-color_hard);
background: color-mix(in srgb, var(--i-color_hard) 30%, transparent);
opacity: 1;
background: color-mix(in srgb, currentColor 10%, transparent);
}
/* Full height code editor */
@@ -1917,7 +1908,7 @@ a.ipsCms_templateOptions {
/* INHERITED VALUES */
a[data-inherited-value]::after {
position: absolute;
margin-top: 2px;
top: 9px;
inset-inline-end: 5px;
}
@@ -1950,18 +1941,21 @@ a[data-inherited-value="original"]::after {
.cTemplateState_custom::before {
content: 'C';
background: #c9c030;
color: #fff;
}
.cTemplateList a[data-inherited-value="inherit"]::after,
.cTemplateState_inherit::before {
content: 'I';
background: #83b256;
color: #fff;
}
.cTemplateList a[data-inherited-value="changed"]::after,
.cTemplateState_changed::before {
content: 'M';
background: #c93054;
color: #fff;
}]]></css>
<css css_location="admin" css_app="cms" css_attributes="" css_path="templates" css_name="view.css">/* ----- */
.ipsTemplate_box {
+2 -1
View File
@@ -597,5 +597,6 @@
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2",
"5000029": "5.0.0 Beta 3",
"5000030": "5.0.0 Beta 4"
"5000030": "5.0.0 Beta 4",
"5000031": "5.0.0 Beta 5"
}
+5 -1
View File
@@ -109,7 +109,11 @@
"default_area": "",
"allow_reuse": true,
"menu_style": "modal",
"embeddable": true
"layouts": "wallpaper",
"embeddable": true,
"padding": false,
"default_layout": "wallpaper",
"searchterms": "carousel,slideshow,autoplay"
},
"Codemirror": {
"class": "\\IPS\\Widget",
@@ -71,7 +71,6 @@ class UpdateHtmlPages extends QueueAbstract
if( $row->type == 'builder' )
{
$row->ipb_wrapper = true;
$row->show_sidebar = true;
}
else
{
@@ -97,7 +96,6 @@ class UpdateHtmlPages extends QueueAbstract
if( $row->wrapper_template === null or $row->wrapper_template == '__none__')
{
$row->ipb_wrapper = true;
$row->show_sidebar = true;
}
}
@@ -1559,7 +1559,6 @@ class databases extends Controller
}
$pageValues['page_folder_id'] = $pageValues['page_folder_id'] ?: 0;
$pageValues['page_name'] = $pageValues['page_name'] ?: $values['database_name'];
$pageValues['page_show_sidebar'] = true;
$pageValues['page_ipb_wrapper'] = true;
if( $currentPage = $current->page )
@@ -1741,7 +1740,7 @@ class databases extends Controller
foreach( Page::formElements( $current?->page ) as $name => $field )
{
if( !in_array( $name, [ 'tab_details', 'tab_content', 'page_content', 'page_ipb_wrapper', 'page_show_sidebar', 'page_wrapper_template', 'page_theme', 'page_template' ] ) )
if( !in_array( $name, [ 'tab_details', 'tab_content', 'page_content', 'page_ipb_wrapper', 'page_wrapper_template', 'page_theme', 'page_template' ] ) )
{
if ( is_array( $field ) )
{
+12 -8
View File
@@ -257,16 +257,20 @@ FILE;
*/
protected function delete() : void
{
/* Database pages cannot be deleted from here */
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) )
/* Check if we are working with a page or a folder */
if( isset( Request::i()->subnode ) and Request::i()->subnode )
{
Output::i()->error( Member::loggedIn()->language()->addToStack( 'content_acp_err_page_db_delete' ), '3T260/1', 403 );
}
/* Database pages cannot be deleted from here */
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) )
{
Output::i()->error( Member::loggedIn()->language()->addToStack( 'content_acp_err_page_db_delete' ), '3T260/1', 403 );
}
if ( isset( Request::i()->id ) )
{
Session::i()->csrfCheck();
Page::deleteCompiled( Request::i()->id );
if ( isset( Request::i()->id ) )
{
Session::i()->csrfCheck();
Page::deleteCompiled( Request::i()->id );
}
}
parent::delete();
@@ -0,0 +1,22 @@
{
"id": 5000031,
"name": "5.0.0 Beta 5",
"steps": {
"queries": true,
"lang": true,
"theme": true,
"themeeditor": false,
"javascript": true,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": true,
"customOptions": false,
"customRoutines": true
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,18 @@
{
"files": {
"added": [],
"edited": [
"cms\/admin\/controllers\/media\/ips.media.main.js",
"cms\/admin\/controllers\/templates\/ips.templates.fileEditor.js",
"cms\/admin\/controllers\/templates\/ips.templates.fileList.js",
"cms\/admin\/controllers\/templates\/ips.templates.main.js",
"cms\/admin\/templates\/ips.templates.templates.js"
],
"removed": []
},
"orders": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,14 @@
{
"normal": {
"added": [],
"edited": [],
"removed": [
"page_show_sidebar"
]
},
"js": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,9 @@
{
"1": {
"method": "dropColumn",
"params": [
"cms_pages",
"page_show_sidebar"
]
}
}
@@ -0,0 +1,25 @@
{
"html": {
"added": [],
"edited": [
"admin\/media\/media",
"front\/submit\/createRecordForm",
"admin\/templates\/editor",
"admin\/templates\/templates",
"front\/widgets\/pagebuilderupload"
],
"removed": []
},
"css": {
"added": [],
"edited": [
"admin\/templates\/templates.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,62 @@
<?php
/**
* @brief 5.0.0 Beta 5 Upgrade Code
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Pages
* @since 12 Nov 2024
*/
namespace IPS\cms\setup\upg_5000031;
use IPS\Db;
use IPS\Image;
use function defined;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 5.0.0 Beta 5 Upgrade Code
*/
class Upgrade
{
/**
* ...
*
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step1() : bool|array
{
$media = iterator_to_array(
Db::i()->select( '*', 'cms_media', [ 'media_is_image=?', 0 ] )
);
$extensions = Image::supportedExtensions();
$toUpdate = [];
foreach( $media as $row )
{
/* We added support for additional image extensions, so flip the flag here */
$ext = mb_substr( $row['media_filename'], mb_strrpos( $row['media_filename'], '.' ) + 1 );
if( in_array( mb_strtolower( $ext ), $extensions ) )
{
$toUpdate[] = $row['media_id'];
}
}
if( count( $toUpdate ) )
{
Db::i()->update( 'cms_media', [ 'media_is_image' => 1 ], Db::i()->in( 'media_id', $toUpdate ) );
}
return TRUE;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}
@@ -0,0 +1,7 @@
{
"added": [],
"edited": [
"pagebuilderupload"
],
"removed": []
}
+1 -10
View File
@@ -683,12 +683,9 @@ class Page extends Model implements Permissions
), NULL, NULL, NULL, 'page_folder_id' );
$return['page_ipb_wrapper'] = new YesNo( 'page_ipb_wrapper', ( $item AND $item->id ) ? $item->ipb_wrapper : 1, TRUE, array(
'togglesOn' => array( 'page_show_sidebar' ),
'togglesOff' => array( 'page_wrapper_template' )
'togglesOff' => array( 'page_wrapper_template' )
), NULL, NULL, NULL, 'page_ipb_wrapper' );
$return['page_show_sidebar'] = new YesNo( 'page_show_sidebar', $item ? $item->show_sidebar : TRUE, FALSE, array(), NULL, NULL, NULL, 'page_show_sidebar' );
$wrapperTemplates = array( '_none_' => Member::loggedIn()->language()->addToStack('cms_page_wrapper_template_none') );
foreach( Templates::getTemplates( Templates::RETURN_PAGE + Templates::RETURN_DATABASE_AND_IN_DEV ) as $id => $obj )
{
@@ -2070,12 +2067,6 @@ class Page extends Model implements Permissions
Output::i()->output = Theme::i()->getTemplate( 'pages' )->globalWrap( $nav, $this->getPageContent(), $this );
/* Can only disable sidebar if HTML page */
if ( ! $this->show_sidebar )
{
Output::i()->sidebar['enabled'] = false;
}
if ( isset( Settings::i()->cms_error_page ) and Settings::i()->cms_error_page and Settings::i()->cms_error_page == $this->id )
{
Output::i()->sidebar['enabled'] = false;
+2 -2
View File
@@ -11,7 +11,7 @@
namespace IPS\cms\widgets;
use ErrorException;
use Exception;
use IPS\Data\Store;
use IPS\Helpers\Form;
use IPS\Http\Url;
@@ -139,7 +139,7 @@ class Codemirror extends Widget
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js( 'front_core.js', 'core' ) );
return $this->output( $themeFunction() );
}
catch( ErrorException $e )
catch( Exception $e )
{
Log::log( $e->getMessage(), 'codeblock' );
return "";
+6
View File
@@ -57,6 +57,12 @@ class Database extends Widget
*/
public bool $soloWidget = true;
/**
* @brief Set to false if this widget should be hidden from the block list
* in the Page Editor
*/
public static bool $showInBlockList = false;
/**
* @brief If a widget should not be dropped into a particular area (e.g. a database widget in the header), list those areas here
*/
+30 -7
View File
@@ -20,9 +20,11 @@ use IPS\Helpers\Form\Stack;
use IPS\Helpers\Form\Upload;
use IPS\Helpers\Form\YesNo;
use IPS\Widget\Builder;
use IPS\Widget\Customizable;
use IPS\Widget\StaticCache;
use function count;
use function defined;
use function str_ends_with;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -33,7 +35,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
/**
* pagebuilderupload Widget
*/
class pagebuilderupload extends StaticCache implements Builder
class pagebuilderupload extends StaticCache implements Builder, Customizable
{
/**
* @brief Widget Key
@@ -86,10 +88,11 @@ class pagebuilderupload extends StaticCache implements Builder
}
$form->add( new Upload( 'pagebuilderupload_upload', $images, FALSE, array( 'multiple' => true, 'storageExtension' => 'core_Attachment', 'allowStockPhotos' => TRUE, 'image' => true ) ) );
$form->add( new YesNo( 'pagebuilderupload_slideshow', ( $this->configuration['pagebuilderupload_slideshow'] ?? FALSE ) ) );
$form->add( new Stack( 'pagebuilderupload_captions', $captions, FALSE, array( 'stackFieldType' => 'Text' ) ) );
$form->add( new Stack( 'pagebuilderupload_urls', $urls, FALSE, array( 'stackFieldType' => 'Url' ) ) );
// $form->add( new YesNo( 'pagebuilderupload_slideshow', ( $this->configuration['pagebuilderupload_slideshow'] ?? FALSE ) ) );
$form->add( new Stack( 'pagebuilderupload_captions', $captions, FALSE, array( 'stackFieldType' => 'Text', 'removeEmptyValues' => false ) ) );
$form->add( new Stack( 'pagebuilderupload_urls', $urls, FALSE, array( 'stackFieldType' => 'Url', 'removeEmptyValues' => false ) ) );
// This is now handled by the page builder
$form->add( new Number( 'pagebuilderupload_height', ( $this->configuration['pagebuilderupload_height'] ?? 300 ), FALSE, array( 'unlimited' => 0 ) ) );
return $form;
}
@@ -147,7 +150,7 @@ class pagebuilderupload extends StaticCache implements Builder
$images = array();
$captions = ( isset( $this->configuration['pagebuilderupload_captions'] ) ) ? $this->configuration['pagebuilderupload_captions'] : array();
$urls = ( isset( $this->configuration['pagebuilderupload_urls'] ) ) ? json_decode( $this->configuration['pagebuilderupload_urls'], TRUE ) : array();
$autoPlay = ( isset( $this->configuration['pagebuilderupload_slideshow'] ) ) ? $this->configuration['pagebuilderupload_slideshow'] : FALSE;
// $autoPlay = ( isset( $this->configuration['pagebuilderupload_slideshow'] ) ) ? $this->configuration['pagebuilderupload_slideshow'] : FALSE;
$maxHeight = ( isset( $this->configuration['pagebuilderupload_height'] ) ) ? $this->configuration['pagebuilderupload_height'] : FALSE;
if ( isset( $this->configuration['pagebuilderupload_upload'] ) )
@@ -157,9 +160,29 @@ class pagebuilderupload extends StaticCache implements Builder
$images[] = (string) File::get( 'core_Attachment', $img )->url;
}
return $this->output( ( count( $images ) === 1 ? $images[0] : $images ), $captions, $urls, $autoPlay, $maxHeight );
return $this->output( ( count( $images ) === 1 ? $images[0] : $images ), $captions, $urls, $maxHeight );
}
return '';
}
/**
* @return string[]
*/
public function getSupportedLayouts() : array
{
$layouts = parent::getSupportedLayouts();
/* Remove support for non-carousels; if we have tabs, there is way too much going on here */
$return = [];
foreach( $layouts as $k => $v )
{
if( str_ends_with( $v, '-carousel' ) )
{
$return[] = $v;
}
}
return $return;
}
}