[TYPO3-english] new flag-Icons in T3 4.5?
Bernd Wilke
t3ng at pi-phi.tk
Wed Sep 21 11:39:52 CEST 2011
On 09/06/2011 04:28 PM, Björn Pedersen wrote:
> Am 05.09.2011 11:05, schrieb Bernd Wilke:
>> in one installation we misuse the languages for a mobile-version.
>> but which flag can we use for showing in the BE?
>>
>> the flags are provided via spritemanager.
>>
>> just inserting new icons in the directory
>> /typo3/sysext/t3_skin/images/flags/ does not show them in the selection.
>>
>> how is it posssible to extend the range of 'language/country-flags'?
>>
>> bernd
> Hi,
>
> The git version of extdeveval has a command to regenerate the sprites,
> so you probably have to do that to get your flags into the sprite.
also the TER-Version (3.2.2). But it does not include new flags into the
generated sprite. if it generates the flags-sprite at all. I only
noticed a rebuild of the t3skin-sprite (with a lot of messed up icons!!!)
bt extdeveval gave me a hint how to integrate my icons into TYPO3:
You can use any of these icons with:
t3lib_iconWorks::getSpriteIcon($icon); You add further icons from your
own extension using:
// ext_tables.php:
$icons = array('extensions-myextension-icon1',
'extensions-myextension-icon2');
t3lib_SpriteManager::addIconSprite($icons,t3lib_extMgm::siteRelPath('myextension')
. 'myextension_sprite.css');
// myextension_sprite.css:
.t3-icon-extensions-myextension {
background-image:url(../../typo3conf/ext/myextension/myextension_sprite.gif);
}
.t3-icon-extensions-myextension-icon1 { background-position: 0px 0px; }
.t3-icon-extensions-myextension-icon2 { background-position: 0px -16px; }
$icons1 = array('flags-mobile', 'flags-mobile-overlay');
t3lib_SpriteManager::addIconSprite($icons1,t3lib_extMgm::siteRelPath('add_mobile_flag')
. 'icon.css');
so I don't want extension-...-icons but flags-mobile I changed it to:
$icons1 = array('flags-mobile', 'flags-mobile-overlay');
t3lib_SpriteManager::addIconSprite($icons1,t3lib_extMgm::siteRelPath('add_mobile_flag')
. 'icon.css');
and
.t3-icon-mobile.t3-icon-flags-mobile { background-position:
0px 0px;
background-image:url(../../typo3conf/ext/add_mobile_flag/mobile.png); }
.t3-icon-mobile-overlay.t3-icon-flags-mobile { background-position:
0px 0px;
background-image:url(../../typo3conf/ext/add_mobile_flag/mobile-overlay.png);}
(where is this used????)
so I could use the new 'flags'.
But only after inserting the new 'flag'-name into the sys_language
record via phpmyadmin. as the new flags does not appear in the selection
for the flag in a sys_language record in BE.
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list