jaroslawzielinski/torahverse-m2

Torah verses (and quotes) slider

Fund package maintenance!
By Me A Coffee

Installs: 270

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:magento2-module

2.2.8 2024-10-29 14:57 UTC

README

A Magento2 module that provides dynamic Torah verse/quote sliders for both the backend (by default) and the frontend. Whether you're a store admin or a customer, you can enjoy these engaging, responsive sliders.

The module calculates the available space and adjusts the number of words per line to optimize the display. If the text exceeds the configured row limit, the verse scrolls vertically, creating a seamless user experience. This ensures that the widget is Responsive Web Designed and works beautifully on all devices.

One of the most exciting aspects of this module is that it leverages the Torah library, a powerful API client with built-in caching (via SQLite). This PHP library pulls text from the Bible Info service, offering up to 21 different translations. For more details, feel free to check out the repository.

If you're excited about this project and want to support its ongoing development, consider buying me a coffee! Your support means a lot and helps keep this project alive.

"Buy Me A Coffee"

New Features:

Torah Input (frontend/backend)

This UI component allows you to select any Bible verse from any translation, with a preview available in both the frontend and backend. Simply click the verse to navigate to the full passage on the Bible service.

Frontend

Choose any Bible verse you like:

Backend

Easily edit the Bible verse reference directly in the form (just click back button):

Torah Search

Search feature helps you find what you are looking for in the Bible. There are several options for searching available. The results are presented with pagination. You may choose the page (next, previous) and set amount data visible on a single page.

Note: Before using the search feature, you need to index your preferred Bible translations by running the following command: console command for f.e bt:

bin/magento torah:cache:flush bt && bin/magento torah:cache:warm bt

