DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Configuration¶
Include social links on each page of your website¶
Integrate the socialmedialinks into your page rendering¶
The default typoscript code for rendering the plugin looks like this (taken from form4_socialmedialinks/Configuration/TypoScript/setup.txt):
plugin.tx_form4socialmedialinks_list.show = USER
plugin.tx_form4socialmedialinks_list.show {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
controller = Link
pluginName = List
extensionName = Form4Socialmedialinks
vendorName = FORM4
settings < plugin.tx_form4socialmedialinks_list.settings
persistence < plugin.tx_form4socialmedialinks_list.persistence
view < plugin.tx_form4socialmedialinks_list.view
}
If you want to integrate the plugin dynamically into your page you can use a typoscript like this:
lib.rssbutton = COA
lib.rssbutton {
10 < plugin.tx_form4socialmedialinks_list.show
10.settings.elements = {$plugin.tx_yourplugin.rssButtonSocialMediaElements}
stdWrap.wrap = <div class="cell-1 socialmedia rssbtn"><span class="button">|</a></span></div>
}
The example shows how to copy the plugin.tx_form4socialmedialinks_list.show typoscript setup into your own typoscript.
10.settings.elements contains a commaseperated list of your unique identifiers which are set in the socialmedia records. This might be for example a constant in your own extension. With the f:cObject fluid viewhelper you also can add this then into any of your fluid templates.
You also can overwrite here the templates and markers if you need to. You can do this in the plugin settings and also in the extended typoscript. Make sure to consider that changes on these settings depend on the order of the typoscript.
Marker¶
All defined marker/placeholder will be replaced while rendering the social media link. That means all occurrences of ###TOKEN### (casesensitive) will be replaced for URL or script value of a social media link.
Available marker token¶
Token | Description |
---|---|
URL | The current url of this page urlencoded. |
URLGET | The current url of this page urlencoded and with GET parameters. |
TITLE | The title of the current page. |
TWITTER_FOLLOWME_ACCOUNT | The twitter account name. The value can be changed by TypoScript configuration. Default: followme |
TWITTER_HASHTAG | The twitter hashtag. The value can be changed by TypoScript configuration. Default: hastag |
TWITTER_USERNAME | The twitter username. The value can be changed by TypoScript configuration. Default: username |
If you want to add you own typoscript markers, add them like this example to the settings of the plugin: You can define your own markers as a typoscript object or a plain string. Add them like these examples to the settings of the plugin:
plugin.tx_form4socialmedialinks_list.settings.markers{
ABSTRACT = TEXT
ABSTRACT{
data = page:abstract
htmlSpecialChars = 1
rawUrlEncode = 1
}
JUSTTEXT = This is a static test text
}
In the setup.txt of the extension you find at the typscript plugin.tx_form4socialmedialinks_list.markers further examples of the already defined markers. But don´t add your own markers there, just to the plugin.tx_form4socialmedialinks_list.settings.markers ts path.
Adjust popup¶
You can set a possible popup for a type: "link" social media record by selecting the checkbox "Open in Popup". If you want to overwrite this javascript with your own version you can overwrite the following typoscript:
page {
includeJSFooter {
socialmedialinks = EXT:form4_socialmedialinks/Resources/Public/JavaScript/form4Socialmedialinks.js
}
}