Download the PHP package oveleon/contao-glossary-bundle without Composer

On this page you can find all versions of the php package oveleon/contao-glossary-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-glossary-bundle

Contao Glossary Bundle

A glossary extension for the Contao Open Source CMS. Glossaries are organized in archives similar to news and events and can be displayed via a list and reader module.

Oveleon


Support

If you like this extension, we'd love your support in keeping the open-source spirit alive.

If you think this plugin is useful, please consider sponsoring us to help contribute to our time invested and to further development of this and other open source projects.

Your contributions, whether through coding, testing, providing feedback, or even a donation, help ensure that we can continue offering free open source software. Join us in making a difference, and thank you for your support! - Oveleon.


Working with Contao 4.13 and Contao ^5.1 (PHP ^8.1)


Description

With the Contao Glossary Bundle, you can manage glossary terms in the backend and display them using frontend modules. Each glossary entry can be individually modified and structured with content elements. Terms appearing on your website can be automatically replaced links (or another markup) and a hovercard preview.


Features

Installation

Upgrading to version 2

After upgrading from version 1 to version 2, make sure to edit your modules (glossary and glossary-reader) and set up the new templates.

Via composer

Via contao-manager

After installing the contao-glossary-bundle, you need to run a contao install.

Setup

Creating glossaries and terms

The Contao Glossary Bundle uses archives (glossaries) and glossary items (terms) similar to the Contao-News-Bundle.

  1. Set up a redirect page for glossary items

  2. Create a new glossary archive in Glossaries

  3. Edit ✎ the new glossary to add new glossary items (terms)

  4. Create a new glossary item:

    • Title = Glossary term
    • (Search terms = keywords for automatic conversion)
    • Glossary item teaser = teaser text for glossary overview etc.
    • Publish item

  5. (Additionally, you are able to create content elements for detail pages - Similar to contao news)

Publishing your glossaries to your website

To display your glossaries and glossary terms, you have to create two front end modules:

Glossary overview

  1. Create the front end module Glossary
  2. Select your glossary/glossaries and configure the module
  3. Embed the module in a page

Glossary reader

  1. Create the front-end module Glossary-reader
  2. Select your glossary/glossaries
  3. Embed the module in your redirect-page (for your archive)

Automatic keyword conversion and hovercards

  1. Go to your website root and "activate glossary" under glossary settings
  2. Select your glossary/glossaries
  3. (Enable hovercards if needed)

Only search terms within glossary items are taken into account. Not the keyword itself

You are able to add multiple keywords to a term. The glossary JavaScript does an exact search; thus spaces are allowed as well.

Hint:

You can disable automatic keyword conversion and hovercards within "Expert settings" on regular pages. This option is recommended for glossary pages.

Front end modules

Glossary

The glossary displays published glossary items from selected glossaries.

Settings

Glossary
Option Description
Glossaries Here you can select one or more glossaries whose glossary terms should be displayed.
Glossary reader Automatically switch to the glossary reader if an item has been selected.
Hide empty groups Do not show navigation links for letters that do not exist.
Glossary pagination Activates pagination for glossary terms. Other glossary entries can be accessed via glossary navigation.
Default letter Defaul letter when glossary pagination is activated.
Convert special characters Converts UTF8-characters to ASCII for the glossary navigation/pagination.
Glossary quicklinks Adds additional quicklinks to the glossary module.
Glossary entry template Template for glossary items (simple, short, latest, full).
Module template The modules template that is being used.
Image settings Image size for teaser images.
Access protection Show the module for certain member groups only

Glossaryreader

The glossary displays published glossary items from selected glossaries.

Settings

Glossary reader
Option Description
Glossaries Here you can select one or more glossaries that the reader should display.
Glossary entry template Template for the glossary item (simple, short, latest, full).
Module template The modules template that is being used.
Image settings Image size for the teaser image.
Access protection Show the module for certain member groups only

Page & Glossary settings

Root page settings

The contao glossary bundle extends the

Root page

with additional Glossary Settings.

The settings will work for all subpages for this root page.

