PHPackages                             cu-boulder/ucb\_site\_configuration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cu-boulder/ucb\_site\_configuration

ActiveDrupal-custom-module[Utility &amp; Helpers](/categories/utility)

cu-boulder/ucb\_site\_configuration
===================================

Allows CU Boulder site administrators to configure site-specific settings.

20231212(2y ago)188.3k[1 issues](https://github.com/CuBoulder/ucb_site_configuration/issues)GPL-2.0-or-laterPHPCI passing

Since Aug 1Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/CuBoulder/ucb_site_configuration)[ Packagist](https://packagist.org/packages/cu-boulder/ucb_site_configuration)[ RSS](/packages/cu-boulder-ucb-site-configuration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (8)Used By (0)

CU Boulder Site Configuration
=============================

[](#cu-boulder-site-configuration)

**IMPORTANT:** CU Boulder Site Configuration is considered a companion module to [CU Boulder Base Theme](https://github.com/CuBoulder/tiamat-theme). The two are intended to be installed together and must be updated together when changes are made to theme settings.

---

Functionality
-------------

[](#functionality)

CU Boulder Site Configuration is a module compatible with Drupal 9+ that allows CU Boulder-provided site-wide settings and information to be modified by users with the approprate permissions. The primary functionality provided by the module is grouped into three sections, and a matching three-item submenu is placed in the default Drupal configuration menu.

### Appearance

[](#appearance)

Path: `/admin/config/cu-boulder/appearance`

User permission: `edit ucb site appearance`

The "Appearance" administration form exposes supported theme settings to users with the permission above. It is separate from the default Drupal theme settings form of CU Boulder Base Theme and requires a different permission to access, however both forms are built using `SiteConfiguration::buildThemeSettingsForm`.

Theme settings to expose on the "Appearance" administration form are defined in `/config/install/ucb_site_configuration.configuration.yml`. `SiteConfiguration::buildThemeSettingsForm` should output a form with fields for all CU Boulder Base Theme settings, including any not exposed on the "Appearance" administration form.

### Contact info

[](#contact-info)

Path: `/admin/config/cu-boulder/contact-info`

User permission: `edit ucb site contact info`

Site contact information is editable in the "Contact info" administration form and provided as a Site Contact Info block intended for the footer region (the [install profile](https://github.com/CuBoulder/tiamat-profile) handles block configuration and region placement at install time). The block provides information about a given site including:

- Address
- Email
- Fax
- Phone

### Third-party services

[](#third-party-services)

Path: `/admin/config/cu-boulder/services`

User permission: `administer ucb external services`

Users with the permission above may choose to add selected client-side third-party services (JavaScript) to their site in the "Third-party services" administration page. Supported services are:

- [Mainstay](https://mainstay.com) chat widget
- [LiveChat](https://www.livechat.com) chat widget
- [StatusPage](https://www.atlassian.com/software/statuspage) status widget

These services can be configured and added to pages as desired, with options for specific pages or all pages on the site. Additionally, they can be configured to appear as options when creating or editing content, enabling them to be added or removed by content authors who don't have permission to `administer ucb external services`.

Some required configuration for these services isn't provided by default, and the responsibility for ensuring they are configured correctly falls to the site administrator.

---

Maintenance
-----------

[](#maintenance)

CU Boulder Site Configuration adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), or the familiar major.minor.patch.

### Configuration updates

[](#configuration-updates)

For simplicity, most of the module's static configuration can be found in [/config/install/ucb\_site\_configuration.configuration.yml](/config/install/ucb_site_configuration.configuration.yml), while [/config/install/ucb\_site\_configuration.settings.yml](/config/install/ucb_site_configuration.settings.yml) is intended to contain defaults for user-modifiable settings. These files are only read at install time, and updates must be possible *without* reinsitalling the module as this will cause data loss on existing sites. [Update hooks](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_update_N/8.2.x) can be used to remedy the issue.

Below is an example workflow for adding a theme setting to change the header text size with options for `small`, `medium`, or `large`, defaulting to `medium`, and exposing via the "Appearance" administration form, for both new and existing sites. It doesn't include additional steps in CU Boulder Base Theme such as modifying the template to apply the change.

- **Step 1:** Increment the minor version number of CU Boulder Base Theme. In CU Boulder Base Theme, add the following line to `/config/install/boulderD9_base.settings.yml`:

    ```
    ucb_header_text_size: 'medium'
    ```
- **Step 2:** In CU Boulder Site Configration, add the form field to edit the setting in `SiteConfiguration::buildThemeSettingsForm`. Your code will look something like this:

    ```
    $form['ucb_header_text_size'] = [
    	'#type'           => 'select',
    	'#title'          => $this->t('Site header text size'),
    	'#default_value'  => theme_get_setting('ucb_header_text_size', $themeName) ?? 'medium',
    	'#options'        => [
    		'small'  => $this->t('Small'),
    		'medium' => $this->t('Medium'),
    		'large'  => $this->t('Large')
    	],
    	'#description'    => $this->t('Select the text size for the header at the top of the page.')
    ];
    ```
- **Step 3:** Increment the minor version number of CU Boulder Site Configuration. In CU Boulder Site Configuration, add the following line to `/config/install/ucb_site_configuration.configuration.yml` under `editable_theme_settings`:

    ```
     - ucb_header_text_size
    ```
- **Step 4:** In CU Boulder Site Configration, create an update hook in `ucb_site_configuration.install` to run when updating existing sites. Your code will look something like this:

    ```
    /**
     * Adds theme setting for header text size.
     */
    function ucb_site_configuration_update_95xx() {
    	// Ensures the default value of `medium` is set for the theme setting
    	\Drupal::configFactory()->getEditable(\Drupal::service('ucb_site_configuration')->getThemeName() . '.settings')->set('ucb_header_text_size', 'medium')->save();
    	// Exposes the theme setting on the "Appearance" adminstration form by updating the module configuration
    	$config = \Drupal::configFactory()->getEditable('ucb_site_configuration.configuration');
    	$editableThemeSettings = $config->get('editable_theme_settings');
    	$editableThemeSettings[] = 'ucb_header_text_size';
    	$config->set('editable_theme_settings', $editableThemeSettings)->save();
    }
    ```
- **Step 5:** Release and deploy the new versions of CU Boulder Base Theme and CU Boulder Site Configration together. After clearing the cache the new theme setting should now be present.

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Total

4

Last Release

879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b717634bb237615f360e13a5b1d2efc6f40cb17f77568f8a6401aa978921b4e?d=identicon)[OSRWebDeploy](/maintainers/OSRWebDeploy)

---

Top Contributors

[![timurtripp](https://avatars.githubusercontent.com/u/22628823?v=4)](https://github.com/timurtripp "timurtripp (121 commits)")[![jcsparks](https://avatars.githubusercontent.com/u/12704433?v=4)](https://github.com/jcsparks "jcsparks (55 commits)")[![patrickbrown-io](https://avatars.githubusercontent.com/u/85851903?v=4)](https://github.com/patrickbrown-io "patrickbrown-io (22 commits)")[![jnicholCU](https://avatars.githubusercontent.com/u/94021017?v=4)](https://github.com/jnicholCU "jnicholCU (13 commits)")[![web-flow](https://avatars.githubusercontent.com/u/19864447?v=4)](https://github.com/web-flow "web-flow (2 commits)")[![AlanBCole](https://avatars.githubusercontent.com/u/23508839?v=4)](https://github.com/AlanBCole "AlanBCole (2 commits)")[![tirazel](https://avatars.githubusercontent.com/u/12451503?v=4)](https://github.com/tirazel "tirazel (1 commits)")[![jacob-korf](https://avatars.githubusercontent.com/u/56124082?v=4)](https://github.com/jacob-korf "jacob-korf (1 commits)")

### Embed Badge

![Health badge](/badges/cu-boulder-ucb-site-configuration/health.svg)

```
[![Health](https://phpackages.com/badges/cu-boulder-ucb-site-configuration/health.svg)](https://phpackages.com/packages/cu-boulder-ucb-site-configuration)
```

###  Alternatives

[cloudxns/cloud-xns-api-sdk-php

CloudXNS SDK FILES

2283.2k](/packages/cloudxns-cloud-xns-api-sdk-php)[omnilight/yii2-sypexgeo

Yii2 extension for Sypex Geo API (http://sypexgeo.net)

17102.0k](/packages/omnilight-yii2-sypexgeo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
