PHPackages                             ycloudyusa/yusaopeny\_activity\_finder - 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. ycloudyusa/yusaopeny\_activity\_finder

ActiveDrupal-module

ycloudyusa/yusaopeny\_activity\_finder
======================================

Y USA Open Y Activity Finder

6.2.1(2mo ago)160.4k↓29.5%17[6 PRs](https://github.com/YCloudYUSA/yusaopeny_activity_finder/pulls)3GPL-2.0+Vue

Since Nov 10Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/YCloudYUSA/yusaopeny_activity_finder)[ Packagist](https://packagist.org/packages/ycloudyusa/yusaopeny_activity_finder)[ RSS](/packages/ycloudyusa-yusaopeny-activity-finder/feed)WikiDiscussions 6.x Synced 1mo ago

READMEChangelog (10)DependenciesVersions (104)Used By (3)

Open Y Activity Finder
======================

[](#open-y-activity-finder)

Requirements
------------

[](#requirements)

This module requires the following modules:

- [openy\_map](https://github.com/open-y-subprojects/openy_map) (For pulling the list of location-related content types.)

This module also requires one of the following to store data:

- A Solr server (preferably a server or index per-environment).
- A subscription with access to the [Daxko API](https://api.daxko.com/v3/docs).

Recommended modules
-------------------

[](#recommended-modules)

Activity Finder is most often used with a [syncer](https://ds-docs.y.org/docs/development/program-event-framework/#syncers) to pull data from an external source.

Installation
------------

[](#installation)

Activity Finder version 4 is the current major version. Prior to `9.2.10.0`, the distribution required `^3.1 || ^4.0`, allowing you to choose which version you want to use depending on the project requirements.

### Deprecations

[](#deprecations)

Outdated implementations are not removed immediately, allowing you to update your projects and migrate to new components without breaking your site. They are marked with `[deprecated]` notices in the next version and are planned to be removed in the future releases.

### New Projects

[](#new-projects)

Install as you would normally install a contributed Drupal module. For further information, see [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).

New projects should enable:

- Activity Finder (`openy_activity_finder`)

then choose one or both of the front ends:

- LB (Layout Builder) Activity Finder (`lb_activity_finder`)
- Open Y Paragraph Activity Finder (`openy_prgf_activity_finder_4`)

and finally enable one of these data stores:

- Search API Solr (`search_api_solr`)
- Daxko API v2 integration (`openy_daxko2`)

### Existing Projects

[](#existing-projects)

You have a choice of either staying on the same version you use or to update to the next version. It depends on your project requirements and customizations. We recommend updating to the latest release if you have resources for it.

### Update from version 3.x to version 4.x

[](#update-from-version-3x-to-version-4x)

Activity Finder is a complex functionality, it connects together many different pieces and might require additional steps to make it working. The list of actions below outlines the major steps to get Activity Finder updated to version 4.

- Update the codebase using the composer command: `composer require ycloudyusa/yusaopeny_activity_finder:"^4.0"`
- Run database updates `drush -y updb`.
    - Verify there were no errors and updates went fine.
- Install the new "Open Y Paragraph Activity Finder" (`openy_prgf_activity_finder_4`): `drush en openy_prgf_activity_finder_4`
- Create or update a existing Landing Page with Activity Finder.
- Add Activity Finder paragraph (replace the deprecated paragraph), configure it and save the page.
    - Verify the page and Activity Finder functionality is working fine
- The previous version of Activity Finder used 2 landing pages with 2 paragraph types - one for wizard and another one for results. Find and remove these pages.
- Uninstall "OpenY Paragraph Activity Finder" (`openy_prgf_activity_finder`).
- Uninstall "OpenY Paragraph Activity Finder Search" (`openy_paragraph_activity_finder_search`).

Configuration
-------------

[](#configuration)

### Set up Solr

[](#set-up-solr)

In order to install Solr - [check the documentation on Drupal.org](https://www.drupal.org/node/2502203).

After enabling the above modules you should visit `/admin/config/search/search-api` and obtain config.zip from preconfigured by Open Y Solr Server setup [![image](https://user-images.githubusercontent.com/563412/105169707-90ba2280-5b24-11eb-9c0c-fab09b336723.png)](https://user-images.githubusercontent.com/563412/105169707-90ba2280-5b24-11eb-9c0c-fab09b336723.png)

This configuration should be installed on your Solr server as an independent core. it should be extracted to the conf directory of a solr core

[![image](https://user-images.githubusercontent.com/563412/105169758-ad565a80-5b24-11eb-81c3-b29c8b513a7a.png)](https://user-images.githubusercontent.com/563412/105169758-ad565a80-5b24-11eb-81c3-b29c8b513a7a.png)

Once it is done - ensure the name of your core from core.properties file added to Solr Server config in Open Y [![image](https://user-images.githubusercontent.com/563412/105169816-c0692a80-5b24-11eb-9254-6abc32a0583d.png)](https://user-images.githubusercontent.com/563412/105169816-c0692a80-5b24-11eb-9254-6abc32a0583d.png)

Solr server configuration could be found in Dropdown at /admin/config/search/search-api [![image](https://user-images.githubusercontent.com/563412/105169887-d4149100-5b24-11eb-8a7c-d5186b8005bb.png)](https://user-images.githubusercontent.com/563412/105169887-d4149100-5b24-11eb-8a7c-d5186b8005bb.png)[![image](https://user-images.githubusercontent.com/563412/105169954-eb537e80-5b24-11eb-8e21-3df8f01a8c14.png)](https://user-images.githubusercontent.com/563412/105169954-eb537e80-5b24-11eb-8e21-3df8f01a8c14.png)

If you prefer drush configuration you may use commands below, just replace SOLR\_CORE\_IS\_HERE with real core name

```
drush cset -y search_api.server.solr backend_config.connector_config.host 127.0.0.1 -y
drush cset -y search_api.server.solr backend_config.connector_config.core ${SOLR_CORE_IS_HERE} -y
drush search-api:reset-tracker
drush search-api:index
```

Once this is done you should see Solr Server as Index as Enabled on a `/admin/config/search/search-api`

If you installed Open Y with Demo content now it is time to create a Landing Page with the Activity Finder v4 component on it.

In Open Y we have a specially created module which can this for you

Enable openy\_prgf\_af4\_demo by drush command

```
drush en openy_prgf_af4_demo
```

and you’d get /activity-finder-v4 Landing Page created automatically which should look like [![image](https://user-images.githubusercontent.com/563412/105170014-04f4c600-5b25-11eb-8a4a-b2952d86e7d3.png)](https://user-images.githubusercontent.com/563412/105170014-04f4c600-5b25-11eb-8a4a-b2952d86e7d3.png)

when you visited it. By visiting /activity-finder-v4?step=results or clicking on suggested buttons you should see results, activities with filters and all other functionality, shipped with Activity Finder v4 For the Demo content from OpenY, it should look like [![image](https://user-images.githubusercontent.com/563412/105170087-1dfd7700-5b25-11eb-9e57-5db48e41af5e.png)](https://user-images.githubusercontent.com/563412/105170087-1dfd7700-5b25-11eb-9e57-5db48e41af5e.png)

### Set Trusted Redirect Host patterns

[](#set-trusted-redirect-host-patterns)

Activity Finder has a feature to track redirects to 3rd party systems. In order to control the URLs to redirect to you should use the trusted host patterns. This feature works similar to Drupal core trusted\_host\_patterns setting.

Example - add this section to the settings.php:

```
// Trusted hosts to redirect to for Activity Finder.
$settings['activity_finder_trusted_redirect_host_patterns'] = [
  '^apm\.activecommunities\.com$',
];

```

It is also recommended to disallow these paths in robots.txt:

```
# Activity Finder redirects
Disallow: /af/register-redirect/
Disallow: /index.php/af/register-redirect/

```

### Add the Activity Finder block

[](#add-the-activity-finder-block)

See [the full documentation on Activity Finder](https://ds-docs.y.org/docs/user-documentation/schedules/activity-finder/) for information on how to add the block to your page and block options.

Troubleshooting &amp; FAQ
-------------------------

[](#troubleshooting--faq)

To demo Activity Finder, see these sandboxes:

- Activity Finder v4
    - Carnation
    - Lily
    - Rose
- Activity Finder v3
    - Carnation
    - Lily
    - Rose

### Limitations with using Daxko backend

[](#limitations-with-using-daxko-backend)

When using the Daxko backend. Developers should be aware of these limitations:

- We can't use home branch functionality on start screen.
- We have to use Legacy mode.
- We can't display count of result for each age on the age's wizard step.
- We can't display count of available spots for each activity, before user click by activity details.
- Limited pager on results page. We can display only previous and next page link and can't display count of pages.

### How to override processResults in Activity Finder

[](#how-to-override-processresults-in-activity-finder)

See `openy_activity_finder.api.php`

```
/**
 * Implements hook_activity_finder_program_process_results_alter().
 */
function custom_module_activity_finder_program_process_results_alter(&$data, NodeInterface $entity) {
  // Get formatted session data from some custom service.
  $formatted_session = \Drupal::service('ymca_class_page.data_provider')
    ->formatSessions([$entity], FALSE);
  $formatted_session = reset($formatted_session);

  // Fix pricing according to YMCA price customization.
  $data['price'] = '';
  if (!empty($formatted_session['prices'])) {
    foreach ($formatted_session['prices'] as $price) {
      $data['price'] .= implode(' ', $price) . '';
    }
  }

  // Fix availability and registration according to YMCA customization.
  $messages = [
    'begun' => t('This class has begun.'),
    'will_open' => t('Registration for this class opens shortly. Please check back.'),
    'inperson' => t('Online registration is closed. Visit a YMCA branch to register.'),
    'included_in_membership' => t('Included in Membership'),
  ];

  if (isset($messages[$formatted_session['reg_state']])) {
    $data['availability_note'] = $messages[$formatted_session['reg_state']];
  }
}
```

### How to add external functionality to analytics event

[](#how-to-add-external-functionality-to-analytics-event)

See `openy_af4_vue_app/main.js`

```
// Listen to a custom event to pass events in Google Analytics.
document.addEventListener('openy_activity_finder_event', (e) => {
  const { action, label, value, category } = e.detail

  if (window.gtag) {
    window.gtag('event', action, {
      event_category: category,
      event_label: label,
      value: value
    })
  } else if (window.ga) {
    window.ga('send', 'event', category, action, label, value)
  }
})
```

#### Example of custom event

[](#example-of-custom-event)

```
document.addEventListener('openy_activity_finder_event', (e) => {
  const { action, label, value, category } = e.detail // Properties you can use for analitics.
  ...
  { your_functionality }
  ...
})
```

### Add custom component in between of results

[](#add-custom-component-in-between-of-results)

it allows flexibility in terms of results rendering for the developer:

```

```

can be changed to this:

```

```

where YGBWAds is custom component to render custom content in between the results. See [ymcatwincities#148](https://github.com/ymcatwincities/openy_activity_finder/pull/148)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community35

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~22 days

Recently: every ~15 days

Total

87

Last Release

75d ago

Major Versions

3.x-dev → 4.0.02021-02-08

4.6.1 → 5.0.02024-05-23

4.6.2 → 5.0.12024-06-04

4.x-dev → 5.0.22024-06-07

5.x-dev → 6.0.02025-11-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/dbb2bef886bbfabeb180d0a630f4e24b02314277a3ad7aea89f520a2bf2d4f9d?d=identicon)[sanchiz](/maintainers/sanchiz)

![](https://www.gravatar.com/avatar/bf41cdf9f0975a3cc5997aaaff41046eac88c85c7dbcd8410b8b09e35f55c11d?d=identicon)[danylevskyi](/maintainers/danylevskyi)

![](https://www.gravatar.com/avatar/1388b312dca2d4c24fb3474c71a6729b13b255860ff0188b0286013bc703bf5a?d=identicon)[podarok](/maintainers/podarok)

![](https://www.gravatar.com/avatar/6d5c1bf40e232e1ad5826eafb2f06813b331e50d1fd6c0af1f84206cd98d946f?d=identicon)[ymcacodeshare](/maintainers/ymcacodeshare)

---

Top Contributors

[![podarok](https://avatars.githubusercontent.com/u/563412?v=4)](https://github.com/podarok "podarok (312 commits)")[![duozersk](https://avatars.githubusercontent.com/u/2128648?v=4)](https://github.com/duozersk "duozersk (77 commits)")[![jediandrey](https://avatars.githubusercontent.com/u/39241474?v=4)](https://github.com/jediandrey "jediandrey (75 commits)")[![froboy](https://avatars.githubusercontent.com/u/238201?v=4)](https://github.com/froboy "froboy (66 commits)")[![snyk-bot](https://avatars.githubusercontent.com/u/19733683?v=4)](https://github.com/snyk-bot "snyk-bot (60 commits)")[![shuklina](https://avatars.githubusercontent.com/u/22738130?v=4)](https://github.com/shuklina "shuklina (44 commits)")[![svicervlad](https://avatars.githubusercontent.com/u/26228931?v=4)](https://github.com/svicervlad "svicervlad (44 commits)")[![ygerasimov](https://avatars.githubusercontent.com/u/294265?v=4)](https://github.com/ygerasimov "ygerasimov (38 commits)")[![atiupa](https://avatars.githubusercontent.com/u/8291614?v=4)](https://github.com/atiupa "atiupa (33 commits)")[![manachynskyi](https://avatars.githubusercontent.com/u/4816431?v=4)](https://github.com/manachynskyi "manachynskyi (24 commits)")[![aaronjchristian](https://avatars.githubusercontent.com/u/16310921?v=4)](https://github.com/aaronjchristian "aaronjchristian (20 commits)")[![anprok](https://avatars.githubusercontent.com/u/16559938?v=4)](https://github.com/anprok "anprok (20 commits)")[![aleevas](https://avatars.githubusercontent.com/u/744406?v=4)](https://github.com/aleevas "aleevas (16 commits)")[![hamrant](https://avatars.githubusercontent.com/u/13733670?v=4)](https://github.com/hamrant "hamrant (16 commits)")[![Sardis93](https://avatars.githubusercontent.com/u/15172796?v=4)](https://github.com/Sardis93 "Sardis93 (12 commits)")[![anpolimus](https://avatars.githubusercontent.com/u/3023950?v=4)](https://github.com/anpolimus "anpolimus (9 commits)")[![dchubar-fj](https://avatars.githubusercontent.com/u/58946680?v=4)](https://github.com/dchubar-fj "dchubar-fj (8 commits)")[![david-storm](https://avatars.githubusercontent.com/u/53839475?v=4)](https://github.com/david-storm "david-storm (5 commits)")[![AndreyMaximov](https://avatars.githubusercontent.com/u/5453109?v=4)](https://github.com/AndreyMaximov "AndreyMaximov (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

openy

### Embed Badge

![Health badge](/badges/ycloudyusa-yusaopeny-activity-finder/health.svg)

```
[![Health](https://phpackages.com/badges/ycloudyusa-yusaopeny-activity-finder/health.svg)](https://phpackages.com/packages/ycloudyusa-yusaopeny-activity-finder)
```

PHPackages © 2026

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