08-03-2011, 05:41 PM
|
|
|
Join Date: Mar 2010
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
How-To:
Include custom icons to your sprite:
!Warning! very advanced - if you do not know what you are doing. Stop right here.
Custom icons are added via plugin and hook
- In the ACP create a new plugin
- Add-on: vBulletin
- Hook: sprite_add_icon
- Titel: choose your own title. whatever makes sense for you
- execution order: 5
- PHP-CODE: (this is an example, path would be your icon, css would be the name of your icon!)
Code:
$files[] = array(
'path' => $stylevars['imgdir_siteicons']['imagedir'] . '/add.png',
'css' => 'siteicons_add',
'rollup' => $CSS_FORUMHOME_ROLLUP,
'height' => 23,
'width' => 24,
'padding' => array(
'top' => 4,
'right' => 4,
'bottom' => 4,
'left' => 4
)
);
- As for the rollup part. Right now allways use $CSS_FORUMHOME_ROLLUP - in later versions we will have different sprites for FORUMHOME and SHOWTHREAD (f.e.) - then you can choose which one. right now stay with Forumhome.
- height, width and padding are optional. If you do not need them, delete all of those array values.
- set it to active
- save
- refresh css sprites
- modify the template in which your sprite is placed
search
Code:
<img srv="http://....customimage.png" />
replace
Code:
<span class="sprite_custom_siteicons_add" title="custom image"></span>
- the icon should be loaded via the sprite now
I hope it helps. And do not say i didn't warn you. It is advanced.
|