Project

General

Profile

Actions

Feature #22931

closed

Add HOOKS to class.t3lib_iconworks.php for developing alternative backend-skins!

Added by Stephan Kellermayr over 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-18
Due date:
% Done:

0%

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

Description

problem:
at the moment there is no possibility to extend the class 't3lib_iconworks', which is very bad for redesigning the backend, because you stuck on the implemented functions which handles the sprites and icons.

there are so many possibilities to handle those icons, and to stay flexible in visualization, there should also be the possibility to implement other ways of icon-handling or extend the functionallity of the current sprite-concept.

why this is needed?
example1: if you want to generate different names for the base-icons, depending on different db-columns than the defaults.
example2: if you want to add (sub)classes to overlays or base-icons, useful if you want to use a sprite-matrix!
...

solution:
because XCLASS is not a good idea at this point, please add the following patch to t3lib_iconWorks, which provides three hooks for the critical functions.
(patch attached: t3lib/class.t3lib_iconworks.php.0000000.diff)

notes:
i will soon release an extension, which is basically a skincreator for t3xskin, but also gives you the possibility to create sprites/spritematrix for own extensions, complete with tutorials, photoshop-templates and colormanager, and automatic integration into TYPO3.
in this example you will see, how this functions could work, to give users a fulfilling TYPO3-experience!
no worries, i will stay as close as possible at the naming-conventions which are currently used and i will NOT confuse the whole thing again.
...and yes, i will still use only ONE single overlay and use a spritematrix instead ;-)

best regards,
Stephan N Kellermayr

(issue imported from #M14785)


Files

Actions #1

Updated by Stephan Kellermayr over 14 years ago

dear TYPO3-(core-)developers,

it is correct, my description was not very precise, but it is hard to explain without an example.
i agree, XCLASSing is not very good, and HOOKS are bad too... so i wrote this extension to show you how i would solve the icon-thing.
to give you the possibility to understand what i meant with "missing feature", please give this example a try.

http://www.t3x.at/downloads/T3X_t3xskinexample-1_0_0.t3x
(activate t3skin before using this example)

it is a small extension, which does not replace anything, it just provides the following things:

1. a modified version of 'class.t3lib_iconworks.php' for better classname- and iconname-generation (!important).

2. replacements for the images 't3-icon-apps-pagetree.png', 't3-icon-mimetypes.png', 't3-icon-status.png'

3. replacements for the css-files 't3-icon-apps-pagetree.css', 't3-icon-mimetypes.css', 't3-icon-status.css'
(the images and css-files are in the folder of this extension and are activated with $TBE_STYLES['skins']['t3skin']['stylesheetDirectories']['sprites'])

4. ...and some additional informations in the TCA-array for some system-tables.
(take a look at the added arrays 'typeicon_disableDefaultOverlay' and 'typeicon_classesAlternatives'!)

note: this example ONLY focuses onto pages and some mimetypes to show the concept!!! some icons (status, overlays, etc) and pages which contains modules are not processed in this example.

the things i modified in class.t3lib_iconworks.php are:
1. added a function which processes starttime/endtime and returns a meaningful string.
this is done to show a preciser baseicon/overlay which allows to visualize the hidden-state caused by timing-options.

2. modified function 'getIcon' to add the option 'nav_hide' to older systems which uses 't3xskin'.

3. modified function 'mapRecordTypeToSpriteIconClass' to get CSS-classes for a spritematrix (base-icon-alternatives).

4. modified function 'mapRecordOverlayToSpriteIconName' to get more possibilities with overlays.
sorry, the currently used concept with 'spriteIconRecordOverlayPriorities' is complete nonsense, because you lose important information!
...so i used a concept which simple concatenate keywords.

the following things are very strange in t3skin regarding pages, so i removed them in my extension:
1. CSS-classname 't3-icon-pagetree-page-mauntpoint' does not make any sense, its just a typo, remove it!

2. CSS-classname 't3-icon-pagetree-page-not-in-menu' is deprecated.
(mimetypes-x-content-splash is also deprecated and it neither exists)

3. CSS-classname 't3-icon-pagetree-page-no-icon-found' does not make any sense, because it should never occur!
(...or would you drive a car with a missing wheel?)

4. the CSS-classname for the spacer should be named 't3-icon-pagetree-page-spacer' instead of 't3-icon-pagetree-spacer' because it is a page!

5. the same as above with CSS-classname for the folder: 't3-icon-pagetree-page-folder' instead of 't3-icon-pagetree-folder'.

i hope i can inspire someone with this exmaple and reveal the icon-mystery which i was talking about.

however, if this couldnt make it into source someday, i will just provide an (manual) override of 'class.t3lib_iconworks.php' for upcoming versions of 't3xskin'. there are many people who will take this little obstacle to get a better looking TYPO3-backend.
no harm meant.

best regards, Stephan

Actions #2

Updated by Alexander Opitz about 11 years ago

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

Hi,

as there is t3skin, which shows all possibilities of skinning the backend, is something left, which you need or can this issue closed?

Actions #3

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