Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for shortener services #191

Merged
merged 13 commits into from
Jan 9, 2024
Binary file added docs/configuration/images/shortener-bitly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/configuration/shortener.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
URL shortener service
#####################
.. attention::

Mautic 5 introduces a new shortening feature, replacing the previous legacy shortening system found in the settings. If you utilized the shortening service in Mautic 4, upon upgrading to Mautic 5, please follow the steps below to reconfigure it.

The new URL shortener service allows developers to create Plugins for any shortener service, with any type of authorization. By default, Mautic does not provide a URL shortener service Plugin; you must install it either from the Marketplace or manually.

Check warning on line 7 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Contractions] Feel free to use 'doesn't' instead of 'does not'. Raw Output: {"message": "[Google.Contractions] Feel free to use 'doesn't' instead of 'does not'.", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 7, "column": 145}}}, "severity": "INFO"}

Check warning on line 7 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Semicolons] Use semicolons judiciously. Raw Output: {"message": "[Google.Semicolons] Use semicolons judiciously.", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 7, "column": 192}}}, "severity": "INFO"}


Example of setup Bitly plugin

Check failure on line 10 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Bitly'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Bitly'?", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 10, "column": 18}}}, "severity": "ERROR"}

Check warning on line 10 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Plugin' instead of 'plugin'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Plugin' instead of 'plugin'.", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 10, "column": 24}}}, "severity": "INFO"}
=============================

1. Install the Bitly bundle from the Marketplace or using Composer:

Check failure on line 13 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Bitly'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Bitly'?", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 13, "column": 16}}}, "severity": "ERROR"}

.. code-block:: bash

composer require webmecanik/mautic-bitly-bundle

2. Obtain an access key from :xref:`Bitly API settings` and set up/enable the Bitly plugin.

Check failure on line 19 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Bitly'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Bitly'?", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 19, "column": 79}}}, "severity": "ERROR"}

Check warning on line 19 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Plugin' instead of 'plugin'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Plugin' instead of 'plugin'.", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 19, "column": 85}}}, "severity": "INFO"}

3. Navigate to Configuration > System Settings > Shortener Service and designate Bitly as the default shortener service.

Check failure on line 21 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Bitly'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Bitly'?", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 21, "column": 82}}}, "severity": "ERROR"}

.. image:: images/shortener-bitly.png
:width: 600
:alt: Screenshot of Bitly enabled for SMS

Check failure on line 25 in docs/configuration/shortener.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Bitly'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Bitly'?", "location": {"path": "docs/configuration/shortener.rst", "range": {"start": {"line": 25, "column": 24}}}, "severity": "ERROR"}
7 changes: 7 additions & 0 deletions docs/links/bitly_api_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from . import link

link_name = "Bitly API settings"
link_text = "Bitly API settings"
link_url = "https://app.bitly.com/settings/api"

link.xref_links.update({link_name: (link_text, link_url)})