| @@ 72-76 (lines=5) @@ | ||
| 69 | $images = $itemsObj[$i]->getImages(); |
|
| 70 | if (is_object($images['main'])) { |
|
| 71 | // check to see if GD function exist |
|
| 72 | if (!function_exists('imagecreatetruecolor')) { |
|
| 73 | $item['image'] = XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name'); |
|
| 74 | } else { |
|
| 75 | $item['image'] = PUBLISHER_URL . '/thumb.php?src=' . XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name') . '&w=50'; |
|
| 76 | } |
|
| 77 | $item['image_name'] = $images['main']->getVar('image_nicename'); |
|
| 78 | } |
|
| 79 | } elseif ('category' === $image) { |
|
| @@ 86-93 (lines=8) @@ | ||
| 83 | if ($itemsObj[$i]->uid() == '0') { |
|
| 84 | $item['image'] = XOOPS_URL . '/uploads/blank.gif'; |
|
| 85 | $images = $itemsObj[$i]->getImages(); |
|
| 86 | if (is_object($images['main'])) { |
|
| 87 | // check to see if GD function exist |
|
| 88 | if (!function_exists('imagecreatetruecolor')) { |
|
| 89 | $item['image'] = XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name'); |
|
| 90 | } else { |
|
| 91 | $item['image'] = PUBLISHER_URL . '/thumb.php?src=' . XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name') . '&w=50'; |
|
| 92 | } |
|
| 93 | } |
|
| 94 | } else { |
|
| 95 | // check to see if GD function exist |
|
| 96 | if (!function_exists('imagecreatetruecolor')) { |
|
| @@ 815-819 (lines=5) @@ | ||
| 812 | $item['image_height'] = $dimensions[1]; |
|
| 813 | $item['image_path'] = XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name'); |
|
| 814 | // check to see if GD function exist |
|
| 815 | if (!function_exists('imagecreatetruecolor')) { |
|
| 816 | $item['image_thumb'] = XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name'); |
|
| 817 | } else { |
|
| 818 | $item['image_thumb'] = PUBLISHER_URL . '/thumb.php?src=' . XOOPS_URL . '/uploads/' . $images['main']->getVar('image_name') . '&h=180'; |
|
| 819 | } |
|
| 820 | $item['image_name'] = $images['main']->getVar('image_nicename'); |
|
| 821 | } |
|
| 822 | ||
| @@ 842-846 (lines=5) @@ | ||
| 839 | $item['images'][$i]['height'] = $dimensions[1]; |
|
| 840 | $item['images'][$i]['path'] = XOOPS_URL . '/uploads/' . $image->getVar('image_name'); |
|
| 841 | // check to see if GD function exist |
|
| 842 | if (!function_exists('imagecreatetruecolor')) { |
|
| 843 | $item['images'][$i]['thumb'] = XOOPS_URL . '/uploads/' . $image->getVar('image_name'); |
|
| 844 | } else { |
|
| 845 | $item['images'][$i]['thumb'] = PUBLISHER_URL . '/thumb.php?src=' . XOOPS_URL . '/uploads/' . $image->getVar('image_name') . '&w=240'; |
|
| 846 | } |
|
| 847 | $item['images'][$i]['name'] = $image->getVar('image_nicename'); |
|
| 848 | ++$i; |
|
| 849 | } |
|