Skip to content

Repository files navigation

TYPO3 Extension fetchurl

Purpose

The task of this extension is to fetch an URL from the internet and display it on a website.

Features

  • The fetched URLs can be display inline or as an iframe.
  • If the URLs is displayed in an iframe, it is possible to activate an "IFrame-Switch" to ensure privacy

Installation

via composer

composer require in2code/fetchurl

via the TYPO3 Extension Manager

  • go to the TYPO3 Module "Admin Tools" => "Extensions"
  • search for "fetchurl"
  • import and activate the extension

or

Contribution

Contributions are always welcome.

In order to ease the contributions, we provide a ddev setup.

  1. install ddev
  2. fork and clone project
  3. cd my/project
  4. ddev start
  5. ddev initialize
  6. open https://fetchurl.ddev.site/typo3/
  7. use admin and password for backend login

Happy coding

Configuration

Templating

Copy the folder contents from EXT:fetchurl/Resources/Private/Templates/ to any location and set the new path via TypoScript setup:

plugin.tx_fetchurl {
view {
templateRootPaths.1 = EXT:myextension/Resources/Private/Templates/Fetchurl/
}
}

Activate Features

Activate the iframe switch and link to your privacy page

plugin.tx_fetchurl_pi1 {
settings {
useIframeSwitch = 1 // <- default is "1"
pidPrivacy = 8945 // replace with your own pid
}
}

Append additional parameters

It is possible to attach additional parameters to all requests of EXT:fetchurl.
This is done with the TypoScript keys "additionalParameter.static" and "additionalParameter.iframe".

Existing parameters and the original fragment are kept.

plugin.tx_fetchurl_pi1 {
settings {
additionalParameter {
static {
# a static value
foo = bar
# value with TypoScript stdWrap
foo2 = TEXT
foo2.value = bar2
}
iframe {
# a static value
foo = bar
# value with TypoScript stdWrap
foo2 = TEXT
foo2.value = bar2
}
}
}
}

Note: If a parameter is specified in the url and also set by TypoScript, the value in the original url is overwritten and the value from TypoScript is used.

See the example below (for parameterName=parameterValue):

flexform urlfinal url
https://example.com/https://example.com/?parameterName=parameterValue
https://example.com/#c123https://example.com/?parameterName=parameterValue#c123
https://example.com/?id=12#c123https://example.com/?id=12&parameterName=parameterValue#c123
https://example.com/?id=12&parameterName=abc#c123https://example.com/?id=12&parameterName=parameterValue#c123

Events

Signal class nameEvent nameinformation
\In2code\Fetchurl\Domain\Service\FetchServiceAfterUrlBuildEventafter the protocol and additional parameter are added
\In2code\Fetchurl\Domain\Service\FetchServiceAfterHtmlFetchEventafter the content fetched
\In2code\Fetchurl\Domain\Service\IframeServiceAfterUrlBuildEventafter the protocol and additional parameter are added

Screenshots

Frontend example: Frontend example

Plugin for editors in backend: Backend example

Example for a privacy save 2-click-solution: Backend example

Changelog

VersionDateStateDescription
6.1.12026-06-02DocsUpdate changelog
6.1.02026-06-02TaskAdd local ddev development enviroment
6.0.12025-07-09BugfixMigrate update wizards to service tags
6.0.02025-02-17FeatureSupport TYPO3 13 / 12 and drop 11 support
5.0.32023-11-26BugfixTiny bugfix
5.0.22023-11-25BugfixFix GH action for TER release
5.0.12023-11-25Bugfixtwo tiny bugfixes
5.0.02023-07-07FeatureTYPO3 V12 compatibility, switchable controller actions to CTypes, upgrade wizards added, replaced signals with events
4.5.22021-03-17BugfixAdd extension key to composer.json, small development updates
4.5.12021-03-05BugfixAdjust composer.json
4.5.02021-03-05FeatureSupport TYPO3 11
4.4.22021-03-04TaskFirst TER release by @in2code-de
4.4.12021-02-22BugfixAllow urls starting with "//"
4.4.02020-08-19TaskDon't add empty values to additionalparameters
4.3.02020-08-18FeatureAllow typoscript stdwrap for additionalparameters
4.2.02020-08-13FeatureAdd typoscript option to add additional parameter to the flexform url, add "afterUrlBuild" signals
4.1.12020-08-13BugfixReplace signalSlogDispatcher phpDoc injection with method injection
4.1.02020-04-24FeatureDeclare extension compatible with TYPO3 V10
4.0.22020-03-10BugfixRemove sandbox-attribute of the iframe
4.0.12020-03-02BugfixFix small typo in template file
4.0.02020-02-27FeatureAdd a 2-click solution for iframes
3.5.02019-07-29TaskUse subtree split in composer for TYPO3 core
3.4.02017-02-18!!!TaskSmall refactoring, allow url without protocol
3.3.12017-02-16BugfixShow additional fields if plugin mode == iframe
3.3.02017-02-01FeatureSet iFrame width and scrollbars in FlexForm
3.2.02017-02-01FeatureSet iFrame height in FlexForm
3.1.02016-12-22TaskRemove refactor ext_tables.php for T3 8.5 and newer
3.0.22016-12-02BugfixRemove version from composer.json
3.0.12016-12-02BugfixHide not needed tt_content fields
3.0.02016-11-28TaskAdd iframe feature
2.0.02016-05-23InitialInitial release of the fork of typo3-ter/fetch-url

About

Extension fetchurl for TYPO3: Fetch and display remote content in a TYPO3 instance, via iframe or inline

Topics

Resources

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages