[TYPO3-english] CoolURI, pagepath and ab_downloads (Modern Downloads)

Daniel Lundsgaard Skovenborg waldeinburg at gmail.com
Wed Feb 15 13:48:31 CET 2012


Ah, of course :-P I created an ext_tables.php for the extension with
the following (inspired by ab_downloads):
include_once( t3lib_extMgm::extPath( $_EXTKEY ) . 'class.tx_foobar.php' );
It works now. I just misunderstood the way TYPO3 handles extensions (I
never made one from scratch before).
Thanks for your help!

- Daniel

2012/2/14 Jan Bednarik <info at bednarik.org>:
> The class isn't probably included, try to add include/require statement e.g.
> to typo3conf/extTables.php or localconf?
>
> Jan
>
> Dne 14.2.2012 16:09, Daniel Lundsgaard Skovenborg napsal(a):
>
>> Hi Jan,
>>
>> Thanks! I'm trying the userfunc way (solution 2 and 3).
>> Embarrassing question: how do I make a function from an extension
>> available for cooluri? I get the following warning:
>> ... Core: Error handler (FE): PHP Warning: call_user_func() expects
>> parameter 1 to be a valid callback, class 'tx_foobar_pi1' not found in
>> /path/to/server/www/typo3conf/ext/cooluri/cooluri/link.Functions.php
>> line 320 ...
>> I also tried to load the js_news_cooluri extension and use the
>> function it was supposed to provide, but with the same result.
>>
>> Regards,
>> Daniel
>>
>> 2012/2/11 Jan Bednarik<info at bednarik.org>:
>>>
>>> Hi Daniel,
>>>
>>> basically - one parameter can be translated only into one pagepath.
>>>
>>> There are some other options
>>>
>>> 1) You can play with SQL - select more elements and use CONCAT on them to
>>> return stuff/like/this
>>>
>>> 2) You can replace default page path function with your own
>>>
>>> 3) You can write userfunc for given element:
>>>
>>> <part>
>>>        <parameter>yourparam</parameter>
>>>        <userfunc>class->function</userfunc>
>>> </part>
>>>
>>> That paramconstraint element is not much of a use. It mean to check
>>> whether
>>> a parameter should be translated.
>>>
>>> Regards
>>>
>>> Jan
>>>
>>>
>>> Dne 10.2.2012 22:20, Daniel Lundsgaard Skovenborg napsal(a):
>>>
>>>> Hi,
>>>>
>>>> I'm stuck in my attempt to configure CoolURI for ab_downloads.
>>>> I have two aims:
>>>>
>>>> 1. tx_abdownloads_pi1[category_uid] should be translated into a
>>>> pagepath (/page/parent-category/category/).
>>>> Just fetching the category label in a lookindb element is bad because
>>>> it gives some duplicate urls (e.g. when two categories have a
>>>> Documents subcategory).
>>>>
>>>> 2. Download urls should be in the form
>>>> /download-file/parent-category/category/file
>>>> I.e., the standard pagepath should be stripped from the url. I have
>>>> two pages with download modules, but it doesn't matter which of these
>>>> page id's is stored in the cache for file downloads.
>>>>
>>>> And now for the questions:
>>>>
>>>> @1: I cannot define more than one pagepath element, can I? Can achieve
>>>> the same result with a userfunc in uriparts?
>>>>
>>>> @2: I thought I could strip the pagepath using paramconstraints:
>>>>        <paramconstraints>
>>>>                <paramconstraint param="tx_abdownloads_pi1[action]">
>>>>                        <type>string</type>
>>>>                        <compare>neq</compare>
>>>>                        <value>getviewclickeddownload</value>
>>>>                </paramconstraint>
>>>>        </paramconstraints>
>>>> I'm not sure I understood the paramconstraints element correctly and I
>>>> cannot find any examples (not in the manual either). Is
>>>> paramconstraints even the way to do this? Can someone give an example
>>>> of the use of this element?
>>>> Alternatively, I thought of writing a userfunc returning blank if
>>>> tx_abdownloads_pi1[action] is getviewclickeddownloadcalling or calling
>>>> tx_cooluri->getPageTitle. Any comments on this?
>>>>
>>>> Regards,
>>>> Daniel
>>>
>>>
>>>
>>> _______________________________________________
>>> TYPO3-english mailing list
>>> TYPO3-english at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>>
>>
>>
>>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



-- 
http://waldeinburg.dk


More information about the TYPO3-english mailing list