Jump to content
  • 0

add items icon to control panel


JeffShadow90

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

Hi.

Can someone tell me how to add the item icons inside the control panel?

Edited by JeffShadow90
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

as-in ALL of them? (that'd make you waste memory for nothing, unless you can use ratemyserver's ones :D)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

so? how do I do that? O.o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

My advice. Ask him -> JayPeeMateo

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

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!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

OMG... °_°

Thanks!!!

Link to comment
Share on other sites

×
×
  • Create New...