[TYPO3-core] RFC #1525: Bug: Possibility to add multiple "includeLib" plugins

Robert Heel rheel at 1drop.de
Mon Feb 28 17:45:28 CET 2011


Hi Jigal,

I've rethought the patch, a nicer way would be to increment and include
a global var instead of parsing the rendered template.

Attached a working test patch. Two issues here:

1) Where to store a global variable? (I've used
$GLOBALS['includeLibKey'] in this patch)

2)
> If multiple plugins want to use this, wouldn't a COA be a way?
Yes (done in this patch), but what about caching, if one extension is a
USER and another is a USER_INT object?

Could you give me an advice, please? Then I create a final patch.

Regards,

Robert


Am 26.02.2011 08:34, schrieb Jigal van Hemert:
> Hi,
> 
> Thanks for your patch!
> 
> On 26-2-2011 2:52, Robert Heel wrote:
>> Solution:
>> Do a loop and add all plugins using "includeLib" with page.1000, page
>> 1001, ...
> 
> page.1000 is kind of 'reserved' for adding plugins this way. If multiple
> plugins want to use this, wouldn't a COA be a way? This way it won't
> give problems when page.1001,1002, etc. are already in use.
> 
> About the code itself:
> - the use of 'global' is discouraged, so use $GLOBALS['TYPO3_CONF_VARS']
> instead.
> - eregi is deprecated in PHP 5.3. In this case
> t3lib_div::isFirstPartOfStr() would be more appropriate (in case of real
> regular expressions the preg_* family should be used)
> - why check for page.<pageObjKey> in
> defaultTypoScript_setup.cssstyledcontent/static/ while it is added to
> defaultTypoScript_setup.43 ?
> - some CGL stuff: descriptive and non-cryptic variable names
> ($pageObjKey), spaces around operators (also the dot operator)
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1525_multiple_includeLib_v2.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110228/442ba8b8/attachment.bin>


More information about the TYPO3-team-core mailing list