Hallo,
für den Rahmen gibt es doch die Option "Rahmen anzeigen?" im "Inline Frame" Contend-Element..
Shit, das ist schon so lange her, gelöst hab ich das Problem, ich kann mich aber nicht erinnern wie und habe leider damals vergessen die Lösung zu posten.
Typoscrip habe ich gerade nichts gefunden, bis auf
SETUP
# Kein <a name=></a> mehr vor CObjects
tt_content.stdWrap.dataWrap =
Meine Version war sr_iframe 1.0.1
Folgende Dateien habe ich anscheinend geändert,
ich hoffe das ist jetzt nicht zuviel für's Forum:
ext_typoscript_setup.txt
plugin.tx_sriframe_pi1 {
width = {$plugin.tx_sriframe_pi1.width}
height = {$plugin.tx_sriframe_pi1.height}
}
pi1/class.tx_sriframe_pi1.php
<?php
/***************************************************************
* Copyright notice
*
* (c) 2002 Daniel Br�n (dbruen@saltation.de)
* (c) 2004 Stanislas Rolland (stanislas.rolland@fructifor.com)
* All rights reserved
*
* This script is part of the Typo3 project. The Typo3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Plugin 'Inline frame' for the 'sr_iframe' extension.
*
* This is a sligthly modified version of the 'IFRAME2' plugin of the 'iframe2' extension
* URL rendering is done using function getTypoLink_URL
* Additional attributes may be specified in text form
*
* @author Daniel Br�n <dbruen@saltation.de>
* @modifier Stanislas Rolland <stanislas.rolland@fructifor.com>
*
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_sriframe_pi1 extends tslib_pibase {
var $prefixId = 'tx_sriframe_pi1';
// Same as class name
var $scriptRelPath = 'pi1/class.tx_sriframe_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'sr_iframe'; // The extension key.
/**
* Main function of this class: renders an <iframe> tag
*
* @param string $content: entry content
* @param array $conf: TS setup array
* @return string rendered content
*/
function main($content, $conf) {
$this->conf = $conf;
$this->pi_setPiVarDefaults();
if (trim($this->cObj->data['tx_iframe2_iframe_url'])) {
/* Process parameter values. If none are given, use Defaults */
$defaultWidth = (trim($this->conf['width']) != '' ) ? trim($this->conf['width']) : '100%';
$defaultHeight = (trim($this->conf['height']) != '' ) ? trim($this->conf['height']) : '100%';
$if_width = (trim($this->cObj->data['tx_iframe2_iframe_width']) != '')
? trim($this->cObj->data['tx_iframe2_iframe_width']) :
$defaultWidth;
$if_height = (trim($this->cObj->data['tx_iframe2_iframe_height']) != '')
? trim($this->cObj->data['tx_iframe2_iframe_height']) :
$defaultHeight;
$if_scroll = (trim($this->cObj->data['tx_iframe2_iframe_scrolling']) != '')
? trim($this->cObj->data['tx_iframe2_iframe_scrolling']) :
"auto";
$if_border = (trim($this->cObj->data['tx_iframe2_iframe_border']) != '')
? trim($this->cObj->data['tx_iframe2_iframe_border']) :
"1";
/* Rules for $params: Always prepend with a space! */
/* Add URL to tag-parameters calling function getTypoLink_URL */
$url = trim($this->cObj->data['tx_iframe2_iframe_url']);
/* The folloowing code borrowed from function getTypoLink_URL itself! */
$isLocalFile = 0;
$fileChar = intval(strpos($url, '/'));
$urlChar = intval(strpos($url, '.'));
// Detects if a file is found in site-root (or is a 'virtual' simulateStaticDocument file!) and if so it will be treated like a normal file.
list($rootFileDat) = explode('?', rawurldecode($url));
$rFD_fI = pathinfo($rootFileDat);
if (trim($rootFileDat) && !strstr($url, '/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm', strtolower($rFD_fI['extension'])))) {
$isLocalFile = 1;
}
/* If the url is not an email, nor a remote URL, nor a local file, nor a simulateStaticDocument file, then it is a typo3 uid or alias: we force type=0, to avoid notInFrameReloads. */
if (!strstr($url, '@') && !(!$isLocalFile && $urlChar && (strstr($url, '//') || !$fileChar || $urlChar < $fileChar)) && !($fileChar || $isLocalFile) ) {
$url .= ',0';
}
/* OK, now we add it! */
$params = ' src="'.htmlspecialchars($this->cObj->getTypoLink_URL($url, '', '')).'"';
/* Add width/height to tag-parameters */
/* $params .= ' width="' . $if_width . '" height="' . $if_height . '" style="width:' . $if_width . ';height:' . $if_height . ';"'; */
/* Add frameborder to tag-parameters */
$params .= ' frameborder="' . $if_border . '"';
/* Add scrolling to tag-parameters */
$params .= ' scrolling="' . $if_scroll . '"';
$additionalAttributes = t3lib_div::trimExplode(chr(10), trim($this->cObj->data['bodytext']), 1);
foreach($additionalAttributes as $k => $v) {
if ($v ) {
$parts = t3lib_div::trimExplode('=', $v);
$params .= ' ' . $parts[0] . '="' . str_replace('"', '', $parts[1]) . '"';
}
}
$content = '<iframe'. $params. '></iframe>';
$content = $this->cObj->stdWrap($content, $this->conf['stdWrap.']);
} else {
$content = '[Plugin configuration:] Please enter an URL in the url-field of the content element!';
}
return $this->pi_wrapInBaseClass($content);
}
}
if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/sr_iframe/pi1/class.tx_sriframe_pi1.php"]) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/sr_iframe/pi1/class.tx_sriframe_pi1.php"]);
}
?>
hth,
Ben