Searching options

  • Search: Enter the text you're looking for.
  • Search in results: Narrow down results with additional conditions.
  • Search parts: Filter by specific sections of the Torah (e.g., Tanakh, Nevi'im ketuvim, Brit Hadasha or Old Testamet, New Testament)
  • Case-sensitive search: Enable or disable case sensitivity.
  • Verse context: Choose to display surrounding verses for context.
  • Translation: Select one of 21 available translations.

Torah Annuals Group

This feature allows you to display a specific quote on a given day of the year—perfect for creating a daily inspiration widget! You can set up 366 quotes, one for each day of the year.

To create an annual quote:

  • Create a quote and fill in the required fields.
  • Assign it to an annual group.
  • Name (field 'Code') the quote using a special code that includes the date (last 4 characters represent the month and day, e.g., 'quote1024' for October 24th).

Installation Guide

You can find the module on Packagist. To install:

cd YourProject
composer require jaroslawzielinski/torahverse-m2

Uninstallation

To uninstall the module and revert all database changes, run the following command:

bin/magento torahverse:module:uninstall

Text Slider Features

Backend Sliders

The backend slider is visible only to Magento 2 users and supporters—customers won’t see this.

Frontend Sliders

For the frontend, you can choose between two slider types:

  1. Homepage Slider: Display the slider on the homepage in 5 different placements:

    • After the header: top.container
    • At the top of the content: content.top
    • At the bottom of the content: content.bottom
    • Before the footer: page.bottom
    • Inside the footer: footer, footer-container
  2. Custom Sliders: These can be placed anywhere on your site. Just create a slider and add it to any page, block, or widget using the Admin Panel.

After defining custom slider with code f.e. 'annual_quotes' (see Slider Configurations) you can use it within CMS Block/CMS Page:

or create a CMS Widget:

Slider Modes

Randomized Auto-Play Infinite Loop

Displays verses in a random order, continuously looping.

Ordered Auto-Play Infinite Loop

Displays verses in the order they appear in the admin panel.

Random Static View

Displays one random verse per page load.

More Features

Pause Mode

Hover over the slider to pause the animation.

Group Colors

Display group names and colors for easy organization.

Backend Features

First steps

1. Log in to the Admin Panel.

2. Enable the module from the configuration menu.

3. Add quotes and verses to different groups.

Groups

Groups grid Possible operations: Add New Group, Delete, Edit

Notice: You can not modify/delete Default Group. Groups grid

Groups/Verses

Verses grid Possible operations: Add New Verse, Delete, Group Assign, Edit Verses grid

Groups/Quotes

Quotes grid Possible operations: Add New Quote, Delete, Group Assign, Edit Quotes grid

4. Configure your sliders for the frontend and backend.

Configuration - Torah Verse

The module offers extensive customization options, from verse text colors to slide timing. Easily tweak your sliders to match your site’s style and layout.

General Settings

Enable

Enable module / Disable module and disable menu.

Menu enabled

Enables/disables menu in the left bar (and access to the grids)

Service Link Enable

This option allows to link to bible service on click (default is on)

Sweep time

Time value in milliseconds between slides (horizontal swipe)

Is vertical sweep possible

Enables feature for vertical scroll (it is triggered when text exceeds 'Number of shown rows')

Vertical Sweep time

Time value in milliseconds between changing current shown row (during vertical scroll)

Is group colours enable

Enables box with group title and group colour

Html Template for Verse Slider Frame

Provides html template for user tweaks. Available keys are listed in comment.

  • {url} - link for bible.info.pl service (target is "_blank")
  • {textColour} - colour for verse text
  • {colour} - colour for group border/group label background
  • {groupName} - name of a group
  • {antiColour} - contrast colour to group border/group label background
  • {content} - verse content
  • {description} - verse description

Html Template for Quote Slider Frame

Provides html template for user tweaks. Available keys are listed in comment.

  • {textColour} - colour for quote text
  • {colour} - colour for group border/group label background
  • {groupName} - name of a group
  • {antiColour} - contrast colour to group border/group label background
  • {content} - quote content
  • {author} - quote author
  • {description} - quote description

Html Template for Annual Slider Frame

Provides html template for user tweaks. Available keys are listed in comment.

  • {textColour} - colour for quote text
  • {colour} - colour for group border/group label background
  • {groupName} - name of a group
  • {antiColour} - contrast colour to group border/group label background
  • {name} - quote name
  • {content} - quote content
  • {author} - quote author
  • {description} - quote description
  • {description2} - quote description2
  • {description3} - quote description3

Verses ordered

Enables numbering for verses or plain text mode.

Text Colour

Colour for text of sliders

Background Hover Colour

Background colour when slider is being hovered/paused

Mode of slider

Three modes for sliders are available:

  • 'randomautoplayinf' - Randomized Auto play infinity loop
  • 'autoplayinf' - Ordered Auto play infinity loop
  • 'random' - Random view - static

Number of shown rows

Number of shown rows (when 3 - default, please clear 'Custom Styles')

Custom Styles

Provides custom css styles (enables user tweaks (colour change, background, remove cursor etc.))

Admin Panel Slider

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Slider Configuration

In this multi select you may choose groups that you would like to display.

Homepage Slider

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Placement of a slider

There are 5 available placements (Magento2 container name in layout):

  • 'top.container' - After page header top
  • 'content.top' - Main content top
  • 'content.bottom' - Main content bottom
  • 'page.bottom' - Before page footer
  • 'footer' - Page footer',
  • 'footer-container' - Page Footer Container

Slider Configuration

In this multi select you may choose groups that you would like to display.

Custom Sliders

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Slider Configurations

Array for sliders (code, slider configuration). You may add/edit/delete as many configurations as you want. Groups grid

Configuration - Torah

Language Settings

Language

You have two available languages: English and Polish. This settings changes the language of description in Torah siglum.

Translate Preset

You may also update Groups/Verses/Quotes Presets in given language version. Remember to Save before clicking the button unless you prefer the language written in button's label. Groups grid

Torah Input

Division

You may choose division of books in Torah Input (e.g. Old Testament\New Testament). Default value is Tanakh/Nevi'im ketuvim/Brithadasha. This feature will be used in the future.

Bible Tools enabled

Default value is No. If set to Yes it appears in menu in Bible Tools group as Verse Config where Verse Pick and Verse Search are presented. In the future the input will be customized (you will choose all the options by just clicking it, without typing anything). The Torah input is also used in Admin Panel in Verse Grid (Add New Verse/Edit action) Groups grid

after clicking, it will be opened in new tab (notice little square put next to the link) as a front page:

Groups grid

Case Sensitive

Default Option for Verse Search form.

Division parts filter

Default Option for Verse Search form.

Results per page

Default Option for Verse Search form.

Library Settings

Cache Enable

This option enables/disable API caching for Bible Service. Down bellow there are serveral indicators for Bible Translations Cache state.

100% means the cache is warmed and all of the bible verses are stored in local DB (sqllite). Verse Search will be possible for cached Translation.

0% means the cache is not ready. You can not use the Verse Search for the translation then.

Frontend

Example uses

Groups grid

Pause mode (cursor changes, and background)

Groups grid Notice: You can configure it in Background Hover Colour, Custom Styles configuration options.

Group Colours enabled

Groups grid

See also

Inspiration for vertical scroll

Explore these features, play with the settings, and see how this module can elevate your Magento2 site! And if you find value in this, I'd greatly appreciate your support on Buy Me a Coffee — it helps keep projects like this alive.

"Buy Me A Coffee"