[Typo3] Frameset and URL QueryString parameter
Dennis Cheung
hkdennis2k at gmail.com
Sat Nov 26 03:58:41 CET 2005
OK, I agree, if you want things work, do it yourself.
It looks good for me.
add to template script
page.config.intTarget=page # or else, you will have frameset in frame for
some extension
frameset.xxxx.addQueryString=1
and apply the change
/typo3_src-3.8.0/typo3/sysext/cms/tslib/class.tslib_content.php
@@ -6907,33 +6907,23 @@
function frameParams($setup, $typeNum) {
$paramStr = '';
$name = $setup['obj'];
-
- /*
- if
($GLOBALS['TSFE']->config['config']['simulateStaticDocuments']) {
- $theCompURL='';
-
$theCompURL.=$GLOBALS['TSFE']->makeSimulFileName($GLOBALS['TSFE']->page['title'],
- ($GLOBALS['TSFE']->page['alias'] ?
$GLOBALS['TSFE']->page['alias'] : $GLOBALS['TSFE']->page['uid']),
- intval($typeNum));
- if
($GLOBALS['TSFE']->config['config']['simulateStaticDocuments']=='PATH_INFO')
{
- $theCompURL = str_replace('.','/',$theCompURL);
- $theCompURL = 'index.php/'.$theCompURL.'/?';
- } else {
- $theCompURL.='.html?';
+ if ($setup['src']) {
+ $finalURL=$setup['src'];
+ if($setup['addQueryString']){
+ $qs=$GLOBALS['_SERVER']['QUERY_STRING'];
+ $finalURL.=ereg_replace("(id|type)=[A-Za-z0-9]+", '', $qs);
}
} else {
- $theCompURL =
$GLOBALS['TSFE']->config['mainScript'].'?id='.$GLOBALS['TSFE']->page['uid'].'&type='.intval($typeNum);
+ global $TSFE;
+
$tmpparam=($setup['options']?'&'.$setup['options']:'').$TSFE->cObj->getClosestMPvalueForPage($TSFE->page['uid']);
+ if($setup['addQueryString']){
+ $qs=$GLOBALS['_SERVER']['QUERY_STRING'];
+ $tmpparam.='&'.ereg_replace("^(id|type)=[A-Za-z0-9]+", '',
ereg_replace("&(id|type)=[A-Za-z0-9]+", '', $qs));
+ }
+ $LD =
$TSFE->tmpl->linkData($TSFE->page,'',$TSFE->no_cache,'','',$tmpparam,intval($typeNum));
+ $finalURL = $LD['totalURL'];
}
- // Add absRefPrefix if exists.
- $finalURL =
$GLOBALS['TSFE']->absRefPrefix.$theCompURL.($setup['options']?'&'.$setup['options']:'').$GLOBALS['TSFE']->linkVars.$GLOBALS['TSFE']->getMethodUrlIdToken.($GLOBALS['TSFE']->no_cache?'&no_cache=1':'');
- $finalURL = $GLOBALS['TSFE']->tmpl->removeQueryString($finalURL);
- */
-
- // From 3.6.0, use "linkData" for ALL links:
- $LD =
$GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'',$GLOBALS['TSFE']->no_cache,'','',($setup['options']?'&'.$setup['options']:'').$GLOBALS['TSFE']->cObj->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']),
intval($typeNum));
- $finalURL = $LD['totalURL'];
-
-
- if ($setup['src']) {$paramStr.='
src="'.htmlspecialchars($setup['src']).'"';} else {$paramStr.='
src="'.htmlspecialchars($finalURL).'"';}
+ $paramStr.=' src="'.htmlspecialchars($finalURL).'"';
if ($setup['name']) {$paramStr.=' name="'.$setup['name'].'"';} else
{$paramStr.=' name="'.$name.'"';}
if ($setup['params']) {$paramStr.=' '.$setup['params'];}
return $paramStr;
On 11/26/05, Dennis Cheung <hkdennis2k at gmail.com> wrote:
>
> Hi all,
>
> I notice that there are many extension don't support within frameset. And
> i
> am having problem on this.
>
> The reason is they only make type=xx withing links(always zero),
> and the frameset framework provided by typoscript didn't pass any addition
> parameter from the frameset page to frame src attribute.
> Only page id and type (and lang?) are passed into frames.
>
> I have tried, but frame.src only accept pure, plain string.
> How can I make this works? like typolink.addQueryString does.
>
>
> Thanks,
> Dennis
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list