The key is to never use the picture attribute in any weapon or magazine class. The default picture="" is what is used by all of the original non-resistance BIS weapons. This is what causes the game to search DTAEXT.pbo for an entry and (if it finds a matching picture in dtaext\equip\w) and description in dtaext\equipment.html display an "i" icon in gear.
This does mean that a dtaext.pbo has to be provided with the addon containing weapon, magazine pictures and equipment html entries for every CfgWeapons class in the addon that requires an "i" icon.
So as a quick example if I wanted to convert for example an addon weapon class called AN94 which uses the magazine AN94mag to provide an "i" icon:
1. Remove any "picture" attributes from the classes an94, an94mag, make sure that none of the parent/grandparent classes override the picture attribute to anything other than "" (ideally this should only be defined in CfgWeapons.Default).
2. Depbo Dtaext and add html entries for each class to equipment.html (just copy any other weapon's entry) change the EQ_ fields in the address to EQ_an94 and EQ_an94mag respectively. Change the _page2 addresses to unique values.
3. Create a picture for the weapon in dtaext\equip\w with the file name w_an94.paa, create one in dtaext\equip\m\ with the name m_an94mag.paa.
4. Repbo Dtaext and check out your new weapon information in game.
5. Feel free to customise the equipment.html entry once you've got a working "i" icon in gear for that weapon. For example I'm going to change my parameters pages to display a screenshot of the modeloptics used by each weapon to give people a better feel for what they're selecting when choosing weapons in a mission briefing (this will probably require me to add the screenshots to dtaext so equipment.html can access it).
Once again it isn't important which .cpp the weapon is defined in (whether it be in the main config or an addon) the critical thing is not to override the picture attribute so the game accesses dtaext for equip\w_classname.paa. The same should be true for magazines which require a picture entry in dtaext\equip\m\.
Obviously for small single weapon releases, forcing the user to replace their dtaext is impractical but for larger weapon collections, total conversions and mods it is well worth authors considering putting all their inventory pictures in a custom dtaext.pbo rather than an addon pbo.
Edited by *Zeewolf*, 31 March 2012 - 17:49.