Skip to content

Commit

Permalink
Global tag names can now include numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed Nov 20, 2024
1 parent 783b586 commit 26fa0c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.6.1] 2024-10-11
## [2.6.1] 2024-11-20
### Update
- Fix-311: Global tags can now include numbers in their name.
- Fix-308: Fixed compatibility issue with PHP 8.3.

## [2.6.0] 2024-10-07
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Also, see Courses section below.

### Content

* {global_...} : Use your own custom FilterCodes tags in the filter's settings. These are sometimes referred to as global blocks. An example of this might be if you wanted to define a standardized copyright or other text, email address, website URL, phone number, name, link, support information and more. Define and centrally manage up to 50 global block tags.
* {global_...} : Use your own custom FilterCodes tags in the filter's settings. These are sometimes referred to as global blocks. An example of this might be if you wanted to define a standardized copyright or other text, form, email address, website URL, phone number, name, link, support information and more. Define and centrally manage up to 50 global block tags.
* {note}content{/note} : Enables you to include a note which will not be displayed.
* {help}content{/help} : Enables you to create popup help icons just like Moodle does.
* {info}content{/info} : Enables you to create popup help icons just like the popup Help icons but with an "i" information icon.
Expand Down Expand Up @@ -461,9 +461,9 @@ The {langx fr-CA}{/langx} filter will convert this into the following HTML

You can define your own global tags, sometimes also called global blocks. This can only be configured by Moodle Administrators by going to **Site Administration** > **Plugins** > **Filters** > **FilterCodes**.

You can create up to 50 custom global tags by specifying the tag name. The tag name will automatically be prefixed by global. For example, if you define a tag called *copyright*, it will create a FilterCodes tag {global_*copyright*}.
You can create up to 50 custom global tags by specifying the tag name. The tag name will automatically be prefixed by global_. For example, if you define a tag called *copyright*, it will create a FilterCodes tag {global_*copyright*}.

The content which you can insert is only limited by your imagination. You can include plain text content, such as one or more words, HTML source code or even a JavaScript snippet (wrap in a script tag). You can also enter almost any content using the WYSIWYG Atto editor by checking the "Pretty HTML format" checkbox. This allows you to create formatted content, uploaded images and more. Note: It does not support PHP code.
The content which you can insert is only limited by your imagination. You can include plain text content, such as one or more words, HTML source code or even a JavaScript snippet (wrap in a script tag). You can also enter almost any content using the WYSIWYG Atto or TinyMCE editor by checking the "Pretty HTML format" checkbox. This allows you to create formatted content, uploaded images and more. Note: It does not support PHP code.

Let's say you want to include a support email address in some of your courses. You could define a global tag called "global_email" and set it to "[email protected]". Then, wherever you want that email address to appear on your site, you just need to add the tag {global_email}. That way, when you decide to change the email address to "[email protected]", you need just change it here in the global custom tag settings.

Expand Down Expand Up @@ -1535,7 +1535,7 @@ Michael Milette - Author and Lead Developer

Big thank you to the following contributors. (Please let me know if I forgot to include you in the list):

* golenkovm (Micha Golenkov): FIx global USER change during text filtering (2024).
* golenkovm (Micha Golenkov): Fix global USER change during text filtering (2024).
* 28Smiles (Leon Camus): Bug fix for {qrcode} and {urlencode} tags (2024).
* 28Smiles (Leon Camus): New {ifingouping} tag (2024).
* 28Smiles (Leon Camus): New {ifnotingrouping} tag (2024).
Expand Down
2 changes: 1 addition & 1 deletion settings/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$tagtitle . get_config($name, 'globalname' . $i),
$tagdescription,
$default,
PARAM_ALPHA
PARAM_ALPHANUM
);
$settings->add($setting);

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024100701; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2024100702; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2014051200; // Requires Moodle version 2.7 or later.
$plugin->component = 'filter_filtercodes'; // Full name of the plugin (used for diagnostics).
$plugin->release = '2.6.1';
Expand Down

0 comments on commit 26fa0c2

Please sign in to comment.