Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
45782b0
init language files
YatharthVyas Jun 23, 2021
0da15bd
init xml form
YatharthVyas Jun 23, 2021
12d56a0
init plugin php file
YatharthVyas Jun 23, 2021
a6715a8
Merge branch 'feature-article-module' of https://github.com/YatharthV…
YatharthVyas Jun 23, 2021
431cb80
language constant for modules tab
YatharthVyas Jun 23, 2021
3105800
imported modules tab
YatharthVyas Jun 23, 2021
8c36d28
installation sql script
YatharthVyas Jun 24, 2021
27c23bf
add language constants
YatharthVyas Jun 25, 2021
3d8b9c6
show toolbar
YatharthVyas Jun 25, 2021
fdf301a
fetch all modules used in the article
YatharthVyas Jun 25, 2021
307300a
add new tab for imported modules
YatharthVyas Jun 25, 2021
8da56fe
add switcher for toggling the imported modules tab
YatharthVyas Jun 25, 2021
fde75fa
sort sql install script alphabetically
YatharthVyas Jun 29, 2021
822e539
add missing comma
YatharthVyas Jun 29, 2021
66f9691
edit modal script
YatharthVyas Jun 30, 2021
de3b3a9
add modal script to assets
YatharthVyas Jun 30, 2021
abbcee7
edit module modal
YatharthVyas Jun 30, 2021
e7a0cdd
Update administrator/components/com_content/tmpl/article/edit.php
YatharthVyas Jun 30, 2021
6b53d86
Change heading language constant
YatharthVyas Jun 30, 2021
31b3b10
Merge branch 'feature-article-module' of https://github.com/YatharthV…
YatharthVyas Jun 30, 2021
89ab339
js lint
YatharthVyas Jun 30, 2021
fe446f1
introduce apply button param for Saving
YatharthVyas Jul 1, 2021
dd61a88
Display a save button in the modal
YatharthVyas Jul 1, 2021
357da31
add remove id language constant
YatharthVyas Jul 2, 2021
de44fae
rename the js file name in assets
YatharthVyas Jul 2, 2021
ecfc63b
remove old js file
YatharthVyas Jul 2, 2021
c096b57
js script for modal and remove function
YatharthVyas Jul 2, 2021
92eac8b
add column for removing the module from article
YatharthVyas Jul 2, 2021
dcad97f
js lint
YatharthVyas Jul 2, 2021
0b7ad24
js lint
YatharthVyas Jul 2, 2021
45005fe
check imported modules for empty
YatharthVyas Jul 5, 2021
7c214e9
New Module button in select module modal
YatharthVyas Jul 8, 2021
ba7c8ef
correct the link
YatharthVyas Jul 8, 2021
f816ec9
revert newmodule xtd editor plugin files
YatharthVyas Jul 8, 2021
6a539b3
add newline at the end
YatharthVyas Jul 8, 2021
8744b8d
fix remove module js function
YatharthVyas Jul 12, 2021
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
11 changes: 11 additions & 0 deletions administrator/components/com_content/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,17 @@
<option value="1">JSHOW</option>
</field>

<field
name="show_imported_modules"
type="radio"
label="COM_CONTENT_SHOW_IMPORTED_MODULES"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="spacer3"
type="spacer"
Expand Down
12 changes: 12 additions & 0 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,18 @@
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="show_imported_modules"
type="list"
label="COM_CONTENT_SHOW_IMPORTED_MODULES"
useglobal="true"
default=""
validate="options"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>

<fieldset name="basic-limited" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
Expand Down
30 changes: 30 additions & 0 deletions administrator/components/com_content/src/Model/ArticleModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,36 @@ public function getItem($pk = null)
}
}

// Expression to search for(id)
$regexmodid = '/{loadmoduleid\s([1-9][0-9]*)}/i';

// Find all instances of loadmoduleid and store it in $matchesmodid
preg_match_all($regexmodid, $item->articletext, $matchesmodid, PREG_SET_ORDER);
$importedModules = [];

// If no matches, skip this
if ($matchesmodid)
{
foreach ($matchesmodid as $match)
{
$importedModules[] = $match[1];
}

$db = $this->getDbo();
$query = $db->getQuery(true)
->select(
[
$db->quoteName('id'),
$db->quoteName('title'),
$db->quoteName('published'),
]
)
->from($db->quoteName('#__modules'));
$query->where($db->quoteName('id') . 'IN (' . implode(',', $query->bindArray(array_values($importedModules))) . ')');

$item->importedModules = $db->setQuery($query)->loadObjectList();
}

return $item;
}

Expand Down
63 changes: 63 additions & 0 deletions administrator/components/com_content/tmpl/article/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,69 @@
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php // Do not show the publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_imported_modules', 1) == 1 && \count($this->item->importedModules)): ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'modules', Text::_('COM_CONTENT_FIELDSET_MODULES')); ?>
<fieldset id="fieldset-modules" class="options-form">
<legend><?php echo Text::_('COM_CONTENT_FIELDSET_MODULES'); ?></legend>
<table class="table" id="modules_assigned">
<caption class="visually-hidden">
<?php echo Text::_('COM_CONTENT_IMPORTED_MODULES_TABLE_CAPTION'); ?>
</caption>
<thead>
<tr>
<th scope="col" class="w-20">
<?php echo Text::_('COM_CONTENT_HEADING_IMPORTED_MODULE_ID'); ?>
</th>
<th scope="col">
<?php echo Text::_('COM_CONTENT_HEADING_IMPORTED_MODULE_TITLE'); ?>
</th>
<th scope="col">
<?php echo Text::_('JPUBLISHED'); ?>
</th>
<th scope="col">
<?php echo Text::_('COM_CONTENT_HEADING_IMPORTED_MODULE_EDIT'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->item->importedModules as $module) : ?>
<tr id="tr-<?php echo $module->id; ?>" class="<?php echo $no; ?><?php echo $status; ?>row<?php echo $module->id % 2; ?>">
<td id="mod-<?php echo $module->id; ?>">
<?php echo $this->escape($module->id); ?>
</td>
<td id="mod-<?php echo $module->title; ?>">
<?php echo $this->escape($module->title); ?>
</td>
<td id="mod-<?php echo $module->published; ?>">
<?php if ($module->published) : ?>
<span class="badge bg-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php else : ?>
<span class="badge bg-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php endif; ?>
</td>
<td id="status-<?php echo $module->id; ?>">
<button type="button"
data-bs-target="#moduleEditModal"
class="btn btn-link module-edit-link"
title="<?php echo Text::_('COM_CONTENT_EDIT_MODULE'); ?>"
id="title-<?php echo $module->id; ?>"
data-module-id="ad">
<?php echo Text::_('COM_CONTENT_EDIT_MODULE'); ?>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php if ($params->get('show_article_options', 1) == 1) : ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php endif; ?>
Expand Down
7 changes: 7 additions & 0 deletions administrator/language/en-GB/com_content.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ COM_CONTENT_CREATE_ARTICLE_ERROR="When default category is enabled, a category s
COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_DESC="Select the page the user will be redirected to after a successful article submission and after cancel (if not set differently below). The default is to redirect to the home page."
COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_LABEL="Submission/Cancel Redirect"
COM_CONTENT_DASHBOARD_TITLE="Content Dashboard"
COM_CONTENT_EDIT_MODULE="Edit"
COM_CONTENT_EDIT_ARTICLE="Edit Article"
COM_CONTENT_EDIT_CATEGORY="Edit Category"
COM_CONTENT_EDITING_LAYOUT="Editing Layout"
Expand Down Expand Up @@ -93,6 +94,7 @@ COM_CONTENT_FIELDS_ARTICLE_FIELD_ADD_TITLE="Articles: New Field"
COM_CONTENT_FIELDS_ARTICLE_FIELD_EDIT_TITLE="Articles: Edit Field"
COM_CONTENT_FIELDS_ARTICLE_FIELDS_TITLE="Articles: Fields"
COM_CONTENT_FIELDS_TYPE_MODAL_ARTICLE="Article"
COM_CONTENT_FIELDSET_MODULES="Imported Modules"
COM_CONTENT_FIELDSET_PUBLISHING="Publishing"
COM_CONTENT_FIELDSET_RULES="Permissions"
COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links"
Expand All @@ -107,9 +109,13 @@ COM_CONTENT_HEADING_DATE_CREATED="Date Created"
COM_CONTENT_HEADING_DATE_MODIFIED="Date Modified"
COM_CONTENT_HEADING_DATE_PUBLISH_DOWN="Finish Publishing"
COM_CONTENT_HEADING_DATE_PUBLISH_UP="Start Publishing"
COM_CONTENT_HEADING_IMPORTED_MODULE_EDIT="Edit Module"
COM_CONTENT_HEADING_IMPORTED_MODULE_ID="Imported Module ID"
COM_CONTENT_HEADING_IMPORTED_MODULE_TITLE="Title"
COM_CONTENT_ID_LABEL="ID"
COM_CONTENT_IMAGE_FULLTEXT_CLASS_LABEL="Full Text Image Class"
COM_CONTENT_IMAGE_INTRO_CLASS_LABEL="Intro Image Class"
COM_CONTENT_IMPORTED_MODULES_TABLE_CAPTION="Table for Imported Modules"
COM_CONTENT_MODIFIED_ASC="Date Modified ascending"
COM_CONTENT_MODIFIED_DESC="Date Modified descending"
COM_CONTENT_MONTH="Month"
Expand Down Expand Up @@ -164,6 +170,7 @@ COM_CONTENT_SHOW_ASSOCIATIONS_LABEL="Multilingual Associations"
COM_CONTENT_SHOW_CONFIGURE_EDIT_LABEL="Edit Screen Options"
COM_CONTENT_SHOW_IMAGES_URLS_BACK_LABEL="Administrator Images and Links"
COM_CONTENT_SHOW_IMAGES_URLS_FRONT_LABEL="Frontend Images and Links"
COM_CONTENT_SHOW_IMPORTED_MODULES="Show Imported Modules"
COM_CONTENT_SHOW_PERMISSIONS_LABEL="Article Permissions"
COM_CONTENT_SHOW_PUBLISHING_OPTIONS_LABEL="Publishing Options"
COM_CONTENT_SLIDER_EDITOR_CONFIG="Configure Edit Screen"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; Joomla! Project
; (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

PLG_EDITORS-XTD_NEWMODULE="Button - New Module"
PLG_NEW_MODULE_BUTTON_MODULE="New Module"
PLG_NEW_MODULE_XML_DESCRIPTION="Displays a button to insert a new module into an editor area. Displays a popup allowing you to create the new module."
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Joomla! Project
; (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

PLG_EDITORS-XTD_NEWMODULE="Button - New Module"
PLG_NEW_MODULE_XML_DESCRIPTION="Displays a button to insert a module into an editor area. Displays a popup allowing you to choose the module."
1 change: 1 addition & 0 deletions installation/sql/mysql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`,
(0, 'plg_editors-xtd_module', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 6, 0),
(0, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 7, 0),
(0, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 8, 0),
(0, 'plg_editors-xtd_newmodule', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 9 0),
(0, 'plg_editors_codemirror', 'plugin', 'codemirror', 'editors', 0, 1, 1, 0, 1, '', '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}', '', 1, 0),
(0, 'plg_editors_none', 'plugin', 'none', 'editors', 0, 1, 1, 1, 1, '', '', '', 2, 0),
(0, 'plg_editors_tinymce', 'plugin', 'tinymce', 'editors', 0, 1, 1, 0, 1, '', '{"configuration":{"toolbars":{"2":{"toolbar1":["bold","underline","strikethrough","|","undo","redo","|","bullist","numlist","|","pastetext"]},"1":{"menu":["edit","insert","view","format","table","tools"],"toolbar1":["bold","italic","underline","strikethrough","|","alignleft","aligncenter","alignright","alignjustify","|","formatselect","|","bullist","numlist","|","outdent","indent","|","undo","redo","|","link","unlink","anchor","code","|","hr","table","|","subscript","superscript","|","charmap","pastetext","preview"]},"0":{"menu":["edit","insert","view","format","table","tools"],"toolbar1":["bold","italic","underline","strikethrough","|","alignleft","aligncenter","alignright","alignjustify","|","styleselect","|","formatselect","fontselect","fontsizeselect","|","searchreplace","|","bullist","numlist","|","outdent","indent","|","undo","redo","|","link","unlink","anchor","image","|","code","|","forecolor","backcolor","|","fullscreen","|","table","|","subscript","superscript","|","charmap","emoticons","media","hr","ltr","rtl","|","cut","copy","paste","pastetext","|","visualchars","visualblocks","nonbreaking","blockquote","template","|","print","preview","codesample","insertdatetime","removeformat"]}},"setoptions":{"2":{"access":["1"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"0","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""},"1":{"access":["6","2"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"0","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""},"0":{"access":["7","4","8"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"1","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""}}},"sets_amount":3,"html_height":"550","html_width":"750"}', '', 3, 0),
Expand Down
1 change: 1 addition & 0 deletions installation/sql/postgresql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder",
(0, 'plg_editors-xtd_module', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 6, 0),
(0, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 7, 0),
(0, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 8, 0),
(0, 'plg_editors-xtd_newmodule', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, 1, '', '', '', 9 0),
(0, 'plg_editors_codemirror', 'plugin', 'codemirror', 'editors', 0, 1, 1, 0, 1, '', '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}', '', 1, 0),
(0, 'plg_editors_none', 'plugin', 'none', 'editors', 0, 1, 1, 1, 1, '', '', '', 2, 0),
(0, 'plg_editors_tinymce', 'plugin', 'tinymce', 'editors', 0, 1, 1, 0, 1, '', '{"configuration":{"toolbars":{"2":{"toolbar1":["bold","underline","strikethrough","|","undo","redo","|","bullist","numlist","|","pastetext"]},"1":{"menu":["edit","insert","view","format","table","tools"],"toolbar1":["bold","italic","underline","strikethrough","|","alignleft","aligncenter","alignright","alignjustify","|","formatselect","|","bullist","numlist","|","outdent","indent","|","undo","redo","|","link","unlink","anchor","code","|","hr","table","|","subscript","superscript","|","charmap","pastetext","preview"]},"0":{"menu":["edit","insert","view","format","table","tools"],"toolbar1":["bold","italic","underline","strikethrough","|","alignleft","aligncenter","alignright","alignjustify","|","styleselect","|","formatselect","fontselect","fontsizeselect","|","searchreplace","|","bullist","numlist","|","outdent","indent","|","undo","redo","|","link","unlink","anchor","image","|","code","|","forecolor","backcolor","|","fullscreen","|","table","|","subscript","superscript","|","charmap","emoticons","media","hr","ltr","rtl","|","cut","copy","paste","pastetext","|","visualchars","visualblocks","nonbreaking","blockquote","template","|","print","preview","codesample","insertdatetime","removeformat"]}},"setoptions":{"2":{"access":["1"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"0","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""},"1":{"access":["6","2"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"0","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""},"0":{"access":["7","4","8"],"skin":"0","skin_admin":"0","mobile":"0","drag_drop":"1","path":"","entity_encoding":"raw","lang_mode":"1","text_direction":"ltr","content_css":"1","content_css_custom":"","relative_urls":"1","newlines":"0","use_config_textfilters":"0","invalid_elements":"script,applet,iframe","valid_elements":"","extended_elements":"","resizing":"1","resize_horizontal":"1","element_path":"1","wordcount":"1","image_advtab":"1","advlist":"1","autosave":"1","contextmenu":"1","custom_plugin":"","custom_button":""}}},"sets_amount":3,"html_height":"550","html_width":"750"}', '', 3, 0),
Expand Down
76 changes: 76 additions & 0 deletions plugins/editors-xtd/newmodule/newmodule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
/**
* @package Joomla.Plugin
* @subpackage Editors-xtd.module
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Session\Session;

/**
* Editor Module button
*
* @since __DEPLOY_VERSION__
*/
class PlgButtonNewModule extends CMSPlugin
{
/**
* Load the language file on instantiation.
*
* @var boolean
* @since __DEPLOY_VERSION__
*/
protected $autoloadLanguage = true;

/**
* Display the button
*
* @param string $name The name of the button to add
*
* @return CMSObject The button options as JObject
*
* @since __DEPLOY_VERSION__
*/
public function onDisplay($name)
{
/*
* Use the built-in element view to select the module.
* Currently uses blank class.
*/
$user = Factory::getUser();

if ($user->authorise('core.create', 'com_modules')
|| $user->authorise('core.edit', 'com_modules')
|| $user->authorise('core.edit.own', 'com_modules'))
{
$link = 'index.php?option=com_modules&amp;view=select&amp;layout=modal&amp;editor='
. $name . '&amp;' . Session::getFormToken() . '=1';
$button = new CMSObject;
$button->modal = true;
$button->link = $link;
$button->text = Text::_('PLG_NEW_MODULE_BUTTON_MODULE');
$button->name = $this->_type . '_' . $this->_name;
$button->icon = 'cube';
$button->iconSVG = '<svg viewBox="0 0 512 512" width="24" height="24"><path d="M239.1 6.3l-208 78c-18.7 7-31.1 '
. '25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 '
. '26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 '
. '78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"></path></svg>';
$button->options = [
'height' => '300px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
];

return $button;
}
}
}
19 changes: 19 additions & 0 deletions plugins/editors-xtd/newmodule/newmodule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" group="editors-xtd" method="upgrade">
<name>plg_editors-xtd_newmodule</name>
<author>Joomla! Project</author>
<creationDate>June 2021</creationDate>
<copyright>(C) 2021 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>__DEPLOY_VERSION__</version>
<description>PLG_NEW_MODULE_XML_DESCRIPTION</description>
<files>
<filename plugin="newmodule">newmodule.php</filename>
</files>
<languages>
<language tag="en-GB">en-GB.plg_editors-xtd_newmodule.ini</language>
<language tag="en-GB">en-GB.plg_editors-xtd_newmodule.sys.ini</language>
</languages>
</extension>