Bug #29289
tx_ttnews_imageMarker hook doesn't use tt_news flexform size values
| Status: | New | Start date: | 2011-08-26 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
In the tt_news hook, tx_ttnews_imageMarker, the image is redrawn based on tt_news TS values. However, it doesn't take into account that there may be overriding maxH and maxW values in the tt_news plugin's flexform.
There are 2 ways to solve - one is to get tt_news folks to alter $lConf as it is updated with FF values in the getImageMarkers() call like this:
In class.tx_ttnews.php - from:$markerArray = $this->getImageMarkers($markerArray, $row,$lConf, $textRenderObj);
To:
$markerArray = $this->getImageMarkers($markerArray, $row,&$lConf, $textRenderObj);
Then the $lConf that is passed to the hook will be all ready to go.
Alternatively, it can be fixed in the hook (class.tx_ttnews_imageMarkerHook.php) as well like this:
function extraItemMarkerProcessor($parentMarkerArray, $row, $lConf, $tt_news) {
$tt_news->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->conf = &$tt_news->conf;
+ if ($tt_news->config['FFimgH'] || $tt_news->config['FFimgW']) {
+ $lConf['image.']['file.']['maxW'] = $tt_news->config['FFimgW'];
+ $lConf['image.']['file.']['maxH'] = $tt_news->config['FFimgH'];
+ }
$this->makeImageMarkers($row,$lConf,$tt_news,$parentMarkerArray);
return $parentMarkerArray;
}
Seeing as how tt_news takes forever to get new updates, I figure maybe posting it here will get faster resolution :)