[TYPO3-core] RFC #13486: bugfix/code cleanup: wrong icon-state returned from 'getIcon' in class.t3lib_iconworks.php (backend-redesign)

Stephan N Kellermayr stephan.kellermayr at t3x.at
Thu Mar 11 12:15:32 CET 2010


this is an SVN patch request.

type: bugfix/code cleanup

bugtracker references:
http://bugs.typo3.org/view.php?id=13486

branches:
trunk, current branch

problem:
the current TYPO3-code causes the following situation:
a page which is disabled because...
...the endtime is in the future, outputs the filename 'pages__f.gif'  
($futuretiming = TRUE;)
...the starttime is in the future, outputs the filename 'pages__t.gif'  
($timing = TRUE;)
...the endtime is in the past, outputs the filename 'pages__t.gif'  
($timing = TRUE;)
...the starttime is in the future AND the endtime is in the future  
too, outputs the filename 'pages__tf.gif' ($timing = TRUE;  
$futuretiming = TRUE;)

that is actually ok, but if you want to use a preciser icon-set to  
visualize the exact state, you dont have a chance to get the right  
icon, because there is missing a code in the futuretiming-concept:

i.e.: if the starttime is in the future and the endtime is NOT SET,  
the page is inactive, and so we should have the case 'futuretiming'  
...but TYPO3 just returns 'timing'. the filename we get is  
'pages__t.gif'
thats the same file we get, when only endtime is set and is in the past.

this problem doesnt affect the current available TYPO3-backend-skins,  
because none of them is using such precise icons to visualize this  
states especially in combination with 'Hide in menu' or 'Hide page'.
but if we are interested in designing a new backend-skin where we are  
able to express all this states with a small icon (or icon-overlay),  
this part is a stumbling block!

the problem is also relevant, if you are about to use icons, which  
represents the page's current visility in the frontend!
...a patch would be great for editors, because they could see by mean  
of the icon, why a page is currently NOT visible.


solution:
check if the endtime is set in case of starttime>currenttime, and then  
the icon-state will be correctly generated.
(patch attached: t3lib/class.t3lib_iconworks.php.0013486.diff)


notes:
because of the fact, that the original files 'pages__t.gif' and  
'pages__tf.gif' are identically, the patch doesnt affect current  
TYPO3-installations.
...but with this patch all backend-skinner get new chances to create  
meaningful new icon-sets and improve the usability of TYPO3!

best regards,
Stephan N Kellermayr

-----------------------------------------------------------------
this message was sent using horde-webmail, hosted by sonority.eu
http://www.sonority.eu/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.t3lib_iconworks.php.0013486.diff
Type: application/x-php
Size: 519 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100311/6e040ebc/attachment.bin>


More information about the TYPO3-team-core mailing list