To use rgmedialinks in your own extension you need to follow these steps:
1.) Include the Mootools Library and the source file of rgmedialinks
# TS Code
page.includeJS.file1 = EXT:rgmedialinks/res/mootools.js
page.includeJS.file2 = EXT:rgmedialinks/res/mediabox.js
page.includeCSS.file1 = EXT:rgmedialinks/res/mediabox.css
2.) Enable rgmedialinks
a) Either you can use the parseFunction of TYPO3 to enable rgmedialinks with TS
# TS Code
plugin.tx_yourext.text.parseFunc.tags.link.typolink.userFunc {searchString = {$plugin.rgmedialinks.searchString}fileTypes = {$plugin.rgmedialinks.fileTypes}size= {$plugin.rgmedialinks.size}jsFile = {$plugin.rgmedialinks.jsFile}cssFile = {$plugin.rgmedialinks.cssFile}mootools = {$plugin.rgmedialinks.mootools}}
To get this working you need to use the cObj stdWrap to enable the parseFunc for your field
b) Fastest way
Just add the attribute “rel=”mediabox” to your link