Glossary settings
Option Description
Activate glossary Enable replacing of keywords for this and its subpages.
Glossaries Keywords (within glossary items) for these glossaries will be converted to links or a chosen markup.
Hovercards Disable/Enables the teaser hovercards for glossary links/markup.
Configuration template The JavaScript configuration template for the Glossary Javascript

All keywords within glossary items are converted to links by default (You are able to change the markup within the glossary configuration template, see JavaScript Settings)

The hovercard shows a preview of the glossary item

Regular page settings

The Expert settings for regular pages are extended with the following option:

Expert settings
Option Description
Disable glossary Disables glossary hovercards and keyword conversion for this page.

Glossary archive settings

The Glossaries under Glossaries contain extra options for hovercards

Glossary settings
Option Description
Redirect page The glossary reader page to which visitors will be redirected when clicking a glossary item.
Glossary hovercard template The template that is used for glossary hovercards.
Hovercard image size Image size for glossary hovercards.

The teaser images within glossary items are shown in the hovercard

Glossary item settings

Glossary items are terms within your glossaries.

Glossary item settings
Option Description
Title The title/keyword of your glossary entry.
Glossary item alias The alias and unique reference for a glossary item. It is used for created pages and insert-tags.
Search terms Here you can enter search terms that are included in automatic cross-references (automatic keyword conversion).
Case-sensitive markup Here you can select if the search for keywords should be case-sensitive.
Redirect target The redirect of a glossary item
  • Use default page: Creates a page
  • Page: Redirects to a page within your Contao instance
  • Article: Redirects to an article within your Contao instance
  • Custom URL: Redirects to a custom url
Meta title Here you can add a custom meta title to overwrite the default page title.
Robots tag Here you can overwrite how search engines handle the glossary item.
  • index,follow
  • index,nofollow
  • noindex,follow
  • noindex,nofollow
Meta description Here you can add a custom meta description to overwrite the default page description.
Subheadline A subheadline within glossary items (Templates: glossary_full)
Glossary item teaser The glossary item teaser can be used in a hovercard or can be shown in a glossary list instead of the full content.
Add an image Adds an image to the glossary item (Templates: glossary_latest, glossary_full, hovercard_glossary_default)
CSS class CSS classes for the glossary item
Publish item Make the glossary item publicly visible on the website.

Creating links in Contao

Automatic conversion creates links (or another markup) when entering the page through JavaScript. For SEO purposes, you are able to create real links within Contao using the following options:

Using Insert tags

For more information on Insert tags, please visit the

official Contao documentation.

Insert tags

You can use insert tags with the glossary id or its alias (aliases are generated and unique).

Example

Insert tags
Insert tag Description
{{glossaryitem::*}} This tag is replaced with a link to a glossary item (replace * with the ID or alias).
{{glossaryitem_open::*}} Is replaced with the opening tag of a link to a glossary item: {{glossaryitem_open::430}}Check out doishub on GitHub{{link_close}}.
{{glossaryitem_url::*}} This tag will be replaced with the URL of a glossary item: <a href="{{glossaryitem_url::430}}">He's an awesome mentor</a>.
{{glossaryitem_keyword::*}} This tag is replaced with the keyword of a glossary item: <a title="{{glossaryitem_keyword::430}}">Follow him :)</a>.
{{glossaryitem_teaser::*}} This tag is replaced with the teaser of a glossary item: {{glossaryitem_teaser::430}}.

TinyMCE / Link picker

When creating links in TinyMCE in the backend of Contao CMS, you are able to choose a new source "Glossary" in the link picker.

Known limitations

It is currently not possible to add hovercard-events to a link created via link picker through tinyMCE due to security reasons.

To apply a hovercard event to a link, edit the html within your tinymce, and add

data-glossary-id: "your glossary item id"

to your link.

Example

<a href="{{glossaryitem_url::430}}" target="_blank" rel="noopener" data-glossary-id="430">Domain name</a>

Glossary JavaScript

Markup of glossary keywords and behavior for hovercards can be changed by parsing options into the glossary initialization. The Glossary object can be found within the config_glossary_default template. Developers can create a new template with the following prefix: 'configglossary', and choose it in the root page settings.

Settings

Glossary JavaScript
Option Default Description
entrySelector '#wrapper' Selectors for glossary-term search
markup 'a' Markup attribute for parsed glossary terms (e.g. 'mark', 'span', 'a')
markupAttr null Markup attribute for created markups:
// For example:
markupAttr: {
    'class': 'class1 class2',
    'data-myattr: 'attr'
}
language
active true Whether the language attribute 'lang' should be parsed
lang '' Language attribute
hovercard
active true Whether the hovercard feature should be enabled or not
id 'gs-hovercard' Id for the hovercard
interactive true Enables interaction with the hovercard
showLoadingAnimation true Show placeholder animation until content is loaded
maxWidth 380 Maximum width of hovercard (in px)
showThreshold 300 Minimum time that showEvent has to be triggered to show a hovercard (in ms)
leaveThreshold 200 Time that hovercard will stay visible after triggering the hideEvent (in ms)
Additional settings
popperOptions PopperJS options -> check https://popper.js.org/docs/v2/
includes (array)
'body',
'div,span,p',
'main,section,article',
'ol,ul,li',
'table,tr,th,tbody,thead,td',
'i,b,em,strong',
'mark,abbr',
'sub,sup'
Readable nodes for glossary item markup. Elements (and thus it's children) that are not listed within the includes, will not be converted.
excludeClasses (array)
'gl-none'
Readable nodes matching one or more classes within excludeClasses will not be converted.
route: {
   prefix:
   suffix:
   cache:
}
 
'/api/glossary/item/'
'/html'
true
 
API and glossary term cache settings
hovercardBreakpoint 1024 Minimum width for hovercard-creation (in px)
config json The parsed glossary entries for the markup (id, keywords, url, etc.)
// For example:
'config':[
{
    "id": "1", // ID
    "keywords": ["Bar"], // Keywords
    "url": "glossar-detail\/bar.html", // Route
    "cs": 0 // Case-sensitive
},
{
    "id": "3", // ID
    "keywords": ["Foo"], // Keywords
    "url": "glossar-detail\/foo.html", // Route
    "cs": 0 // Case-sensitive
},
{...}
]

Enabling 'showLoadingAnimation' shows an empty hovercard until content is loaded

Browser Support

The Glossary-JavaScript for automatic keyword conversion was tested in the following browsers:

https://caniuse.com/?search=String.matchAll

Mac (Big Sur, Catalina):

IPhone and IPad

Microsoft Windows

It will work with every browser that supports String.matchAll

Frequently asked questions

The glossary term markup does not work on my website

Not all links are converted on my page

I want to style the glossary markup

Support

[!IMPORTANT]
Feel free to report bugs and feature requests, do not feel entitled to bugs being fixed fast or your feature request being implemented for free. There is no such thing as a free lunch TANSTAAFL.

If you want a feature implemented or your bug fixed ASAP, you can commission it by contacting us via website.

License

This project is licensed under the AGPL-3.0 License — check LICENSE for more details.


All versions of contao-glossary-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
contao/core-bundle Version ^4.13 || ^5.1
doctrine/dbal Version ^3.3
knplabs/knp-menu Version ^3.1
symfony/config Version ^5.4 || ^6.4 || ^7.0
symfony/dependency-injection Version ^5.4 || ^6.4 || ^7.0
symfony/framework-bundle Version ^5.4 || ^6.4 || ^7.0
symfony/http-foundation Version ^5.4 || ^6.4 || ^7.0
symfony/http-kernel Version ^5.4 || ^6.4 || ^7.0
symfony/routing Version ^5.4 || ^6.4 || ^7.0
symfony/security-core Version ^5.4 || ^6.4 || ^7.0
symfony/string Version ^5.4 || ^6.4 || ^7.0
symfony/translation-contracts Version ^2.3 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oveleon/contao-glossary-bundle contains the following files

Loading the files please wait ....