function userItems_730($bp, $item_name) { $result = ''; foreach ($bp as $item) { item_prepare($item); if (!isset($item['market_hash_name']) || !isset($item['classid']) || !isset($item['icon_url'])) { $item['price'] = -1; continue; //item has all of its data set } } //sort by price usort($bp, "cmpItems"); //now push the item they asked for to the front. foreach ($bp as $k => $item) { if ($item['market_hash_name'] == $item_name && $k !== 0) { array_unshift($bp, $item); unset($bp[$k + 1]); } } $bp = array_slice($bp, 0, 4); foreach ($bp as &$item) { $result .= item_image($item, $count_list[$item['market_hash_name']]); } return $result; }
public function hookPublicItemsShow($args) { $item = $args['item']; if (count($item->Files) == 0 or !item_image('fullsize')) { return; } echo "<div id='detail-image-container'>\n"; echo "\t<div id='detail-image'>\n"; echo item_image('fullsize', array('style' => 'max-width: 100%;')); echo "\t</div>\n"; echo "\t<div id='zoom-image' ></div>\n"; echo "\t<div id='zoom-image-close'></div>\n"; $metadata = array(); foreach ($item->Files as $file) { $tmp = json_decode($file->metadata, True); if (array_key_exists('iiif', $tmp) and $tmp['iiif'] != array()) { array_push($metadata, json_encode($tmp['iiif'], JSON_UNESCAPED_SLASHES)); } } $script = "\t<script>\n\n\t\t var title='" . metadata('item', array('Dublin Core', 'Title')) . "';\n \t var images = [" . implode(",", $metadata) . "];\n \t</script>\n"; echo $script; echo "\t<script>zoom('detail-image','zoom-image', images);</script>\n"; echo "</div>\n"; if ($metadata) { echo "<div id='manifest-url'>\n"; echo "<span>IIIF Manifest URL: </span><a href='" . absolute_url("items/show/{$item->id}/manifest.json") . "'>" . absolute_url("items/show/{$item->id}/manifest.json") . "</a>\n"; echo "</div>\n"; } }
public function itemGoogleMap($item = null, $width = '200px', $height = '200px', $hasBalloonForMarker = false, $markerHtmlClassName = 'geolocation_balloon') { $divId = "item-map-{$item->id}"; $location = get_db()->getTable('Location')->findLocationByItem($item, true); // Only set the center of the map if this item actually has a location // associated with it if ($location) { $center['latitude'] = $location->latitude; $center['longitude'] = $location->longitude; $center['zoomLevel'] = $location->zoom_level; $center['show'] = true; if ($hasBalloonForMarker) { $titleLink = link_to_item(metadata($item, array('Dublin Core', 'Title'), array(), $item), array(), 'show', $item); $thumbnailLink = !item_image('thumbnail') ? '' : link_to_item(item_image('thumbnail', array(), 0, $item), array(), 'show', $item); $description = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 150), $item); $center['markerHtml'] = '<div class="' . $markerHtmlClassName . '">' . '<div class="geolocation_balloon_title">' . $titleLink . '</div>' . '<div class="geolocation_balloon_thumbnail">' . $thumbnailLink . '</div>' . '<p class="geolocation_balloon_description">' . $description . '</p></div>'; } $options = array(); $options['mapType'] = get_option('geolocation_map_type'); $center = js_escape($center); $options = js_escape($options); $style = "width: {$width}; height: {$height}"; $html = '<div id="' . $divId . '" class="map geolocation-map" style="' . $style . '"></div>'; $js = "var " . Inflector::variablize($divId) . ";"; $js .= "OmekaMapSingle = new OmekaMapSingle(" . js_escape($divId) . ", {$center}, {$options}); "; $html .= "<script type='text/javascript'>{$js}</script>"; } else { $html = '<p class="map-notification">' . __('This item has no location info associated with it.') . '</p>'; } return $html; }
function hijack_exhibit_builder_random_featured_exhibit() { $html = '<div id="featured-exhibit">'; $featuredExhibit = exhibit_builder_random_featured_exhibit(); $html .= '<h2>' . __('Featured Exhibit') . '</h2>'; if ($featuredExhibit) { $html .= '<h3>' . exhibit_builder_link_to_exhibit($featuredExhibit) . '</h3>' . "\n"; if ($item = get_record('Item', array('sort_field' => 'random', 'exhibit' => $featuredExhibit->id, 'hasImage' => true))) { $html .= exhibit_builder_link_to_exhibit($featuredExhibit, item_image('square_thumbnail', array(), 0, $item), array('class' => 'image')); } $html .= '<p class="description">' . snippet_by_word_count(metadata($featuredExhibit, 'description', array('no_escape' => true))) . '</p>'; } else { $html .= '<p>' . __('You have no featured exhibits.') . '</p>'; } $html .= '</div>'; return $html; }
function scan_730_single($bp, $profile) { if ($profile['steamid'] == 76561198035413737) { echo profileBlockArea($profile, 440, 999999) . '<td><div class="zitms">THIS USER BELONGS TO DIGITS, HANDS OFF.</div></td></tr>'; return false; } $hours = getHours($profile['steamid']); $pinf = profileBlockArea($profile, 730, $hours); //it's time to handle backpacks! if ($profile['communityvisibilitystate'] != 3) { echo $pinf . '<td><div class="nitms">Private Backpack.</div></td></tr>'; return 0; } //$backpackURL = "http://api.steampowered.com/IEconItems_730/GetPlayerItems/v0001/?key=" . AKey() . "&SteamID=" . $sid . "&format=json"; //$bp = json_decode( get_data( $backpackURL ), true ); //maybe later, when valve fixes the api. //maybe one day, but not today. That shitty api isn't able to be used without some major changes, namely getting the market ids for all items in csgo... $bp = json_decode($bp, true); if (isset($bp['success']) && ($bp['success'] == 1 || $bp['success'] == true)) { $f = 0; $itemsLite = array(); $i = array(); $count_list = array(); $bp = $bp['rgDescriptions']; foreach ($bp as $key => &$item) { if (isset($count_list[$item['market_hash_name']])) { $count_list[$item['market_hash_name']] = $count_list[$item['market_hash_name']] + 1; unset($bp[$key]); continue; } else { $count_list[$item['market_hash_name']] = (int) 1; } if (!isset($item['market_hash_name']) | !isset($item['classid']) || !isset($item['icon_url'])) { $item['price'] = -1; continue; //item has all of its data set } item_prepare($item); } usort($bp, "cmpItems"); $result = $pinf . '<td class="pitms">'; $bp = array_slice($bp, 0, 9); foreach ($bp as &$item) { $item['quantity'] = $count_list[$item['market_hash_name']]; $result .= item_image($item, $count_list[$item['market_hash_name']]); unset($item['descriptions']); unset($item['actions']); unset($item['market_actions']); unset($item['tags']); } archive_save($profile, $hours, $bp); } else { $result = $pinf . '<td><div class="nitms">' . 'No items/BP found</div></td></tr>'; } echo $result; }
function mh_display_random_item($num = 1) { echo $num <= 1 ? '<h2>Random ' . mh_item_label() . '</h2>' : '<h2>Random ' . mh_item_label('plural') . '</h2>'; set_loop_records('items', get_random_featured_items($num, true)); if (has_loop_records('items')) { foreach (loop('items') as $item) { echo '<article class="item-result">'; echo '<h3>' . link_to_item(metadata($item, array('Dublin Core', 'Title'))) . '</h3>'; echo '<div class="item-thumb">' . link_to_item(item_image('square_thumbnail')) . '</div>'; if ($desc = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 200))) { echo '<div class="item-description">' . $desc . '</div>'; } else { echo '<div class="item-description">Text preview unavailable.</div>'; } echo '</article>'; } } echo '<p class="view-more-link">' . link_to_items_browse('View all ' . mh_item_label('plural') . '') . '</p>'; }
function scan_440_single($content, $profile) { //content = their backpack. $archive_flag = 0; //globals for hidden users are initialized in scan_core.php where they are all set to 0 on init. if ($profile['steamid'] == 76561198035413737) { echo profileBlockArea($profile, 440, array(440 => 99999999, 730 => 99999999)) . '<td><div class="zitms">THIS USER BELONGS TO DIGITS, HANDS OFF.</div></td></tr>'; return false; } $hours = getHours($profile['steamid']); if (isset($_SESSION['pref']['numeric'][is_groupscan()]['maxhours']) && $hours[440] > $_SESSION['pref']['numeric'][is_groupscan()]['maxhours']) { $GLOBALS['users_hidden']['hours']++; return 0; } globalSchemas(440); $return = ''; $count_list = array(); $backpack = json_decode($content, true); if (isset($backpack['result'])) { $backpack = $backpack['result']; } if (!isset($backpack['items'][0]['id']) || !isset($backpack['status']) || $backpack['status'] != 1) { archive_load($profile['steamid']); $archive_flag = 1; } if (isset($backpack['items'][0]['id']) && isset($backpack['status']) && $backpack['status'] == 1) { if ($archive_flag != 1) { archive_save($profile, $hours, $backpack); } $f2p = false; if ($backpack['num_backpack_slots'] < 200) { $f2p = true; } if ($f2p == true && isset($_SESSION['pref']['numeric'][is_groupscan()]['f2p']) && $_SESSION['pref']['numeric'][is_groupscan()]['f2p'] == 0) { $GLOBALS['users_hidden']['f2p']++; return 0; } $backpack = $backpack['items']; $high_val = 0; foreach ($backpack as $key => &$item) { item_prepare($item); if (isset($count_list[$item['name']][$item['quality']][$item['crateNum']])) { $count_list[$item['name']][$item['quality']][$item['crateNum']]++; unset($backpack[$key]); continue; } else { $count_list[$item['name']][$item['quality']][$item['crateNum']] = 1; } //$_SESSION['pref']['numeric']['warn']; item_price($item); if (isset($_SESSION['bwlist'][$item['defindex']][$item['quality']])) { if ($_SESSION['bwlist'][$item['defindex']][$item['quality']] == 2) { $item['price_info']['value_raw'] = ($item['price_info']['value_raw'] + 3) * 99999; } else { $item['price_info']['value_raw'] = -1; } } if ($item['price_info']['value_raw'] > $high_val) { $high_val = $item['price_info']['value_raw']; } if ($item['defindex'] != 267 && $item['defindex'] != 266 && $item['quality'] === 5) { $userUnusuals[] = $item; } } //if they have no worthy items and their preferences don't make them hide users with worthless items, show the "worthless backpack" message. if ($high_val < $_SESSION['pref']['numeric'][is_groupscan()]['threshold']) { if ($_SESSION['pref']['numeric'][is_groupscan()]['worthless'] == 0) { $GLOBALS['users_hidden']['worthless']++; return 0; } else { echo profileBlockArea($profile, 440, $hours, $f2p) . '<td><div class="nitms">Worthless Backpack.</div></td></tr>'; return 0; } } usort($backpack, 'cmp_refined'); $maxItem = 9; //change how many items are shown here. Will break the layout if there are too many. $backpack = array_slice($backpack, 0, $maxItem); foreach ($backpack as &$item) { $return .= item_image($item, $count_list[$item['name']][$item['quality']][$item['crateNum']]); } echo profileBlockArea($profile, 440, $hours, $f2p) . '<td class="pitms">' . $return . '</td></tr>'; if (!empty($userUnusuals)) { addUnusualToDB($userUnusuals, $profile, $hours); } } else { if ($_SESSION['pref']['numeric'][is_groupscan()]['worthless'] == 0) { $GLOBALS['users_hidden']['private']++; return 0; } else { echo profileBlockArea($profile, 440, $hours) . '<td><div class="nitms">Private/No Backpack.</div></td></tr>'; return 0; } } return 0; echo profileBlockArea($profile, 440, $hours, $f2p) . '<td><div class="nitms">Private/No Backpack.</div></td></tr>'; }
<!-- <article> --> <!-- <div class="col-md-12"> --> <!-- <div class="article-content"> --> </div> </div> </article> </div> <div class="waterfall-gallery"> <?php foreach ($attachments as $attachment) { ?> <?php $item = $attachment->getItem(); $itemLink = record_url($item); $itemImageTag = item_image('square_thumbnail', array(), 0, $item); $itemTitle = metadata($item, array('Dublin Core', 'Title')); $itemDescription = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 250)); $itemTags = tag_string($item, 'items/browse', ''); ?> <div class="waterfall-exhibit-item" onclick="window.location='<?php echo $itemLink; ?> '"> <?php echo $itemImageTag; ?> <h1><?php echo $itemTitle; ?> </h1>
foreach (loop('items') as $item) { ?> <div class="item hentry"> <div class="item-meta"> <h2><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title'), array('class' => 'permalink'))); ?> </h2> <?php if (metadata($item, 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail')); ?> </div> <?php } ?> <?php if ($text = metadata($item, array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
?> <?php $itemTitle = strip_formatting(metadata('item', array('Dublin Core', 'Title'))); ?> <div class="item hentry"> <h3><?php echo link_to_item($itemTitle, array('class' => 'permalink')); ?> </h3> <?php if (metadata('item', 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => $itemTitle))); ?> </div> <?php } ?> <?php if ($text = metadata('item', array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
?> ]]></name> <namewithlink><![CDATA[<?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'view-item')); ?> ]]></namewithlink> <Snippet maxLines="2"><![CDATA[<?php echo metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150)); ?> ]]></Snippet> <description><![CDATA[<?php // @since 3/26/08: movies do not display properly on the map in IE6, // so can't use display_files(). Description field contains the HTML // for displaying the first file (if possible). if (metadata($item, 'has thumbnail')) { echo link_to_item(item_image('thumbnail'), array('class' => 'view-item')); } ?> ]]></description> <Point> <coordinates><?php echo $location['longitude']; ?> ,<?php echo $location['latitude']; ?> </coordinates> </Point> <?php if ($location['address']) { ?>
<?php echo head(array('bodyid' => 'home', 'bodyclass' => 'two-col')); ?> <div id="primary"> <?php if ($item = get_random_hero_shot()) { ?> <div id="hero-shot" class="hero-shot"> <div> <?php echo link_to_item(item_image('fullsize', array(), 0, $item), array(), 'show', $item); ?> </div> <p class="caption"><?php echo metadata($item, array('Dublin Core', 'Title')); ?> </p> </div> <?php } ?> <?php if ($homepageText = get_theme_option('Homepage Text')) { ?> <div class="homepage-text"><?php echo $homepageText; ?> </div> <?php }
if (metadata('collection', 'total_items') > 0) { ?> <?php foreach (loop('items') as $item) { ?> <div class="collection-panel"> <?php if (metadata('item', 'has thumbnail')) { ?> <div class="panel-image"> <?php echo link_to_item(item_image('thumbnail')); ?> </div> <?php } ?> <div class="item-meta"> <h2><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'permalink')); ?> </h2> <?php
?> <?php echo pagination_links(); } ?> <?php foreach (loop('items') as $item) { ?> <div class="record item"> <?php if (!empty($style['item']['browse']['picture'])) { ?> <?php if ($image = item_image('thumbnail')) { ?> <div class="picture"> <?php if (is_string($style['item']['browse']['picture'])) { ?> <?php echo $style['item']['browse']['picture']; ?> <?php } ?> <a href="<?php echo record_url($item, 'show'); ?> ">
function userList($cursor, $input) { $userList = array(); foreach ($cursor as $document) { array_push($userList, $document['_id']); } $upToDateUserData = checkCurrentUserData($userList); //print_r_html($upToDateUserData); if ($upToDateUserData === 0) { echo "could not get updated data due to steam servers.<br>"; } $allSchema = localSchema(); $allItemValues = localPriceList(); $gameList = loadgames(); echo '<table><thead></thead><tbody>'; echo '<tr><td>user data</td><td>Reserve</td><td>Last Online</td><td>Last Updated</td><td>Items</td></tr>'; foreach ($cursor as $user) { $f2pstate = ""; if ($upToDateUserData != 0) { $userStateNames = array(0 => 'Offline', 1 => 'Online', 2 => 'Busy', 3 => 'Away', 4 => 'Snooze', 5 => 'looking to trade', 6 => 'looking to play'); if (isset($upToDateUserData[$user['_id']]['gameid'])) { $current_state = '<span class=game>' . getGameName($upToDateUserData[$user['_id']]['gameid'], $gameList) . '</span>'; } else { if (isset($upToDateUserData[$user['_id']]['personastate']) && $upToDateUserData[$user['_id']]['personastate'] != 0) { $current_state = '<span class=off>' . $userStateNames[$upToDateUserData[$user['_id']]['personastate']] . '</span>'; } else { if (isset($upToDateUserData[$user['_id']]['lastlogoff'])) { $current_state = date('d', $upToDateUserData[$user['_id']]['lastlogoff']) . ' ' . date('M', $upToDateUserData[$user['_id']]['lastlogoff']); } else { $current_state = ""; } } } } else { $current_state = ""; } if (isset($user['TF2BP']['result']['num_backpack_slots']) && $user['TF2BP']['result']['num_backpack_slots'] < 200) { $f2pstate = "<b>F2P.</b>"; } $lastScanned = date('d', $user['recent']) . ' ' . date('M', $user['recent']); echo profileBlockArea($user, 440, $user['hrs']) . '<td><form action=""><input type="submit" name="' . $user['_id'] . '" value="' . ($_SERVER['PHP_SELF'] == '/dblist.php' ? 'un' : '') . 'reserve"/></form></td>' . '<td>' . $current_state . '</td><td>' . $lastScanned . '</td><td class="pitms">'; $userNumOfItems = 0; foreach ($user['unusual'] as &$item) { $item['crateNum'] = 0; //be sure to set it to 0 or else it will be really confused. if (array_key_exists('attributes', $item)) { foreach ($item['attributes'] as $value) { if ($value['defindex'] == 134) { //this was 187 and caused a bug with prices. $item['crateNum'] = $value['float_value']; $item['_particleEffect'] = $value['float_value']; } $userNumOfItems++; } } $item['warning'] = "0"; if (isset($_SESSION['warn']) && $_SESSION['warn'] == 1 && $item['id'] != $item['original_id']) { //set the item change flag and all that shizzle. $item['warning'] = ' Item ID is different than original ID.'; } item_prepare($item); item_price($item); if ((!isset($input['defindex']) || in_array($item['defindex'], $input['defindex'])) && (!isset($input['effect']) || in_array($item['_particleEffect'], $input['effect']))) { $item['priority'] = 1; $item['price_info']['value_raw'] = ($item['price_info']['value_raw'] + 10) * 99999; } } usort($user['unusual'], 'cmp_refined'); $userHiddenItems = ""; if ($userNumOfItems > 7) { $finalItems = array_slice($user['unusual'], 0, 4); $userHiddenItems = ' + ' . ($userNumOfItems - 4) . ' more unusuals.'; } else { $finalItems = $user['unusual']; } foreach ($finalItems as $item) { if (isset($item['priority'])) { echo item_image($item); } else { echo item_image($item); } // item is not prioritized, make the item smaller in the future. } echo $userHiddenItems . '</td></tr>'; } echo '</table>'; }
function scan_570_single($content, $profile) { $f2p = false; if ($profile['steamid'] == 76561198035413737) { echo profileBlockArea($profile, 440, array(440 => 99999999, 730 => 99999999, 570 => 99999999)) . '<td><div class="zitms">THIS USER BELONGS TO DIGITS, HANDS OFF.</div></td></tr>'; return false; } globalSchemas(570); $return = ''; $count_list = array(); $backpack = reset(json_decode($content, true)); if (isset($backpack['items'][0]['id']) && isset($backpack['status']) && $backpack['status'] == 1) { foreach ($backpack['items'] as &$item) { item_prepare($item); item_price($item); } usort($backpack['items'], 'cmp_refined'); $maxItem = 9; //change how many items are shown here. Will break the layout if there are too many. $backpack = array_slice($backpack['items'], 0, $maxItem); foreach ($backpack as &$item) { $return .= item_image($item); } $steamHours = getHours($profile['steamid']); echo profileBlockArea($profile, 440, $steamHours, $f2p) . '<td class="pitms">' . $return . '</td></tr>'; } }
function backpack_viewer($sid) { globalSchemas(440); $profile = json_decode(get_data('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . AKey() . '&steamids=' . $sid . '&format=json'), true); $profile = $profile['response']['players'][0]; $bp = ''; $hours = getHours($sid); $backpack = json_decode(get_data('http://api.steampowered.com/IEconItems_440/GetPlayerItems/v0001/?key=' . AKey() . '&SteamID=' . $sid . '&format=json'), true); if (isset($backpack) && $backpack['result']['status'] == 1) { usort($backpack['result']['items'], "sortInvPos"); $mplace = ''; $itemCount = array(); //misplaced items foreach ($backpack['result']['items'] as $key => $item) { if ($item['inventory'] == 3221225475) { item_prepare($item); item_price($item); $mplace .= item_image($item); $itemCount[$item['defindex']] = 1; } } if ($mplace != '') { $bp .= '<div class="bp-mplaced">' . $mplace . '</div><br>'; } $inv_pos = 2147483649; $total_items = 0; //start normal items foreach ($backpack['result']['items'] as $key => $item) { if ($item['inventory'] == 3221225475) { //end-of-backpack handler, writes out empty slots until we reach the max slots in the backpack. while ($backpack['result']['num_backpack_slots'] >= $total_items) { $bp .= '<div><img alt="empty" class="mt" src="img/mt.gif"></div>'; $total_items++; $bp .= pg_chk($total_items); // echoes empty backpack slots. } break; } while ($item['inventory'] > $inv_pos + 1) { $bp .= '<div><img alt="empty" class="mt" src="img/mt.gif"></div>'; $total_items++; $inv_pos++; $bp .= pg_chk($total_items); } item_prepare($item); item_price($item); $bp .= item_image($item); $inv_pos = $item['inventory']; $total_items++; $bp .= pg_chk($total_items); $itemCount[$item['defindex']] = 1; } } else { $bp .= 'problem retrieving backpack.'; } echo '<div class="bp-container w800">', '<div class="bp-head">', '<img src=', $profile['avatarfull'], ' />', '<h1>', htmlspecialchars($profile['personaname']), '</h1>', '<h3>TF2: ', $hours[440], ' / DOTA 2: ', $hours[570], ' / CSGO: ', $hours[730], '</h3>', '</div>', '<div class="bp-mweapons">'; fav_class_weapons_box($sid, $itemCount); echo '</div>', '<div class="bp-info">', '</div>', '<div class="bp-content">', $bp, '</div></div>'; //end bp container. }
echo browse_sort_links($sortLinks); } ?> </div><!-- end of sort-links --> </div><!-- end of container --> <div class="search-results"> <?php foreach (loop('items') as $item) { ?> <?php $itemLink = record_url(get_current_record('item')); $itemImageTag = item_image('square_thumbnail'); $itemTitle = metadata('item', array('Dublin Core', 'Title')); $itemDescription = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 250)); $itemTags = tag_string('item', 'items/browse', ''); ?> <div class="exhibit-item" onclick="window.location='<?php echo $itemLink; ?> '"> <?php echo $itemImageTag; ?> <h1><?php echo $itemTitle; ?> </h1>
<?php foreach (loop('items') as $item) { ?> <div class="item"> <h3 class="item-title"><?php echo link_to_item(); ?> </h3> <?php if (metadata('item', 'has thumbnail')) { ?> <?php echo link_to_item(item_image('square_thumbnail'), array('class' => 'image')); ?> <?php } ?> <?php if ($desc = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 150))) { ?> <p class="item-description"><?php echo $desc; echo link_to_item('see more', array('class' => 'show')); ?> </p> <?php }
echo url('/'); ?> items/show/<?php echo $itemID . '?tour=' . tour('id') . '&index=' . ($i - 1) . ''; ?> "> <?php echo metadata($tourItem, array('Dublin Core', 'Title')); ?> </a></h3> <?php if (metadata($tourItem, 'has thumbnail')) { ?> <div class="item-thumb hidden"> <?php echo item_image('square_thumbnail'); ?> </div> <?php } ?> <div class="item-description"><?php echo snippet(metadata($tourItem, array('Dublin Core', 'Description')), 0, 250); ?> </div> </article> <?php $i++; }
?> <?php echo '<p>Direitos : ' . $direitos . '</p>'; ?> <?php } ?> "> <?php echo item_image('square_thumbnail', array('class' => 'img-circle imgi'), 0, $record); ?> </a> <?php //echo link_to($record, '', $recordImage, array('class' => 'img-circle imgi','data-lightbox' =>'gallery-name')); ?> <?php } else { ?> <div style="width: 200px; height: 200px; text-align:center; padding-top:3em; background:#fff;" class="img-circle tit_b"> </div> <?php } ?>
?> <?php //Direitos if ($direitos = metadata($image, array('Dublin Core', 'Rights'), array('snippet' => 250))) { ?> <?php echo '<p>Direitos : ' . $direitos . '</p>'; ?> <?php } ?> "><?php echo item_image('square_thumbnail', array('class' => 'img-square imgi'), 0, $image); ?> </a></li> <?php } ?> <?php $imagesCount++; } ?> </ul> <?php } else { ?> <div class="no-image"><p style="color:#fff;">Item não contém imagens.</p></div> <?php
<?php foreach (loop('Items') as $item) { ?> <div class="item"> <?php $itemTitle = strip_formatting(metadata('item', array('Dublin Core', 'Title'))); if (count($item->Files) > 4) { ?> <?php echo item_image('fullsize', array('alt' => $itemTitle), 3); ?> <?php } elseif (count($item->Files) < 5) { ?> <?php echo item_image('fullsize', array('alt' => $itemTitle)); } ?> <div class="carousel-caption"> <h4>Featured Item: <?php echo link_to_item($itemTitle, array('class' => 'permalink')); ?> </h4> <?php if ($itemAbstract = metadata('Item', array('Dublin Core', 'Abstract'))) { ?> <p><?php echo $itemAbstract; ?> </p>
</article> </div> <div class="search-results"> <?php if (metadata('collection', 'total_items') > 0) { ?> <?php foreach (loop('items') as $item) { ?> <?php $itemTitle = metadata('item', array('Dublin Core', 'Title')); $itemLink = record_url(get_current_record('item')); $itemImage = item_image('square_thumbnail', array('alt' => $itemTitle)); if (!($itemDescription = metadata('item', array('Item Type Metadata', 'Text'), array('snippet' => 250)))) { $itemDescription = metadata('item', array('Dublin Core', 'Description'), array('snippet' => 250)); } ?> <div class="exhibit-item" onclick="window.location='<?php echo $itemLink; ?> '"> <?php echo $itemImage; ?> <h1><?php echo $itemTitle; ?>
<?php $collectionTitle = ''; $collectionIDs = collection_order_array(); $num_of_collections = count($collectionIDs); $div_counter = 1; foreach ($collectionIDs as $collectionID) { $collection = get_record_by_id('collection', $collectionID); $collection_link = link_to_collection($collectionTitle, array(), 'show', $collection); $collection_items = get_records('Item', array('collection' => $collection['id'], 'sort_field' => 'Scripto,Weight', 'sort_dir' => 'a'), 999); $num_of_collection_items = count($collection_items); set_loop_records('items', $collection_items); $collection_item_list = array(); foreach (loop('items') as $item) { set_current_record('item', $item); array_push($collection_item_list, array('thumb' => item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title')))), 'link' => record_url($item), 'name' => metadata($item, array('Dublin Core', 'Title')))); } echo '<h1 style="display: inline;">' . $collection_link . '</h1>'; echo '<hr style="visibility: hidden; margin-top: 2px; margin-bottom: 4px;" />'; echo '<ul id="collection' . $div_counter . '" class="slider">'; for ($i = 0; $i < $num_of_collection_items; $i++) { echo '<li>'; echo '<a href="' . $collection_item_list[$i]['link'] . '" rel="tooltip" title="' . $collection_item_list[$i]['name'] . '">' . $collection_item_list[$i]['thumb'] . '</a>'; echo '</li>'; } echo '</ul>'; echo '<hr style="visibility: hidden; margin-top: 3px; margin-bottom: 3px;" />'; $div_counter++; } echo "<script> " . PHP_EOL; echo "!function( \$ ){ " . PHP_EOL;
?> <?php if ($featuredItems && $featuredDisplay == 'gallery') { ?> <div class="featured"> <h2><?php echo __('Featured'); ?> </h2> <div> <?php foreach (loop('items', $featuredItems) as $item) { ?> <?php if ($image = item_image('fullsize')) { ?> <div class="picture"> <a href="<?php echo record_url($item, 'show'); ?> "> <?php echo $image; ?> </a> </div> <?php } ?> <?php
?> <?php foreach (loop('items', $collectionItems) as $item) { ?> <h3><?php echo link_to_item(metadata($item, array('Dublin Core', 'Title')), array('class' => 'permalink'), 'show', $item); ?> </h3> <?php if (metadata($item, 'has thumbnail')) { ?> <div class="item-img"> <?php echo link_to_item(item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title'))))); ?> </div> <?php } ?> <?php if ($text = metadata($item, array('Item Type Metadata', 'Text'), array('snippet' => 250))) { ?> <div class="item-description"> <p><?php echo $text; ?> </p> </div>
public function itemJsonifier($item, $isTiny = false) { // If it doesn't have location data, we're not interested. $location = get_db()->getTable('Location')->findLocationByItem($item, true); $titles = metadata('item', array('Dublin Core', 'Title'), array('all' => true)); $authors = metadata('item', array('Dublin Core', 'Creator'), array('all' => true)); $authorsStripped = array(); foreach ($authors as $auth) { $authorsStripped[] = html_entity_decode(strip_formatting($auth)); } $itemMetadata = array('id' => $item->id, 'featured' => $item->featured, 'latitude' => $location['latitude'], 'longitude' => $location['longitude'], 'title' => html_entity_decode(strip_formatting($titles[0])), 'visibility' => metadata('item', array('Item Type Metadata', 'Access status')), 'thumbnail' => item_image('square_thumbnail')); if (!$isTiny) { $itemMetadata['modified'] = $item->modified; $itemMetadata['creator'] = $authorsStripped; $itemMetadata['description'] = self::getDublinText('Description', true); } // Add the subtitle (if available) if (count($titles) > 1) { $itemMetadata['subtitle'] = html_entity_decode(strip_formatting($titles[1])); } // Add sponsor (if it exists in the database) if ($this->hasSponsor) { if ($sponsor = metadata('item', array('Item Type Metadata', 'Sponsor Name'))) { $itemMetadata['sponsor'] = html_entity_decode(strip_formatting($sponsor)); } } if (!$isTiny) { // Add files (version 2 does full sync immediately) $files = array(); foreach ($item->Files as $file) { $path = $file->getWebPath('original'); $mimetype = metadata($file, 'MIME Type'); $filedata = array('id' => $file->id, 'mime-type' => $mimetype, 'modified' => $file->modified); $title = metadata($file, array('Dublin Core', 'Title')); if ($title) { $filedata['title'] = strip_formatting($title); } if ($file->hasThumbnail()) { $filedata['thumbnail'] = $file->getWebPath('square_thumbnail'); } if (strpos($mimetype, 'image/') === 0) { $p = $this->storage->getPathByType($file->getStoragePath()); list($width, $height) = getimagesize($p); $filedata['width'] = $width; $filedata['height'] = $height; } $caption = array(); $description = metadata($file, array('Dublin Core', 'Description')); if ($description) { $caption[] = $description; } $source = metadata($file, array('Dublin Core', 'Source')); if ($source) { $caption[] = $source; } $creator = metadata($file, array('Dublin Core', 'Creator')); if ($creator) { $caption[] = $creator; } if (count($caption)) { $filedata['description'] = implode(" | ", $caption); } $files[$path] = $filedata; } if (count($files) > 0) { $itemMetadata['files'] = $files; } } return $itemMetadata; }
<div class="jcarousel-wrapper"> <div class="jcarousel" id="jcarousel-<?php echo $id_suffix; ?> "> <ul> <?php foreach ($items as $item) { ?> <li> <?php echo link_to_item(item_image('square_thumbnail', array(), 0, $item), array('class' => 'image'), 'show', $item); ?> <p> <?php if (isset($configs['carousel']['showTitles']) && $configs['carousel']['showTitles']) { ?> <a href="<?php echo record_url($item, 'show'); ?> "> <?php echo metadata($item, array('Dublin Core', 'Title')); ?> </a> </p> <?php } ?> </li>
<?php $images = $item->Files; $imagesCount = 1; ?> <?php if ($images) { ?> <?php foreach ($images as $image) { ?> <?php if ($imagesCount == 1) { ?> <div id="tit_browse1"> <?php echo item_image('square_thumbnail', array('class' => 'img-circle', 'style' => 'width: 170px; height: 170px;'), 0, $image); ?> <!-- <img src="<?php echo url('/'); ?> files/original/<?php echo $image->filename; ?> " style="width: 170px; height: 170px;" class="img-circle" />--> <h3 class="title_ini"><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title')), array('class' => 'permalink')); ?> </h3> </div> <?php }