function ryzom_item_icon_image_from_simplexml($item, $add_text = '') { $c = $item['c'] != '' ? $item['c'] : -1; $s = $item['s'] != '' ? $item['s'] : -1; $q = $item['q'] != '' ? $item['q'] : -1; $sap = $item['sap'] != '' ? $item['sap'] : -1; $text = $item['text']; $text = str_replace('%mfc', '', $text); $text = str_replace("\n", ' ', $text); // $text = htmlentities($text); if ($add_text != '') { $text = $text != '' ? "{$add_text} - {$text}" : $add_text; } $url = ryzom_item_icon_url($item, $c, $q, $s, $sap); return "<img title=\"{$text}\" src=\"{$url}\"/> "; }
function affichage_item($item) { $url = ryzom_item_icon_url((string) $item->sheet, (int) $item->craftparameters->color, (int) $item->quality, (int) $item->stack); //ajouter les details de craftparameters $details = ""; foreach ((array) $item->craftparameters as $nom => $detail) { $details .= " - " . $nom . " : " . $detail; } return '<img src="' . $url . '" style="border: 1px solid #333;" title="' . (int) $item->stack . ' x ' . ryzom_translate((string) $item->sheet, 'fr', 0) . '(Q' . (int) $item->quality . $details . ')" /> '; }
function ryzom_item_icon($sheetid, $c, $q, $s, $sap, $destroyed) { return file_get_contents(ryzom_item_icon_url($sheetid, $c, $q, $s, $sap, $destroyed)); }