[TYPO3-english] R: pdf_generator2 + realurl

De Contardi Riccardo Riccardo.DeContardi at bhuman.it
Wed Oct 28 15:08:10 CET 2009


Hi Bernhard,
Thank you for your answer...but it doesn't work, either :(
The link remains 
http://typo3.local/mypage/

I also tried to write parameter.dataWrap = {TSFE:id},777 (does not exist), but nothing changes!

BTW: Here is my .htaccess file:

RewriteEngine On
RewriteRule ^typo3$ - [L]

# Apache should not rewrite documents located in /typo3/, /uploads/, /fileadmin/ and /typo3conf/:
RewriteRule ^typo3/.*$ - [L]
RewriteRule ^uploads/.*$ - [L]
RewriteRule ^fileadmin/.*$ - [L]
RewriteRule ^typo3conf/.*$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# RewriteRule .* /typo3/index.php
RewriteRule .* /index.php
php_value allow_url_fopen On



Thanks for support


**************************************
Riccardo De Contardi
 
B Human Srl - www.bhuman.it 
Via Canzio, 15 - 20131 Milano
Tel +39.02 20 23 271 - Fax +39.02 20 240 561

-----Messaggio originale-----
Da: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Per conto di Bernhard Kraft
Inviato: mercoledì 28 ottobre 2009 14.35
A: typo3-english at lists.typo3.org
Oggetto: Re: [TYPO3-english] pdf_generator2 + realurl

De Contardi Riccardo schrieb:

> lib.convertPDF = TEXT
> lib.convertPDF.value= GET PDF!
> lib.convertPDF.postUserFunc = tx_pdfgenerator2->makePdfLink
> lib.convertPDF.postUserFunc.target =

I recently had to fix a site using pdfgenerator2 and realURL. As the pdfgenerator2
extension does not seem to be aware of realURL (and the TYPO3 typoLink link-generating
method) I simply created the link using the following TS:

lib.convertPDF = TEXT
lib.convertPDF.value= GET PDF!
lib.convertPDF.typolink = 1
lib.convertPDF.typolink {
	parameter.dataWrap = {TSFE:id},123
}

This should generate the appropriate link. If you like you could also apply the following
patch to realURL:

http://think-open.org/kraftb/index/misc/realurl_suffix_patch.diff

It allows you to have something like the following in your realURL config:

------------------------------------------------------------------
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = Array(
[...]
	'fileName' => array (
		'defaultToHTMLsuffixOnPrev'=> array(
			'.pdf' => array(
				'keyValues' => array(
					'type' => 123,
				),
			),
			'.rss' => array(
				'keyValues' => array(
					'type' => 100,
				),
			),
			'.htm' => array(
				'keyValues' => array(
					'type' => 98,
				),
			),
			'.html' => array(
				'keyValues' => array(
				),
			),
		),
	),
[...]
);
------------------------------------------------------------------

Usually the option "defaultToHTMLsuffixOnPrev" (boolean) allows you to have links like:

http/mysite.com/company/about_us.html
instead of
http/mysite.com/company/about_us/

So to append the ".html" suffix instead of just a "/" at the end. The above patch
and configuration will append the appropriate suffix depending on the variables set
in "keyValues" sub-config array. The configuration is the same as for "fileName|index"


I'll send this patch proposal to Dmitry, so it probably can get included in future
versions of realURL.


greets,
Bernhard
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente il mittente e, tenuto conto delle responsabilità connesse all'indebito utilizzo e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia cancellare l'originale e distruggere le varie copie o stampe.

The receiver of this message is required to check if he/she has received it erroneously. If so, the receiver is requested to immediately inform the sender and - in consideration of the responsibilities arising from undue use and/or disclosure of the message and/or the information contained therein - destroy the original message and any copy or printout thereof.




More information about the TYPO3-english mailing list