KJ7RRV

PBARC

I gave this speech at the Pelican Bay Amateur Radio Club meeting on February 23, 2024. The motion passed, and at the next meeting, we voted to approve a new version of the rule.

When we recite the Pledge of Allegiance, we promise loyalty to our flag and to our republic. This does not mean that we always agree with our government's decisions. Rather, it means we support our nation and its values – the values represented by the colors of our flag.

The flag’s blue field symbolizes vigilance and justice. It represents the ideal, named in the Pledge of Allegiance, of “liberty and justice for all.”

The white stars and stripes symbolize innocence and pure motives. While America is not perfect, we seek to do what is right and work toward a better nation.

Finally, the flag’s red stripes represent bravery and valor. They remind us of the sacrifices made by the millions of Americans who have served in our armed forces. In particular, they honor the nearly seven hundred thousand men and women who have given their lives for this country. Do we want to stop honoring their sacrifice?

When we pledge allegiance to our republic, we are not endorsing our government, which changes from year to year. Rather, we are expressing support for our form of government: a constitutional democratic republic that has succeeded in reflecting the will of the people for nearly two hundred and fifty years without falling to mob rule.

After the Constitutional Convention, a woman asked Benjamin Franklin what form of government had been established. He told her, “A republic, if you can keep it.” To keep our republic requires that we show respect for our flag and our country. To stop beginning our meetings with the Pledge would work against this goal.

Therefore, I move that we continue and formalize our long-standing custom by adopting a standing rule that all meetings shall begin with the Pledge of Allegiance.

Pledge of Allegiance speech and motion by Samuel Sloniker is licensed under CC BY-SA 4.0

#PBARC #HamRadio #USA

I wrote a #MediaWiki template that allows for the creation of templates that change based on user configuration.

Edit: This will invalidate MediaWiki cache on pages that use it, increasing server CPU usage and page load times. Use this template sparingly.

Dependencies/Prerequisites

The GetUserName and ParserFunctions extensions are required. Also, you must create namespaces called DefaultConfig and UserConfig.

define("NS_DEFAULTCONFIG", 3000);
define("NS_DEFAULTCONFIG_TALK", 3001);
define("NS_USERCONFIG", 3002);
define("NS_USERCONFIG_TALK", 3003);
$wgExtraNamespaces[NS_USERCONFIG] = "UserConfig";
$wgExtraNamespaces[NS_USERCONFIG_TALK] = "UserConfig_talk";
$wgExtraNamespaces[NS_DEFAULTCONFIG] = "DefaultConfig";
$wgExtraNamespaces[NS_DEFAULTCONFIG_TALK] = "DefaultConfig_talk";
$wgNamespaceProtection[NS_DEFAULTCONFIG] = array("editdefaultconfig");
$wgGroupPermissions['sysop']['editdefaultconfig'] = true;
$wgCapitalLinkOverrides[NS_DEFAULTCONFIG] = false;
$wgCapitalLinkOverrides[NS_DEFAULTCONFIG_TALK] = false;
$wgNamespacesWithSubpages[NS_USERCONFIG] = true;
wfLoadExtension('GetUserName');
wfLoadExtension('ParserFunctions');

It is recommended to only allow administrators or other trusted users to edit the DefaultConfig namespace. Unfortunately, I am not aware of any way to prevent users from editing other users' UserConfig pages; this means that users can change the configuration settings of others.

Template

Put this in Template:Config:

{{#ifexist:DefaultConfig:{{{1}}}|{{#ifexist:UserConfig:{{#USERNAME:}}/{{{1}}}|{{UserConfig:{{#USERNAME:}}/{{{1}}}}}|{{ DefaultConfig:{{{1}}}}}}}|'''ERROR''': No such configuration option exists. Please {{#ifexist:UserConfig:{{#USERNAME:}}/isadmin|create|ask an administrator to create}} [[DefaultConfig:{{{1}}}]].}}

If you wish, you can create a UserConfig:[username]/isadmin page for all admin users. This has no effect other than changing the error message, so it is not important. Unlike other configuration settings, the content of this page does not matter; it only has to exist.

Usage

Simply use {{config|[option name]}} to get a configuration option. You must have a DefaultConfig:[option name] page. By default, {{config}} will return its content. However, if a user has a UserConfig:[user name]/[option name] page, its content will be returned instead.

Example

On the PBARC Web site, we use this for several things, including a {{time}} template. This takes time values in the format {{time|18|45}} and allows users to choose whether to see times as “6:45 PM” (12-hour time) or “18:45” (24-hour/military time).

Here is the code for Template:Time:

{{#ifeq: {{config|miltime}}|true|{{{1}}}:{{{2}}}|{{#ifexpr: ({{{1}}} = 12) and ({{{2}}} = 00)|12:00 noon|{{#ifexpr: ({{{1}}} = 00) and ({{{2}}} = 00)|12:00 midnight| {{#ifeq: {{#expr: {{{1}}} mod 12}} | 0 | 12 | {{#expr: {{{1}}} mod 12}}}}:{{{2}}} {{#ifexpr: {{{1}}} < 12|AM|PM}}}}}}}}

It will check the miltime configuration value and, if it is true, use 24-hour time; otherwise, it will use 12-hour time. On the PBARC site, it is set to false by default, but it could also be set to true.

License

This post, including all code, is released into the public domain under Creative Commons Zero. Feel free to use it for any purpose without asking permission or giving attribution.

#PBARC #FOSS #Programming