本文整理汇总了PHP中Items::getItemTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Items::getItemTags方法的具体用法?PHP Items::getItemTags怎么用?PHP Items::getItemTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Items
的用法示例。
在下文中一共展示了Items::getItemTags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDetailedPlayerItems
public static function getDetailedPlayerItems($playerId, $gameId)
{
/* OTHER ITEMS */
$query = "SELECT DISTINCT i.item_id, i.name, i.description, i.max_qty_in_inventory, i.weight, i.type, i.url, pi.qty, m.file_path as media_url, m.game_id as media_game_id, im.file_path as icon_url, im.game_id as icon_game_id FROM (SELECT * FROM player_items WHERE game_id={$gameId} AND player_id = {$playerId}) as pi LEFT JOIN (SELECT * FROM items WHERE game_id = {$gameId}) as i ON pi.item_id = i.item_id LEFT JOIN media as m ON i.media_id = m.media_id LEFT JOIN media as im ON i.icon_media_id = im.media_id WHERE i.type != 'ATTRIB' GROUP BY i.item_id";
$result = Module::query($query);
$contents = array();
while ($content = mysql_fetch_object($result)) {
if ($content->media_url) {
$content->media_url = Config::gamedataWWWPath . '/' . $content->media_url;
$content->media_thumb_url = substr($content->media_url, 0, strrpos($content->media_url, '.')) . '_128' . substr($content->media_url, strrpos($content->media_url, '.'));
}
if ($content->icon_url) {
$content->icon_url = Config::gamedataWWWPath . '/' . $content->icon_url;
$content->icon_thumb_url = substr($content - icon_url, 0, strrpos($content - icon_url, '.')) . '_128' . substr($content - icon_url, strrpos($content - icon_url, '.'));
}
$content->tags = Items::getItemTags($content->item_id)->data;
$contents[] = $content;
}
return $contents;
}