Uutiset:

Join the Facebook Fan Page.

Main Menu
Advertisement:

Icon Problem

Aloittaja The Wizard, helmikuu 02, 2014, 03:42:42 AP

« edellinen - seuraava »

The Wizard

Hello:

I am trying to add a icon and it is not showing up. I am unfamiliar with how smf reads icons and so I don't know the correct path.

thanks

Wiz


My package manager code:

<require-file name="wizard_smiley.png" destination="$themedir/images/admin" />

My Button Code:

function toy_shop_admin_areas(&$admin_areas)
{
global $txt;

// Load toy Shop language strings
loadLanguage('ToyShop');

$admin_areas['forum']['areas']['toyshop'] = array(
'label' => $txt['toy_shop'],
'file' => 'Subs-Toy_Shop_Admin.php',
'function' => 'Buttons',
'permission' => array('admin_forum', 'moderate_forum'),
'icon' => 'wizard_smiley.png',
'subsections' => array(
'shop_admin_settings' => array($txt['toy_shop_admin_button_settings']),
'shop_admin_items_add' => array($txt['toy_shop_admin_button_items_add']),
'shop_admin_items_edit' => array($txt['toy_shop_admin_button_items_edit']),
'shop_admin_items_remove' => array($txt['toy_shop_admin_button_items_remove']),
'shop_admin_restock' => array($txt['toy_shop_admin_button_restock']),
'shop_admin_categories' => array($txt['toy_shop_admin_button_categories']),
'shop_admin_inv' => array($txt['toy_shop_admin_button_invother']),
'shop_admin_usergroup' => array($txt['toy_shop_admin_button_usergroup']),
),
);
}

margarett

There is no "automatic loading" of icons... You should just use the global variables to get the image using regular "img src" code.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

The Wizard


This is Incorrect -
LainaaThere is no "automatic loading" of icons... You should just use the global variables to get the image using regular "img src" code.

If you want the button/tab icon/avatar to show up make sure you path in package manager is targeted  to the images/admin file

below is a example of how I coded it in the package-info.xml file:

<require-file name="toy shop images/buttons/wizard_smiley.png" destination="$imagesdir/admin" />

I hop this helps another user and makes their life a little easier.

Wiz

Advertisement: