JeffShadow90 Posted December 12, 2011 Posted December 12, 2011 (edited) Hi. Can someone tell me how to add the item icons inside the control panel? Edited December 12, 2011 by JeffShadow90
Sneaky Posted December 12, 2011 Posted December 12, 2011 as-in ALL of them? (that'd make you waste memory for nothing, unless you can use ratemyserver's ones )
jTynne Posted December 12, 2011 Posted December 12, 2011 Which control panel? If Flux, this can be done by opening the /themes/default/item/view.php file, finding: <td><?php echo htmlspecialchars($item->item_id) ?></td> <?php if ($image=$this->itemImage($item->item_id)): ?> And adding something along the lines of.. <th> <img src="/media/item/<?php echo htmlspecialchars($item->item_id) ?>.gif" onerror="ImgError(this);"></th> .. before that. And in the top of the file, add: <script> function ImgError(source){ source.src = "/media/item/missing.png"; source.onerror = ""; return true; }</script> Which will output an image instead of the red X image that displays whenever an item doesn't have an icon. Make a .png image with nothing in it, and save it to the path noted above. You'll need ALL the icons uploaded to your webhost, though, which are at http://code.google.com/p/fluxcp/downloads/list I personally will not provide anything further than this, as this should be a good learning experience for you and anyone else looking to do the same. Work it out and let us know how you do!
JeffShadow90 Posted December 12, 2011 Author Posted December 12, 2011 Ok I have a few questions: 1)The media/item/ folder must be inside th cp folder right? 2)To view the changes do I have to re-install the fluxCP? 3)the code should be like this? <th><img src="/media/item/<?php echo htmlspecialchars($item->item_id) ?>.gif" onerror="ImgError(this);"></th> <td><?php echo htmlspecialchars($item->item_id) ?></td> <?php if ($image=$this->itemImage($item->item_id)): ?> Thanks
Brian Posted December 12, 2011 Posted December 12, 2011 In FluxCP to add item icons & images, you just extract them into /data/images/ http://code.google.com/p/fluxcp/downloads/list - fluxcp-item-icons_20081102.zip - fluxcp-item-images.zip
Question
JeffShadow90
Hi.
Can someone tell me how to add the item icons inside the control panel?
Edited by JeffShadow907 answers to this question
Recommended Posts