[Typo3] real url and print version

racco raczek at open.infi.pl
Fri Jul 29 01:20:25 CEST 2005


----- Original Message ----- 
From: "racco" <raczek at open.infi.pl>
Newsgroups: typo3.english
Sent: Tuesday, July 26, 2005 2:18 PM
Subject: [Typo3] real url and print version


> Hello!
>
> This post has already appeared in thread real url and toTop link, but 
> because the problem may be interesting and may help someone else, I 
> decided to start a new thread.
>
>
> I have just discovered that I have some problems with my print page link 
> after  installing real_url
>
> it's the configuration:
>
> temp.PRINT {
> stdWrap {
> wrap = <div class="printer"> | </div>
> }
> 10=COA
> 10 {
> 10 = TEXT
> 10.value = print&nbsp;
> 20 = IMAGE
> #20.file =  fileadmin/template/new/images/printericon.gif
> 20.file =  fileadmin/template/new/images/print_16.gif
>
> stdWrap {
> postUserFunc = tx_make_printlink
> postUserFunc {
> target = _blank
> popup = 1
> windowparams = (resizable=no, toolbar=no, scrollbars=yes, menubar=no,
> width=700, height=800)
> windowname = printwindow
> include_post_vars = 1
> }....
>
>
> when i want to print page which real_url turns into human readable form 
> (url
> is readable domain.com/sth/otherthing/ everything is fine; but when the
> page's URL has something like in tt_news
> domain.com/news/article/26/392/b3f14fb450/ pressing print link causes the
> main page to go to root page and print page opened in new window is not
> filled with the content from site (no news id given).
>
>
> :/
>
> any solutions....?
>
>
> raczek
>



This is my solution;

Extension make_printlink uses function LinkData from
class.t3lib_tstemplate.php. As I discovered a totalUrl outputed by this
function is not correct! For example:

we have news which has url like this:
?&tx_ttnews%5Btt_news%5D=34&tx_ttnews%5BbackPid%5D=392&cHash=49cc39e087

while LinkData converts it to:
?&%3Btx_ttnews%5Btt_news%5D=34&%3Btx_ttnews%5BbackPid%5D=392&%3BcHash=49cc39e087

see the difference? %5B i %5D (square brackets - [ ]) - are placed incorrect
on LinkData output. That was why I always was getting no news id given.

solution.

in make_printlink.php file I substituded line  $uri=$LD[totalURL] in
function tx_open_printlink with this:
$uri = $LD[url].$LD[type].$LD[linkVars];

And it works!

But still the site was reloading to root site after clicking on print link.

In setup I had ( to enable my toTop link to work):
onfig.prefixLocalAnchors = all

I started to read documentation and after while changed 'all' to 'output'.
All works perfectly fine.


greetings, hope it will help someone


racco






More information about the TYPO3-english mailing list