Project

General

Profile

Actions

Feature #17466

closed

Caluculate of gifbuilder XY width max([10.w]|[20.w])

Added by Daniel Kyak almost 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-07-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

You want to create a GMENU by useing TypoScript.
The text of the GMENU should have 2 lines.
In one case the first line is longer. In another case the second line is longer.
So you need maximum line width of these two lines.

The patch calculate this by using the max-function.

1 = GMENU
1 {
NO {
XY = max([10.w]|[20.w])+4, 32
10 = TEXT
10 {
text.field = title
text.case = upper
fontSize = 6
fontColor = #333333
fontFile = {$const.navigation.main.font}
offset = 0,14
align = center
}
20 = TEXT
20 {
text.field = subtitle
text.case = upper
fontSize = 6
fontColor = #333333
fontFile = {$const.navigation.main.font}
offset = 0,24
align = center
}

(issue imported from #M5954)


Files

class.tslib_gifbuilder.php.diff (1.51 KB) class.tslib_gifbuilder.php.diff Administrator Admin, 2007-07-12 14:15
giffbuilder-rpn.diff (33.7 KB) giffbuilder-rpn.diff Administrator Admin, 2008-06-10 17:41
Actions #1

Updated by Paul Gammans almost 16 years ago

Attached a new version of this patch giffbuilder-rpn.diff

This is a based on blatant copy of the PEAR libraries RPN module with some extra features to support minimum, maximum and integrate this into typo3

There are still some issues (ie the error handling need to be fixed) should be a 5minitue job.

But this patch extends the original patch and allows much more complex formulae by providing support for.
Parenthesis
Addition
subtraction
multiplication
division
root
power
sin
cos
tan
asin
acos
atan
sqrt
exp
log
ln
power
abs
factorial
mod
integer division
man
max

and also support the constants
pi
e

Actions #2

Updated by Paul Gammans almost 16 years ago

A simple example of this could be setting as bellow generating three lines of centred text

file = GIFBUILDER
file {
XY = max([10.w]|max([15.w]|[20.w]))+4, ([20.h] + [15.h]) * 7 / 5 + [10.h] + 6
10 = TEXT
10.text.current = 1
10.offset = max(max([15.w]|[20.w])-[10.w]|0) / 2 + 2, {$TSconst.sh_fontSize}
10.text.listNum=0
10.text.listNum.splitChar = |
10.fontColor = {$TSconst.sh_textColor}
10.fontSize = {$TSconst.sh_fontSize}
10.fontFile = {$TSconst.sh_font}
15 < .10
15.text.listNum=1
15.offset=max(max([10.w]|[20.w])-[15.w]|0) / 2 + 2, {$TSconst.sh_fontSize} * 11 / 5
20 < .10
20.text.listNum=2
20.offset=max(max([10.w]|[15.w])-[20.w]|0) / 2 + 2, {$TSconst.sh_fontSize} * 17 / 5
}

Actions #3

Updated by Ernesto Baschny almost 16 years ago

Wow, that is pretty funky!

Actions #4

Updated by Alexander Opitz over 10 years ago

  • Category deleted (Communication)
  • Status changed from New to Needs Feedback
  • Target version deleted (0)

Hi,

as this issue is very old. Is this feature missing in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF