Forum Moderators: coopster
The link to play the podcast looks like this:
$tags['LISTEN_TO_FILE_TEXT_LINK'] = '<a href="files/podcaster/' . $this->_file['name'] . '" target="_blank">' . $_SESSION['translate']->it('Listen') . '</a>';
Will i need to create a new php file? Any help is appreciated.
It's not really a PHP solution (PHP doesn't control window size etc.).
If you can do without extra graphics, then you can do it purely with that javascript. If you really need extra graphics then you will need both javascript and a new PHP page.
You will first need to insert a JavaScript function into the HEAD of your CMS Template, or inside the .js file that the CMS Template uses. The function should look something like this:
function sk_popUp(url,width,height) {popUpParams = "location=1, menubar=0, scrollbars=1, resizable=1, status=0, toolbar=0, width=" + width + ", height=" + height;
window.open(url,'skPopUp',popUpParams);
}
You can then change your link to:
$popUpUrl = "files/podcaster/' . $this->_file['name'] . '";
$popUpWidth = 400;
$popUpHeight = 400;$tags['LISTEN_TO_FILE_TEXT_LINK'] = '<a href="javascript:sk_popUp(\'' . $popUpUrl . '\',\'' . $popUpWidth . '\',\'' . $popUpHeight . '\');" target="_blank">' . $_SESSION['translate']->it('Listen') . '</a>';
Failing that, you could add the complete "window.open" line to the link, but using the function is much more flexible.
Hope this helps,
SK